78use ieee.std_logic_1164.
all;
79use ieee.numeric_std.
all;
208 '0','0','0','0','0','0',
233 report "assert(AWIDTH>=9 and AWIDTH<=14): unsupported AWIDTH"
264 if rising_edge(CLK) then
271 end process proc_regs;
276 variable iib_ack : slbit := '0';
277 variable iib_busy : slbit := '0';
278 variable iib_dout : slv16 := (others=>'0');
279 variable iibena : slbit := '0';
280 variable ibramen : slbit := '0';
281 variable ibramwe : slbit := '0';
282 variable ibtake : slbit := '0';
283 variable laddr_inc : slbit := '0';
284 variable idat0 : slv16 := (others=>'0');
285 variable idat1 : slv16 := (others=>'0');
286 variable idat2 : slv16 := (others=>'0');
287 variable idat3 : slv16 := (others=>'0');
288 variable iaddrinc : slv(AWIDTH-1 downto 0) := (others=>'0');
289 variable iaddroff : slv(AWIDTH-1 downto 0) := (others=>'0');
297 iib_dout := (others=>'0');
314 if r.ibsel = '1' and IB_MREQ.racc='1' then
318 case IB_MREQ.addr(3 downto 1) is
378 if IB_MREQ.re = '1' and r.go = '0' then
379 n.waddr := slv(unsigned(r.waddr) + 1);
380 if r.waddr = "11" then
392 if r.ibsel = '1' then
393 case IB_MREQ.addr(3 downto 1) is
417 when "11" => iib_dout := BRAM1_DO(31 downto 16);
418 when "10" => iib_dout := BRAM1_DO(15 downto 0);
419 when "01" => iib_dout := BRAM0_DO(31 downto 16);
420 when "00" => iib_dout := BRAM0_DO(15 downto 0);
432 if IB_MREQ.aval='1' and r.aval_1='0' then
435 if IB_MREQ.addr = r.ibaddr then
439 if unsigned(IB_MREQ.addr)>=unsigned(r.lolim) and
440 unsigned(IB_MREQ.addr)<=unsigned(r.hilim) then
447 if IB_MREQ.aval='1' and iibena='1' then
457 if IB_MREQ.aval='1' and iibena='1' then
458 if r.addrwind='1' and r.ibsel='0' then
460 (r.remena='1' and IB_MREQ.racc='1') or
461 (r.conena='1' and IB_MREQ.cacc='1') then
475 if r.ibtake_1 = '0' then
478 n.ibnbusy := (others=>'0');
482 n.ibnbusy := slv(unsigned(r.ibnbusy) + 1);
489 n.arm1r := r.rcolr and IB_MREQ.re;
490 n.arm1w := r.rcolw and IB_MREQ.we;
491 n.arm2r := r.arm1r and r.addrsame and IB_MREQ.re;
492 n.arm2w := r.arm1w and r.addrsame and IB_MREQ.we;
493 n.rcol := ((r.arm2r and IB_MREQ.re) or
494 (r.arm2w and IB_MREQ.we)) and r.addrsame;
498 if r.go='1' and r.ibtake_1='1' then
504 if r.ibtake_1 = '1' then
505 n.ibndly := (others=>'0');
508 n.ibndly := slv(unsigned(r.ibndly) + 1);
517 iaddrinc := (others=>'0');
518 iaddroff := (others=>'0');
519 iaddrinc(0) := not (r.rcol and r.go);
520 iaddroff(0) := (r.rcol and r.go);
522 if laddr_inc = '1' then
523 n.laddr := slv(unsigned(r.laddr) + unsigned(iaddrinc));
526 if r.wstop = '1' then
532 idat3 := (others=>'0');
549 n.ibtake_1 := ibtake;
564 end process proc_next;
integer := 3 cntl_ibf_locena
integer := 13 dat0_ibf_racc
integer := 4 cntl_ibf_remena
integer := 15 dat3_ibf_burst
integer := 13 dat3_ibf_nak
integer := 11 dat3_ibf_busy
slv3 := "011" ibaddr_lolim
slv3 := "101" ibaddr_data
integer range 15 downto 13 stat_ibf_bsize
integer := 0 dat0_ibf_cacc
slv3 := "010" ibaddr_hilim
integer := 14 dat3_ibf_tout
regs_type := regs_init N_REGS
integer range 15 downto 13 iba_ibf_pref
integer := 6 cntl_ibf_wstop
slv3 := "001" ibaddr_stat
slv8 :=( others => '1') ibnbusylast
slv3 := "100" ibaddr_addr
integer := 15 dat0_ibf_be1
slv32 :=( others => '0') BRAM0_DI
integer := 5 cntl_ibf_conena
slv32 :=( others => '0') BRAM1_DI
slv( AWIDTH- 1 downto 0) :=( others => '1') laddrlast
slv3 := "000" ibaddr_cntl
integer range 2+ AWIDTH- 1 downto 2 addr_ibf_laddr
regs_type := regs_init R_REGS
integer := 1 stat_ibf_susp
integer range 12 downto 1 dat0_ibf_addr
slv( AWIDTH- 1 downto 0) :=( others => '0') BRAM_ADDR
slv16 :=( others => '1') ibndlylast
integer range 2 downto 0 cntl_ibf_func
integer := 0 stat_ibf_run
integer range 7 downto 0 dat3_ibf_nbusy
slv32 :=( others => '0') BRAM1_DO
integer := 12 dat3_ibf_ack
integer := 14 dat0_ibf_be0
integer range 1 downto 0 addr_ibf_waddr
integer := 7 cntl_ibf_rcolr
integer := 2 stat_ibf_wrap
regs_type :=( '0', '0', '0', '0', '1', '1', '1', '0', '1',( others => '1'),( others => '0'), '0', laddrzero, "00", '0', '0', '0', '0', '0', '0', '0', '0', '0',( others => '0'), '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0',( others => '0'),( others => '0'),( others => '0')) regs_init
slv32 :=( others => '0') BRAM0_DO
slv( AWIDTH- 1 downto 0) :=( others => '0') laddrzero
integer := 8 cntl_ibf_rcolw
integer range 12 downto 1 iba_ibf_addr
integer := 8 dat3_ibf_rmw
in IB_SRES_SUM ib_sres_type
IB_ADDR slv16 := slv( to_unsigned( 8#160000#, 16) )
in ADDR slv( AWIDTH- 1 downto 0)
out DO slv( DWIDTH- 1 downto 0)
in DI slv( DWIDTH- 1 downto 0)
std_logic_vector( 2 downto 0) slv3
std_logic_vector( 12 downto 1) slv13_1
std_logic_vector( 31 downto 0) slv32
std_logic_vector( 15 downto 0) slv16
std_logic_vector( 7 downto 0) slv8
std_logic_vector( 1 downto 0) slv2