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
|
* This can be used to keep the current address, freeing up the original
|
||||||
* source of the address, such as the ALU or DI.
|
* source of the address, such as the ALU or DI.
|
||||||
*/
|
*/
|
||||||
always @(posedge clk) begin
|
always @(posedge clk)
|
||||||
ABL <= AB[7:0];
|
if( state != PUSH0 && state != PUSH1 &&
|
||||||
ABH <= AB[15:8];
|
state != PULL0 && state != PULL1 && state != PULL2 )
|
||||||
end
|
begin
|
||||||
|
ABL <= AB[7:0];
|
||||||
|
ABH <= AB[15:8];
|
||||||
|
end
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Data Out MUX
|
* Data Out MUX
|
||||||
|
|||||||
Reference in New Issue
Block a user