mirror of
https://github.com/sxpert/hp-saturn
synced 2025-01-20 10:26:31 +01:00
C=P n and SETHEX / SETDEC
This commit is contained in:
parent
ebbea44c50
commit
6126bddc90
1 changed files with 21 additions and 0 deletions
21
saturn_alu.v
21
saturn_alu.v
|
@ -852,6 +852,11 @@ always @(posedge i_clk) begin
|
||||||
P <= i_imm_value;
|
P <= i_imm_value;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if (start_in_p_mode && op_copy_p_to_c) begin
|
||||||
|
$display("ALU %0d: [%d] C=P %h", phase, i_cycle_ctr, i_field_start);
|
||||||
|
C[i_field_start] <= P;
|
||||||
|
end
|
||||||
|
|
||||||
/* ST=[01] <bit>
|
/* ST=[01] <bit>
|
||||||
*/
|
*/
|
||||||
if (start_in_st_bit_mode) begin
|
if (start_in_st_bit_mode) begin
|
||||||
|
@ -1036,6 +1041,22 @@ always @(posedge i_clk) begin
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
*
|
||||||
|
* execute SETHEX and SETDEC
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
always @(posedge i_clk) begin
|
||||||
|
if (i_reset)
|
||||||
|
DEC <= 0;
|
||||||
|
|
||||||
|
// changing calculation modes
|
||||||
|
if (alu_active && phase_3 && i_ins_set_mode) begin
|
||||||
|
$display("ALU %0d: [%d] setting calulation mode to %s", phase, i_cycle_ctr, i_mode_dec?"DEC":"HEX");
|
||||||
|
DEC <= i_mode_dec;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue