47use ieee.std_logic_1164.
all;
48use ieee.numeric_std.
all;
131 report "assert (SWIDTH<=16)"
134 report "assert (BWIDTH<=8)"
137 report "assert (LWIDTH<=16)"
141 report "assert(DCWIDTH=2 or DCWIDTH=3): unsupported DCWIDTH"
147 if rising_edge(CLK) then
155 end process proc_regs;
162 variable irb_ack : slbit := '0';
163 variable irb_busy : slbit := '0';
164 variable irb_err : slbit := '0';
165 variable irb_dout : slv16 := (others=>'0');
166 variable irbena : slbit := '0';
176 irb_dout := (others=>'0');
185 n.btn := (others=>'0');
194 if r.rbsel = '1' then
197 case RB_MREQ.addr(2 downto 0) is
217 irb_dout(r.btn'range) := r.btn;
219 n.btn := RB_MREQ.din(n.btn'range);
223 irb_dout(r.swi'range) := r.swi;
225 n.swi := RB_MREQ.din(n.swi'range);
229 irb_dout(r.led'range) := r.led;
232 irb_dout(r.dsp_dp'range) := r.dsp_dp;
256 end process proc_next;
std_logic_vector( 2 downto 0) slv3
std_logic_vector( 15 downto 0) slv16
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
regs_type :=( '0', swizero, btnzero, ledzero, datzero, dpzero) regs_init
slv3 := "110" rbaddr_dsp0
slv( BWIDTH- 1 downto 0) :=( others => '0') btnzero
slv(( 2** DCWIDTH)- 1 downto 0) :=( others => '0') dpzero
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
slv3 := "000" rbaddr_stat
integer := 15 stat_rbf_emu
in DSP_DP slv(( 2** DCWIDTH)- 1 downto 0)
in DSP_DAT slv( 4*( 2** DCWIDTH)- 1 downto 0)
out SWI slv( SWIDTH- 1 downto 0)
out BTN slv( BWIDTH- 1 downto 0)
in LED slv( LWIDTH- 1 downto 0)