92use ieee.std_logic_1164.
all;
93use ieee.numeric_std.
all;
168 if rising_edge(CLK) then
176 end process proc_regs;
183 variable irb_ack : slbit := '0';
184 variable irb_busy : slbit := '0';
185 variable irb_err : slbit := '0';
186 variable irb_dout : slv16 := (others=>'0');
187 variable irb_lam : slbit := '0';
188 variable irbena : slbit := '0';
190 variable icpuact : slbit := '0';
191 variable icpreq : slbit := '0';
192 variable icpaddr : cp_addr_type := cp_addr_init;
202 irb_dout := (others=>'0');
213 n.greset := RB_MREQ.din(c_init_rbf_greset);
228 if (r.rbselc='1' or r.rbseli='1') and irbena='1' then
239 if r.rbseli = '1' then
241 n.cpfunc := c_cpfunc_rmem;
246 elsif r.rbselc = '1' then
248 case RB_MREQ.addr(4 downto 0) is
250 when c_rbaddr_conf =>
253 when c_rbaddr_cntl =>
255 n.cpfunc := RB_MREQ.din(n.cpfunc'range);
259 if RB_MREQ.din(3 downto 0) = c_cpfunc_step(3 downto 0) then
264 when c_rbaddr_stat =>
265 irb_dout(c_stat_rbf_suspext) := CP_STAT.suspext;
266 irb_dout(c_stat_rbf_suspint) := CP_STAT.suspint;
267 irb_dout(c_stat_rbf_cpurust) := CP_STAT.cpurust;
268 irb_dout(c_stat_rbf_cpususp) := CP_STAT.cpususp;
269 irb_dout(c_stat_rbf_cpugo) := CP_STAT.cpugo;
270 irb_dout(c_stat_rbf_cmdmerr) := CP_STAT.cmdmerr;
271 irb_dout(c_stat_rbf_cmderr) := CP_STAT.cmderr;
275 n.cpfunc := c_cpfunc_rpsw;
281 irb_dout(c_al_rbf_addr) := r.addr(c_al_rbf_addr);
283 n.addr := (others=>'0');
286 n.addr(c_al_rbf_addr) := RB_MREQ.din(c_al_rbf_addr);
290 irb_dout(c_ah_rbf_ena_ubmap) := r.ena_ubmap;
291 irb_dout(c_ah_rbf_ena_22bit) := r.ena_22bit;
292 irb_dout(c_ah_rbf_addr) := r.addr(21 downto 16);
294 n.addr(21 downto 16) := RB_MREQ.din(c_ah_rbf_addr);
295 n.ena_22bit := RB_MREQ.din(c_ah_rbf_ena_22bit);
296 n.ena_ubmap := RB_MREQ.din(c_ah_rbf_ena_ubmap);
301 n.cpfunc := c_cpfunc_rmem;
306 when c_rbaddr_memi =>
308 n.cpfunc := c_cpfunc_rmem;
314 when c_rbaddr_r0 | c_rbaddr_r1 |
315 c_rbaddr_r2 | c_rbaddr_r3 |
316 c_rbaddr_r4 | c_rbaddr_r5 |
317 c_rbaddr_sp | c_rbaddr_pc =>
319 n.cpfunc := c_cpfunc_rreg;
324 when c_rbaddr_membe =>
325 irb_dout(c_membe_rbf_be) := r.membe;
326 irb_dout(c_membe_rbf_stick) := r.membestick;
328 n.membe := RB_MREQ.din(c_membe_rbf_be);
329 n.membestick := RB_MREQ.din(c_membe_rbf_stick);
348 if (r.rbselc or r.rbseli)='0' or irbena='0' then
349 if r.cpfunc = c_cpfunc_wmem and
350 r.membestick = '0' then
358 if r.cpfunc = c_cpfunc_wmem and
359 r.membestick = '0' then
362 if r.doinc = '1' then
363 n.addr := slv(unsigned(r.addr) + 1);
365 if r.waitstep = '1' then
378 if r.rbselc='0' or irbena='0' then
391 icpaddr := cp_addr_init;
392 icpaddr.be := r.membe;
394 if r.rbseli = '0' then
395 icpaddr.addr := r.addr;
397 icpaddr.ena_22bit := r.ena_22bit;
398 icpaddr.ena_ubmap := r.ena_ubmap;
400 icpaddr.addr(15 downto 13) := "111";
401 icpaddr.addr(12 downto 1) := RB_MREQ.addr(11 downto 0);
403 icpaddr.ena_22bit := '0';
404 icpaddr.ena_ubmap := '0';
408 n.cpuact_1 := icpuact;
409 if (r.cpuact_1='1' and icpuact='0') then
436 end process proc_next;
regs_type :=( s_idle, '0', '0', '0', '0',( others => '0'), '0',( others => '0'), '0', '0', "11", '0', '0', '0') regs_init
(s_idle,s_cpwait,s_cpstep) state_type
regs_type := regs_init R_REGS
RB_ADDR_CORE slv16 := rbaddr_cpu0_core
RB_ADDR_IBUS slv16 := rbaddr_cpu0_ibus
std_logic_vector( 21 downto 1) slv22_1
std_logic_vector( 3 downto 0) slv4
std_logic_vector( 4 downto 0) slv5
std_logic_vector( 15 downto 0) slv16
std_logic_vector( 1 downto 0) slv2