45use ieee.std_logic_1164.
all;
46use ieee.numeric_std.
all;
197 if rising_edge(CLK) then
200 if R_REGS.creset = '1' then
207 end process proc_regs;
212 variable ibhold : slbit := '0';
213 variable icrip : slbit := '0';
214 variable idout : slv16 := (others=>'0');
215 variable ibrem : slbit := '0';
216 variable ibreq : slbit := '0';
217 variable ibrd : slbit := '0';
218 variable ibw0 : slbit := '0';
219 variable ibw1 : slbit := '0';
220 variable ibwrem : slbit := '0';
221 variable ilam : slbit := '0';
222 variable iscval : slbit := '0';
223 variable iscid : slv3 := (others=>'0');
224 variable iei_req : slbit := '0';
226 variable imem_we0 : slbit := '0';
227 variable imem_we1 : slbit := '0';
228 variable imem_addr : slv4 := (others=>'0');
229 variable imem_din : slv16 := (others=>'0');
237 idout := (others=>'0');
238 ibrem := IB_MREQ.racc or r.maint;
243 ibwrem := IB_MREQ.we and ibrem;
246 iscid := (others=>'0');
251 imem_addr := '0' & IB_MREQ.addr(3 downto 1);
269 n.icnt := slv(unsigned(r.icnt) + 1);
270 if unsigned(r.icnt) = 7 then
280 if r.ibsel='1' and ibhold='0' then
285 case IB_MREQ.addr(3 downto 1) is
289 imem_addr := '1' & r.drsel;
291 imem_addr := '1' & r.rid;
303 if r.sbusy(to_integer(unsigned(imem_addr(2 downto 0))))='1' then
315 idout(4 downto 2) := (others=>'0');
347 n.sireq := (others=>'0');
366 n.sbusy(to_integer(unsigned(r.drsel))) := '1';
374 if r.ide='0' and n.ide='1' and
388 if imem_we1 = '1' then
393 idout := (others=>'0');
425 if r.sireq(7) = '1' then iscid := "111";
426 elsif r.sireq(6) = '1' then iscid := "110";
427 elsif r.sireq(5) = '1' then iscid := "101";
428 elsif r.sireq(4) = '1' then iscid := "100";
429 elsif r.sireq(3) = '1' then iscid := "011";
430 elsif r.sireq(2) = '1' then iscid := "010";
431 elsif r.sireq(1) = '1' then iscid := "001";
432 elsif r.sireq(0) = '1' then iscid := "000";
438 if r.fireq='1' or iscval='1' then
444 if r.fireq = '1' then
447 elsif iscval = '1' then
450 n.sireq(to_integer(unsigned(iscid))) := '0';
455 imem_addr := '0' & r.icnt;
456 imem_din := (others=>'0');
462 if unsigned(r.sc) = 8#13# then
463 n.sc := (others=>'0');
465 n.sc := slv(unsigned(r.sc) + 1);
477 IB_SRES.ack <= r.ibsel and ibreq;
478 IB_SRES.busy <= ibhold and ibreq;
483 end process proc_next;
slv3 := "001" ibaddr_rker
slv16 :=( others => '0') MEM_DOUT
integer := 6 rkcs_ibf_ide
integer := 11 rkmr_ibf_crdone
integer range 5 downto 4 rkcs_ibf_mex
slv3 := "111" ibaddr_rkdb
slv3 := "100" ibaddr_rkba
integer range 15 downto 13 rkda_ibf_drsel
slv16 :=( others => '0') MEM_DIN
integer := 10 rkmr_ibf_sbclr
integer range 15 downto 5 rker_ibf_he
integer := 4 rkds_ibf_scsa
regs_type :=( '0', s_init,( others => '0'),( others => '0'), '0', '0', '0', '0', '0', '1', '0',( others => '0'), '0',( others => '0'),( others => '0'),( others => '0'),( others => '0'), '0', '1') regs_init
integer range 3 downto 0 rkds_ibf_sc
slv4 :=( others => '0') MEM_ADDR
integer := 9 rkmr_ibf_creset
integer := 1 rker_ibf_cse
slv3 := "110" func_dreset
slv3 := "010" ibaddr_rkcs
integer range 7 downto 0 rkmr_ibf_sdone
slv3 := "011" ibaddr_rkwc
integer range 15 downto 13 rkmr_ibf_rid
slv16 := slv( to_unsigned( 8#177400#, 16) ) ibaddr_rk11
integer := 13 rkcs_ibf_scp
regs_type := regs_init R_REGS
integer range 3 downto 1 rkcs_ibf_func
slv3 := "000" func_creset
integer := 7 rkcs_ibf_rdy
(s_idle,s_init) state_type
integer := 14 rkcs_ibf_he
integer range 15 downto 13 rkds_ibf_id
integer := 0 rker_ibf_wce
integer := 6 rkds_ibf_adry
integer := 12 rkcs_ibf_maint
slv3 := "101" ibaddr_rkda
slv3 := "110" ibaddr_rkmr
integer := 8 rkmr_ibf_fdone
integer := 15 rkcs_ibf_err
slv3 := "000" ibaddr_rkds
in ADDR slv( AWIDTH- 1 downto 0)
out DO slv( DWIDTH- 1 downto 0)
in DI slv( DWIDTH- 1 downto 0)
std_logic_vector( 3 downto 0) slv4
std_logic_vector( 2 downto 0) slv3
std_logic_vector( 15 downto 0) slv16
std_logic_vector( 7 downto 0) slv8