mirror of
https://github.com/sxpert/hp-saturn
synced 2024-12-26 09:58:09 +01:00
pipeline rstk_ptr calculations for push
This commit is contained in:
parent
e1aa24d006
commit
12f542441d
2 changed files with 4 additions and 4 deletions
|
@ -202,7 +202,7 @@ always @(posedge i_clk) begin
|
||||||
end
|
end
|
||||||
|
|
||||||
`ifdef SIM
|
`ifdef SIM
|
||||||
if (cycle_ctr == 148) begin
|
if (cycle_ctr == 202) begin
|
||||||
bus_halt <= 1'b1;
|
bus_halt <= 1'b1;
|
||||||
$display("BUS %0d: [%d] enough cycles for now", phase, cycle_ctr);
|
$display("BUS %0d: [%d] enough cycles for now", phase, cycle_ctr);
|
||||||
end
|
end
|
||||||
|
|
|
@ -219,9 +219,9 @@ always @(posedge i_clk) begin
|
||||||
// o_reload_pc <= 1'b1;
|
// o_reload_pc <= 1'b1;
|
||||||
reg_PC <= jump_relative ? jump_next_offset + jump_base : jump_next_offset;
|
reg_PC <= jump_relative ? jump_next_offset + jump_base : jump_next_offset;
|
||||||
if (i_push_pc) begin
|
if (i_push_pc) begin
|
||||||
$write(" ( push %5h => RSTK[%0d] )", reg_PC, reg_rstk_ptr + 3'd1);
|
$write(" ( push %5h => RSTK[%0d] )", reg_PC, rstk_ptr_to_push_at);
|
||||||
reg_RSTK[(reg_rstk_ptr + 3'o1)&3'o7] <= reg_PC;
|
reg_RSTK[rstk_ptr_to_push_at] <= reg_PC;
|
||||||
reg_rstk_ptr <= reg_rstk_ptr + 3'd1;
|
reg_rstk_ptr <= rstk_ptr_to_push_at;
|
||||||
end
|
end
|
||||||
$write("\n");
|
$write("\n");
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue