53use ieee.std_logic_1164.
all;
54use ieee.numeric_std.
all;
148 ADDRA => R_REGS.laddr,
149 ADDRB => R_REGS.laddr_1,
158 if rising_edge(CLK) then
165 end process proc_regs;
170 variable irb_ack : slbit := '0';
171 variable irb_busy : slbit := '0';
172 variable irb_err : slbit := '0';
173 variable irb_dout : slv16 := (others=>'0');
174 variable irbena : slbit := '0';
175 variable ibramen : slbit := '0';
176 variable ibramdi : slv32 := (others=>'0');
177 variable laddr_we : slbit := '0';
178 variable laddr_clr : slbit := '0';
179 variable laddr_inc : slbit := '0';
188 irb_dout := (others=>'0');
206 if r.rbsel = '1' then
210 case RB_MREQ.addr(1 downto 0) is
224 n.rdiv := RB_MREQ.din(n.rdiv'range);
238 if r.go='0' and r.clr='0' and r.state=s_idle then
239 n.waddr := not r.waddr;
240 if r.waddr = '1' then
253 if r.rbsel = '1' then
254 case RB_MREQ.addr(1 downto 0) is
261 irb_dout(r.rdiv'range) := r.rdiv;
267 when '1' => irb_dout := BRAM_DOA(31 downto 16);
268 when '0' => irb_dout := BRAM_DOA(15 downto 0);
284 elsif r.go = '1' and RXSD='0' then
300 if (r.ena01='1' and r.rxsd_1='0' and RXSD='1') or
301 (r.ena10='1' and r.rxsd_1='1' and RXSD='0') then
306 if unsigned(r.rdiv)=0 or unsigned(r.rdivcnt)=0 then
308 if unsigned(r.laddr) /= (2**r.laddr'length)-1 then
312 n.rdivcnt := slv(unsigned(r.rdivcnt) - 1);
319 if unsigned(r.laddr) = (2**r.laddr'length)-1 then
327 if laddr_we = '1' then
329 elsif laddr_clr = '1' then
330 n.laddr := (others=>'0');
331 elsif laddr_inc = '1' then
332 n.laddr := slv(unsigned(r.laddr) + 1);
335 n.laddr_1 := r.laddr;
338 ibramdi := (others=>'0');
339 if r.memclr = '0' then
353 end process proc_next;
in DIA slv( DWIDTH- 1 downto 0)
in ADDRB slv( AWIDTH- 1 downto 0)
in ADDRA slv( AWIDTH- 1 downto 0)
out DOB slv( DWIDTH- 1 downto 0)
in DIB slv( DWIDTH- 1 downto 0)
out DOA slv( DWIDTH- 1 downto 0)
slv32 :=( others => '0') BRAM_DIB
regs_type :=( s_idle, '0', '0', '0', '0', '0',( others => '0'),( others => '0'), '0',( others => '0'), '0', '0', '0',( others => '0')) regs_init
integer := 1 cntl_rbf_clr
slv32 :=( others => '0') BRAM_DOA
(s_idle,s_char,s_clr) state_type
integer := 3 cntl_rbf_ena01
regs_type := regs_init R_REGS
integer range 9 downto 1 addr_rbf_laddr
integer := 2 cntl_rbf_ena10
slv32 :=( others => '0') BRAM_DIA
integer := 0 addr_rbf_waddr
RB_ADDR slv16 :=( others => '0')
RDIV slv8 :=( others => '0')
std_logic_vector( 8 downto 0) slv9
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