106use ieee.std_logic_1164.
all;
107use ieee.numeric_std.
all;
232 report "assert( (READ0,READ1,WRITE)DELAY-2 < 2**cntdly'length)"
237 report "assert( (READ0,READ1,WRITE)DELAY-2 >= 2 or 3)"
331 if rising_edge(CLK) then
339 end process proc_regs;
345 variable ibusy : slbit := '0';
346 variable iackw : slbit := '0';
347 variable iactr : slbit := '0';
348 variable iactw : slbit := '0';
349 variable imem_ce : slbit := '0';
350 variable imem_be : slv2 := "00";
351 variable imem_we : slbit := '0';
352 variable imem_oe : slbit := '0';
353 variable imem_cre : slbit := '0';
354 variable ibe_ce : slbit := '0';
355 variable iaddrh_ce : slbit := '0';
356 variable iaddr0_ce : slbit := '0';
357 variable iaddrh : slv22 := (others=>'0');
358 variable iaddr0 : slbit := '0';
359 variable idata_cei : slbit := '0';
360 variable idata_ceo : slbit := '0';
361 variable idata_oe : slbit := '0';
364 piaddrh_ce :
out slbit;
365 piaddr0_ce :
out slbit;
369 pimem_ce :
out slbit;
370 pimem_oe :
out slbit;
371 pnbe2nd :
out slv2)
is
384 if BE(1 downto 0) /= "00" then
386 pimem_be := BE(1 downto 0);
387 pnbe2nd := BE(3 downto 2);
390 pimem_be := BE(3 downto 2);
395 end procedure do_dispatch;
422 if unsigned(r.cntdly) /= 0 then
423 n.cntdly := slv(unsigned(r.cntdly) - 1);
454 if unsigned(r.cntdly) = 0 then
466 n.state := s_rawait ;
471 if unsigned(r.cntdly) = 0 then
477 do_dispatch(n.state, iaddrh_ce, iaddr0_ce, iaddr0,
478 ibe_ce, imem_be, imem_ce, imem_oe, n.be2nd);
487 n.state := s_rdwait0;
494 if unsigned(r.cntdly) = 0 then
507 n.state := s_rdwait1;
514 if unsigned(r.cntdly) = 0 then
524 if r.fidle = '1' then
528 do_dispatch(n.state, iaddrh_ce, iaddr0_ce, iaddr0,
529 ibe_ce, imem_be, imem_ce, imem_oe, n.be2nd);
542 n.state := s_wrwait0;
550 if unsigned(r.cntdly) = 0 then
557 if r.be2nd /= "00" then
567 if r.fidle = '1' then
571 do_dispatch(n.state, iaddrh_ce, iaddr0_ce, iaddr0,
572 ibe_ce, imem_be, imem_ce, imem_oe, n.be2nd);
585 n.state := s_wrwait1;
593 if unsigned(r.cntdly) = 0 then
601 if r.fidle = '1' then
605 do_dispatch(n.state, iaddrh_ce, iaddr0_ce, iaddr0,
606 ibe_ce, imem_be, imem_ce, imem_oe, n.be2nd);
613 if imem_ce = '0' then
614 n.cntce := (others=>'0');
617 if unsigned(r.cntce) >= 127 then
620 n.cntce := slv(unsigned(r.cntce) + 1);
624 if iaddrh_ce = '1' then
628 if iaddr0_ce = '1' then
640 if r.addr0 = '0' then
641 MEM_DI <= r.memdi(15 downto 0);
643 MEM_DI <= r.memdi(31 downto 16);
663 end process proc_next;
inout PAD slv( DWIDTH- 1 downto 0)
in DO slv( DWIDTH- 1 downto 0)
out DI slv( DWIDTH- 1 downto 0)
out PAD slv( DWIDTH- 1 downto 0)
in DO slv( DWIDTH- 1 downto 0)
regs_type :=( s_init, '0', '0', "00",( others => '0'),( others => '0'), '0',( others => '0'),( others => '0')) regs_init
do_dispatchpnstate,piaddrh_ce,piaddr0_ce,piaddr0,pibe_ce,pimem_be,pimem_ce,pimem_oe,pnbe2nd,
slv22 := "000"& "00"& "0000000000"& '1'& "00"& '1'& "000" c_addrh_rcr_setup
slv16 :=( others => '0') MEM_DO
slv22 :=( others => '0') ADDRH
regs_type := regs_init R_REGS
(s_init,s_init1,s_wcinit,s_wcwait,s_wcput,s_rainit,s_rawait,s_idle,s_rdinit,s_rdwait0,s_rdget0,s_rdwait1,s_rdget1,s_wrinit,s_wrwait0,s_wrput0,s_wrini1,s_wrwait1,s_wrput1) state_type
slv16 :=( others => '0') MEM_DI
std_logic_vector( 22 downto 0) slv23
std_logic_vector( 3 downto 0) slv4
std_logic_vector( 6 downto 0) slv7
std_logic_vector( 2 downto 0) slv3
std_logic_vector( 31 downto 0) slv32
std_logic_vector( 15 downto 0) slv16
std_logic_vector( 21 downto 0) slv22
std_logic_vector( 1 downto 0) slv2