minor comment/documentation cleanups
This commit is contained in:
parent
a9412d1339
commit
caa07474f8
4 changed files with 11 additions and 15 deletions
|
|
@ -399,7 +399,10 @@ module stackcpu #(parameter ADDR_WIDTH = 32, WIDTH = 32,
|
|||
// process irq
|
||||
always @(posedge clk)
|
||||
begin
|
||||
if(seq_state == MEM && irq_pending && !(ins_xfer & xfer_r2p)) // in FETCH state, clear irq_pending.
|
||||
// in MEM state, clear irq_pending, when nPC has been set to IV
|
||||
// RET instruction is a special case because we need to use
|
||||
// the new PC that is in mem_data
|
||||
if(seq_state == MEM && irq_pending && !(ins_xfer && xfer_r2p))
|
||||
irq_pending <= 0;
|
||||
else
|
||||
irq_pending <= irq_pending || irq; // else set irq_pending when irq is high
|
||||
|
|
|
|||
|
|
@ -278,6 +278,9 @@ module top(
|
|||
(io_slot == 4) ? tdraudio_rd_data:
|
||||
`endif
|
||||
-1;
|
||||
irqctrl irqctrl0(`clock, irq_in, irqc_cs, mem_write_enable,
|
||||
irqc_seten, irqc_rd_data0,
|
||||
irq);
|
||||
|
||||
// CPU -----------------------------------------------------------------
|
||||
stackcpu cpu0(.clk(`clock), .rst(rst), .irq(irq),
|
||||
|
|
@ -288,10 +291,6 @@ module top(
|
|||
.mem_wait(mem_wait),
|
||||
.debug1(led1), .debug2(led2), .debug3(led3));
|
||||
|
||||
// Interrupt Controller
|
||||
irqctrl irqctrl0(`clock, irq_in, irqc_cs, mem_write_enable,
|
||||
irqc_seten, irqc_rd_data0,
|
||||
irq);
|
||||
|
||||
// count clock ticks
|
||||
// generate interrupt every 20nth of a second
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue