26use ieee.std_logic_1164.
all;
27use ieee.numeric_std.
all;
77 signal PRNUM :
in slv3; --
register number
78 signal PMODE :
in slv2; -- processor mode (k=>00,s=>01,u=>11)
79 signal PRSET :
in slbit; --
register set
80 signal PADDR :
out slv4 -- internal address
in regfile
83 if PRNUM = c_gr_pc then
85 elsif PRNUM = c_gr_sp then
86 PADDR <= PMODE(1) & "11" & PMODE(0);
88 PADDR <= PRSET & PRNUM;
90 end procedure do_regmap;
117 DI =>
DIN(ibf_byte0
),
130 DI =>
DIN(ibf_byte1
),
135 alias R_PC15 : slv15 is R_PC(15 downto 1);
137 if rising_edge(CLK) then
138 if WE='1' and ADST=c_gr_pc then
139 R_PC(ibf_byte0) <= DIN(ibf_byte0);
141 R_PC(ibf_byte1) <= DIN(ibf_byte1);
143 elsif PCINC = '1' then
144 R_PC15 <= slv(unsigned(R_PC15) + 1);
slv4 :=( others => '0') MASRC
slv16 :=( others => '0') MEMSRC
slv16 :=( others => '0') MEMDST
slv16 :=( others => '0') R_PC
do_regmapPRNUM,PMODE,PRSET,PADDR,
slv4 :=( others => '0') MADST
in DI slv( DWIDTH- 1 downto 0)
in ADDRB slv( AWIDTH- 1 downto 0)
in ADDRA slv( AWIDTH- 1 downto 0)
out DOB slv( DWIDTH- 1 downto 0)
out DOA slv( DWIDTH- 1 downto 0)
std_logic_vector( 14 downto 0) slv15
std_logic_vector( 3 downto 0) slv4
std_logic_vector( 2 downto 0) slv3
std_logic_vector( 15 downto 0) slv16
std_logic_vector( 1 downto 0) slv2