76use ieee.std_logic_1164.
all;
77use ieee.numeric_std.
all;
192 report "assert (SWIDTH<=16)"
195 report "assert (BWIDTH<=8)"
198 report "assert (LWIDTH<=16)"
202 report "assert(DCWIDTH=2 or DCWIDTH=3): unsupported DCWIDTH"
231 if rising_edge(CLK) then
239 end process proc_regs;
247 variable irb_ack : slbit := '0';
248 variable irb_busy : slbit := '0';
249 variable irb_err : slbit := '0';
250 variable irb_dout : slv16 := (others=>'0');
251 variable irbena : slbit := '0';
261 irb_dout := (others=>'0');
268 n.btn := (others=>'0');
277 if r.rbsel = '1' then
280 case RB_MREQ.addr(2 downto 0) is
309 n.btn := RB_MREQ.din(n.btn'range);
315 n.swi := RB_MREQ.din(n.swi'range);
319 irb_dout(r.ledin'range) := r.ledin;
321 n.led := RB_MREQ.din(n.led'range);
327 n.dsp_dp := RB_MREQ.din(n.dsp_dp'range);
349 if r.swi_en = '0' then
355 if r.led_en = '0' then
361 if r.dp_en = '0' then
367 if r.dsp0_en = '0' then
374 if r.dsp1_en = '0' then
395 end process proc_next;
std_logic_vector( 2 downto 0) slv3
std_logic_vector( 15 downto 0) slv16
std_logic_vector( 7 downto 0) slv8
slv( LWIDTH- 1 downto 0) :=( others => '0') HIO_LED
integer range 14 downto 12 stat_rbf_hdig
integer := 1 cntl_rbf_led_en
integer range 4*( 2** DCWIDTH)- 1 downto 4*( 2** DCWIDTH)- 16 dspdat_msb
slv3 := "111" rbaddr_dsp1
slv( LWIDTH- 1 downto 0) :=( others => '0') ledzero
slv( 4*( 2** DCWIDTH)- 1 downto 0) :=( others => '0') datzero
integer := 4 cntl_rbf_dsp1_en
integer := 2 cntl_rbf_dp_en
slv3 := "001" rbaddr_cntl
integer range 7 downto 4 stat_rbf_hbtn
regs_type := regs_init N_REGS
slv( BWIDTH- 1 downto 0) :=( others => '0') HIO_BTN
slv( SWIDTH- 1 downto 0) :=( others => '0') HIO_SWI
slv3 := "110" rbaddr_dsp0
slv(( 2** DCWIDTH)- 1 downto 0) :=( others => '0') HIO_DSP_DP
slv( BWIDTH- 1 downto 0) :=( others => '0') btnzero
slv(( 2** DCWIDTH)- 1 downto 0) :=( others => '0') dpzero
slv( 4*( 2** DCWIDTH)- 1 downto 0) :=( others => '0') HIO_DSP_DAT
integer range 11 downto 8 stat_rbf_hled
regs_type := regs_init R_REGS
slv( SWIDTH- 1 downto 0) :=( others => '0') swizero
integer range 15 downto 0 dspdat_lsb
integer range 3 downto 0 stat_rbf_hswi
integer := 3 cntl_rbf_dsp0_en
integer := 0 cntl_rbf_swi_en
regs_type :=( '0', swizero, btnzero, ledzero, datzero, dpzero, ledzero, swizero, btnzero, ledzero, datzero, dpzero, '0', '0', '0', '0', '0') regs_init
slv3 := "000" rbaddr_stat
integer := 15 stat_rbf_emu
in DSP_DP slv(( 2** DCWIDTH)- 1 downto 0)
out O_LED slv( LWIDTH- 1 downto 0)
in DSP_DAT slv( 4*( 2** DCWIDTH)- 1 downto 0)
out SWI slv( SWIDTH- 1 downto 0)
in I_BTN slv( BWIDTH- 1 downto 0)
in I_SWI slv( SWIDTH- 1 downto 0)
out BTN slv( BWIDTH- 1 downto 0)
out O_ANO_N slv(( 2** DCWIDTH)- 1 downto 0)
in LED slv( LWIDTH- 1 downto 0)
in DSP_DP slv(( 2** DCWIDTH)- 1 downto 0)
out O_LED slv( LWIDTH- 1 downto 0)
in DSP_DAT slv( 4*( 2** DCWIDTH)- 1 downto 0)
out SWI slv( SWIDTH- 1 downto 0)
in I_BTN slv( BWIDTH- 1 downto 0)
in I_SWI slv( SWIDTH- 1 downto 0)
out BTN slv( BWIDTH- 1 downto 0)
out O_ANO_N slv(( 2** DCWIDTH)- 1 downto 0)
in LED slv( LWIDTH- 1 downto 0)