52use ieee.std_logic_1164.
all;
53use ieee.numeric_std.
all;
151 if rising_edge(CLK) then
158 end process proc_regs;
163 variable irb_ack : slbit := '0';
164 variable irb_busy : slbit := '0';
165 variable irb_err : slbit := '0';
166 variable irb_dout : slv16 := (others=>'0');
167 variable irbena : slbit := '0';
168 variable irblam : slv16 := (others=>'0');
169 variable ififo_ce : slbit := '0';
170 variable ififo_we : slbit := '0';
171 variable ififo_reset : slbit := '0';
172 variable isbusy : slbit := '0';
181 irb_dout := (others=>'0');
182 irblam := (others=>'0');
191 if unsigned(r.cntbusy) /= 0 then
202 n.cntbusy := r.nbusy;
203 n.cntcyc := (others=>'0');
209 if r.rbsel = '1' then
212 if unsigned(r.cntbusy) /= 0 then
213 n.cntbusy := slv(unsigned(r.cntbusy) - 1);
216 n.cntcyc := slv(unsigned(r.cntcyc) + 1);
222 case RB_MREQ.addr(2 downto 0) is
232 n.stat := RB_MREQ.din(r.stat'range);
248 irb_busy := irbena and isbusy;
249 if RB_MREQ.we='1' and isbusy='0' then
255 irb_busy := irbena and isbusy;
262 n.data := slv(unsigned(r.data) + 1);
266 irb_busy := irbena and isbusy;
267 if RB_MREQ.re='1' and isbusy='0' then
274 if RB_MREQ.we='1' and isbusy='0' then
298 if r.rbsel = '1' then
299 irb_dout := "0101010101010101";
300 if RB_MREQ.re='1' and irb_busy='0' and irb_err='0' then
301 case RB_MREQ.addr(2 downto 0) is
303 irb_dout := (others=>'0');
307 irb_dout := (others=>'0');
308 irb_dout(r.stat'range) := r.stat;
311 irb_dout := (others=>'0');
312 irb_dout(r.cntcyc'range) := r.ncyc;
329 n.stat := (others=>'0');
330 n.nbusy := (others=>'0');
333 n.data := (others=>'0');
341 if irbena='0' and r.act_1='1' then
360 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 := 1 init_rbf_data
integer range 9 downto 0 cntl_rbf_nbusy
slv( awidth- 1 downto 0) :=( others => '0') FIFO_SIZE
regs_type := regs_init N_REGS
integer := 0 init_rbf_cntl
slv3 := "101" rbaddr_dinc
integer := 2 init_rbf_fifo
integer := 15 cntl_rbf_wchk
slv16 :=( others => '0') FIFO_DO
slv3 := "000" rbaddr_cntl
slv3 := "001" rbaddr_stat
slv3 := "110" rbaddr_fifo
regs_type := regs_init R_REGS
slv3 := "111" rbaddr_lnak
slv3 := "010" rbaddr_attn
slv3 := "100" rbaddr_data
regs_type :=( '0', '0',( others => '0'),( others => '0'),( others => '0'), '0',( others => '0'),( others => '0'),( others => '0')) regs_init
slv( regs_init.cntcyc'range ) :=( others => '1') cntcyc_max
slv3 := "011" rbaddr_ncyc
RB_ADDR slv16 := rbaddr_tester
std_logic_vector( 9 downto 0) slv10
std_logic_vector( 3 downto 0) slv4
std_logic_vector( 2 downto 0) slv3
std_logic_vector( 15 downto 0) slv16