22use ieee.std_logic_1164.
all;
23use ieee.numeric_std.
all;
230 pure function toint (val : slv3) return integer is
232 return to_integer(unsigned(val));
237 report "assert(AWIDTH>=5 and AWIDTH<=7): unsupported AWIDTH"
298 if rising_edge(CLK) then
314 end process proc_regs;
321 variable idout : slv16 := (others=>'0');
322 variable ibreq : slbit := '0';
323 variable iback : slbit := '0';
324 variable ibrd : slbit := '0';
325 variable ibwr : slbit := '0';
326 variable ibw0 : slbit := '0';
327 variable ibw1 : slbit := '0';
328 variable ilam : slbit := '0';
329 variable irbufdi : slv12 := (others=>'0');
330 variable irbufce : slbit := '0';
331 variable irbufwe : slbit := '0';
332 variable irbufrst : slbit := '0';
333 variable irrlimsta : slbit := '0';
334 variable itbufdi : slv13 := (others=>'0');
335 variable itbufce : slbit := '0';
336 variable itbufwe : slbit := '0';
337 variable itbufrst : slbit := '0';
338 variable itrlimsta : slbit := '0';
339 variable ixbuffull : slbit := '0';
340 variable iscntclr : slbit := '0';
346 idout := (others=>'0');
348 iback := r.ibsel and ibreq;
354 irbufdi := (others=>'0');
357 irbufrst := RESET and not r.mse;
359 itbufdi := (others=>'0');
364 iscntclr := not r.mse;
367 if r.maint = '0' then
385 if r.ibsel = '1' then
394 case IB_MREQ.addr(2 downto 1) is
446 n.ssel := slv(unsigned(r.ssel) + 1);
475 if r.mse='1' and r.maint='0' then
498 case IB_MREQ.addr(2 downto 1) is
514 if r.tie='0' and r.trdy='1' then
529 ((r.sae='0' and r.rdone='1') or
530 (r.sae='1' and r.sa='1'))
561 if r.rdone = '1' then
614 if r.maint = '0' then
621 if r.rxon(toint(r.tline)) = '1' then
635 if iscntclr = '1' then
636 n.scnt := (others=>'0');
637 elsif irbufwe = '1' then
638 if r.scnt(4) = '0' then
639 n.scnt := slv(unsigned(r.scnt) + 1);
647 if r.rdone = '0' then
658 if r.rdone = '0' then
675 if r.maint = '0' then
682 if (r.qdtr or r.qbrk or r.qrxon or r.qcsr) = '0' then
683 if r.mse = '1' and r.trdy = '0' then
684 if r.lena(toint(r.lcnt)) = '1' then
694 n.lcnt := slv(unsigned(r.lcnt) + 1);
708 elsif r.qbrk = '1' then
714 elsif r.qrxon = '1' then
720 elsif r.qcsr='1' or r.qclr='1' then
734 if itbufce='1' and itbufwe='1' then
771 end process proc_next;
out DO slv( DWIDTH- 1 downto 0)
in DI slv( DWIDTH- 1 downto 0)
out SIZE slv( AWIDTH- 1 downto 0)
integer range 10 downto 8 cntl_ibf_trlim
slv( AWIDTH- 1 downto 0) :=( others => '0') RBUF_FUSE
integer := 15 csr_ibf_trdy
integer range 10 downto 8 fdat_ibf_line
integer range 7 downto 0 fbuf_ibf_data
integer range AWIDTH- 1 downto 0 fuse_ibf_tsize
integer := 14 csr_ibf_tie
integer range 10 downto 8 srlcn_ibf_trlim
integer := 15 rbuf_ibf_val
integer := 7 srlcn_ibf_rir
regs_type :=( '0', "00", "000", "000",( others => '0'),( others => '0'),( others => '0'),( others => '0'),( others => '0'),( others => '0'), '0', '0', '0', '0', "000", '0', '0', '0', '0', '0', '0',( others => '0'),( others => '0'), '0', '0', '0', '0', '0', '0', '0') regs_init
integer range 10 downto 8 fbuf_ibf_line
integer := 13 fdat_ibf_ferr
integer range 14 downto 12 cntl_ibf_rrlim
slv( AWIDTH- 1 downto 0) := slv( to_unsigned( 1, AWIDTH) ) c_fuse1
integer := 12 csr_ibf_sae
slv2 := "11" ibaddr_msr_tdr
integer range 14 downto 12 srlcn_ibf_rrlim
slv12 :=( others => '0') RBUF_DI
integer range 4 downto 3 cntl_ibf_ssel
slv13 :=( others => '0') TBUF_DO
regs_type := regs_init N_REGS
integer range 15 downto 8 msr_ibf_co
integer range 7 downto 0 msr_ibf_ring
slv13 :=( others => '0') TBUF_DI
integer range 15 downto 8 tcr_ibf_dtr
integer := 3 csr_ibf_maint
integer range 10 downto 8 rbuf_ibf_line
integer := 12 lpr_ibf_rxon
integer := 7 cntl_ibf_sam
integer := 7 csr_ibf_rdone
integer range 7 downto 0 rbuf_ibf_data
integer range 10 downto 8 cntl_ibf_awdth
integer := 6 srlcn_ibf_tir
integer := 14 fdat_ibf_last
integer range 7 downto 0 tdr_ibf_tbuf
integer range 15 downto 8 scori_ibf_co
integer := 5 cntl_ibf_tclr
integer := 5 srlcn_ibf_mse
integer range 7 downto 0 scori_ibf_ring
regs_type := regs_init R_REGS
integer := 3 srlcn_ibf_maint
integer := 6 cntl_ibf_rclr
integer range 15 downto 8 cntl_ibf_data
integer range 15 downto 8 sdlle_ibf_dtr
slv2 := "01" ibaddr_rbuf_lpr
integer range 2 downto 0 cntl_ibf_func
integer range 7 downto 0 sbrrx_ibf_rxon
integer := 11 fbuf_ibf_ferr
integer range 10 downto 8 csr_ibf_tline
integer range 15 downto 8 tdr_ibf_brk
integer range AWIDTH- 1+ 8 downto 8 fuse_ibf_rsize
slv12 :=( others => '0') RBUF_DO
integer range 7 downto 0 tcr_ibf_lena
integer := 12 fbuf_ibf_cal
integer := 2 cntl_ibf_mse
integer range 7 downto 0 fdat_ibf_data
integer := 11 fdat_ibf_cal
integer := 1 cntl_ibf_maint
slv( AWIDTH- 1 downto 0) :=( others => '0') TBUF_FUSE
integer range 15 downto 8 sbrrx_ibf_brk
integer := 13 rbuf_ibf_ferr
integer range 2 downto 0 lpr_ibf_line
integer range 7 downto 0 sdlle_ibf_lena
integer := 15 fdat_ibf_val
IB_ADDR slv16 := slv( to_unsigned( 8#160100#, 16) )
std_logic_vector( 12 downto 0) slv13
std_logic_vector( 4 downto 0) slv5
std_logic_vector( 11 downto 0) slv12
std_logic_vector( 2 downto 0) slv3
std_logic_vector( 15 downto 0) slv16
std_logic_vector( 7 downto 0) slv8
std_logic_vector( 1 downto 0) slv2