Deassert pcpi_valid upon asserting sbreak IRQ

This fixes #8
This commit is contained in:
Steve Kerrison 2016-05-31 19:44:42 +01:00
parent d72b25993c
commit 38d51a3383
1 changed files with 2 additions and 0 deletions

View File

@ -1270,6 +1270,7 @@ module picorv32 #(
cpu_state <= cpu_state_fetch; cpu_state <= cpu_state_fetch;
end else end else
if (CATCH_ILLINSN && pcpi_timeout) begin if (CATCH_ILLINSN && pcpi_timeout) begin
pcpi_valid <= 0;
`debug($display("SBREAK OR UNSUPPORTED INSN AT 0x%08x", reg_pc);) `debug($display("SBREAK OR UNSUPPORTED INSN AT 0x%08x", reg_pc);)
if (ENABLE_IRQ && !irq_mask[irq_sbreak] && !irq_active) begin if (ENABLE_IRQ && !irq_mask[irq_sbreak] && !irq_active) begin
next_irq_pending[irq_sbreak] = 1; next_irq_pending[irq_sbreak] = 1;
@ -1419,6 +1420,7 @@ module picorv32 #(
cpu_state <= cpu_state_fetch; cpu_state <= cpu_state_fetch;
end else end else
if (CATCH_ILLINSN && pcpi_timeout) begin if (CATCH_ILLINSN && pcpi_timeout) begin
pcpi_valid <= 0;
`debug($display("SBREAK OR UNSUPPORTED INSN AT 0x%08x", reg_pc);) `debug($display("SBREAK OR UNSUPPORTED INSN AT 0x%08x", reg_pc);)
if (ENABLE_IRQ && !irq_mask[irq_sbreak] && !irq_active) begin if (ENABLE_IRQ && !irq_mask[irq_sbreak] && !irq_active) begin
next_irq_pending[irq_sbreak] = 1; next_irq_pending[irq_sbreak] = 1;