Added fix for 1-cycle RDY bug
This commit is contained in:
15
cpu.v
15
cpu.v
@@ -836,15 +836,6 @@ always @(posedge clk )
|
|||||||
* time to read the IR again before the next decode.
|
* time to read the IR again before the next decode.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
reg RDY1 = 1;
|
|
||||||
|
|
||||||
always @(posedge clk )
|
|
||||||
RDY1 <= RDY;
|
|
||||||
|
|
||||||
always @(posedge clk )
|
|
||||||
if( ~RDY && RDY1 )
|
|
||||||
DIHOLD <= DI;
|
|
||||||
|
|
||||||
always @(posedge clk )
|
always @(posedge clk )
|
||||||
if( reset )
|
if( reset )
|
||||||
IRHOLD_valid <= 0;
|
IRHOLD_valid <= 0;
|
||||||
@@ -859,7 +850,11 @@ always @(posedge clk )
|
|||||||
assign IR = (IRQ & ~I) | NMI_edge ? 8'h00 :
|
assign IR = (IRQ & ~I) | NMI_edge ? 8'h00 :
|
||||||
IRHOLD_valid ? IRHOLD : DIMUX;
|
IRHOLD_valid ? IRHOLD : DIMUX;
|
||||||
|
|
||||||
assign DIMUX = ~RDY1 ? DIHOLD : DI;
|
always @(posedge clk )
|
||||||
|
if( RDY )
|
||||||
|
DIHOLD <= DI;
|
||||||
|
|
||||||
|
assign DIMUX = ~RDY ? DIHOLD : DI;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Microcode state machine
|
* Microcode state machine
|
||||||
|
|||||||
Reference in New Issue
Block a user