Do not set ABH/ABL in push/pull to avoid wrong PC being pushed if IRQ follows
This commit is contained in:
11
cpu.v
11
cpu.v
@@ -410,10 +410,13 @@ always @*
|
||||
* This can be used to keep the current address, freeing up the original
|
||||
* source of the address, such as the ALU or DI.
|
||||
*/
|
||||
always @(posedge clk) begin
|
||||
ABL <= AB[7:0];
|
||||
ABH <= AB[15:8];
|
||||
end
|
||||
always @(posedge clk)
|
||||
if( state != PUSH0 && state != PUSH1 &&
|
||||
state != PULL0 && state != PULL1 && state != PULL2 )
|
||||
begin
|
||||
ABL <= AB[7:0];
|
||||
ABH <= AB[15:8];
|
||||
end
|
||||
|
||||
/*
|
||||
* Data Out MUX
|
||||
|
||||
Reference in New Issue
Block a user