Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ID stage to support ZCMP, ZCMT and CVXIF with Superscalar #2756

Conversation

Gchauvon
Copy link
Contributor

Add support for Superscalar with ZCMP, ZCMT and CVXIF.
ZCMP decoder, ZCMT decoder and CVXIF interface driver are using port 0.
Standard RVC and 32 bits instruction can take port 0 or 1.

Comment on lines 305 to 307
commit_ack_o[1] = 1'b0;
we_gpr_o[1] = 1'b0;
wdata_o[1] = commit_instr_i[1].result;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
commit_ack_o[1] = 1'b0;
we_gpr_o[1] = 1'b0;
wdata_o[1] = commit_instr_i[1].result;
commit_ack_o[1] = 1'b0;
we_gpr_o[1] = 1'b0;
wdata_o[1] = commit_instr_i[1].result;

core/cvxif_fu.sv Outdated
Comment on lines 69 to 70
if (CVA6Cfg.TvalEn)
x_exception_o.tval = x_off_instr_i; // TODO Optimization : Set exception in IRO.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
if (CVA6Cfg.TvalEn)
x_exception_o.tval = x_off_instr_i; // TODO Optimization : Set exception in IRO.
if (CVA6Cfg.TvalEn)
x_exception_o.tval = x_off_instr_i; // TODO Optimization : Set exception in IRO.

core/id_stage.sv Outdated
@@ -104,30 +104,52 @@ module id_stage #(
logic is_ctrl_flow;
} issue_struct_t;
issue_struct_t [CVA6Cfg.NrIssuePorts-1:0] issue_n, issue_q;
// stall required for ZCMP ZCMT CVXIF
logic [CVA6Cfg.NrIssuePorts-1:0] stall_instr_fetch;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
logic [CVA6Cfg.NrIssuePorts-1:0] stall_instr_fetch;
logic [CVA6Cfg.NrIssuePorts-1:0] stall_instr_fetch;

core/id_stage.sv Outdated
Comment on lines 116 to 120
logic [CVA6Cfg.NrIssuePorts-1:0] is_illegal_rvc;
logic [CVA6Cfg.NrIssuePorts-1:0][31:0] instruction_rvc;
logic [CVA6Cfg.NrIssuePorts-1:0] is_compressed_rvc;
logic [CVA6Cfg.NrIssuePorts-1:0] is_zcmt_instr;
logic [CVA6Cfg.NrIssuePorts-1:0] is_macro_instr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
logic [CVA6Cfg.NrIssuePorts-1:0] is_illegal_rvc;
logic [CVA6Cfg.NrIssuePorts-1:0][31:0] instruction_rvc;
logic [CVA6Cfg.NrIssuePorts-1:0] is_compressed_rvc;
logic [CVA6Cfg.NrIssuePorts-1:0] is_zcmt_instr;
logic [CVA6Cfg.NrIssuePorts-1:0] is_macro_instr;
logic [CVA6Cfg.NrIssuePorts-1:0] is_illegal_rvc;
logic [CVA6Cfg.NrIssuePorts-1:0][31:0] instruction_rvc;
logic [CVA6Cfg.NrIssuePorts-1:0] is_compressed_rvc;
logic [CVA6Cfg.NrIssuePorts-1:0] is_zcmt_instr;
logic [CVA6Cfg.NrIssuePorts-1:0] is_macro_instr;

core/id_stage.sv Outdated
Comment on lines 124 to 127
logic is_illegal_cvxif_i;
logic [31:0] instruction_cvxif_i;
logic is_compressed_cvxif_i;
logic stall_macro_deco;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
logic is_illegal_cvxif_i;
logic [31:0] instruction_cvxif_i;
logic is_compressed_cvxif_i;
logic stall_macro_deco;
logic is_illegal_cvxif_i;
logic [ 31:0] instruction_cvxif_i;
logic is_compressed_cvxif_i;
logic stall_macro_deco;

core/id_stage.sv Outdated
issue_n[1] = '{1'b1, decoded_instruction[1], orig_instr[1], is_control_flow_instr[1]};
if (fetch_entry_valid_i[1]) begin
fetch_entry_ready_o[1] = ~stall_instr_fetch[1];
issue_n[1] = '{decoded_instruction_valid[1], decoded_instruction[1], orig_instr[1], is_control_flow_instr[1]};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
issue_n[1] = '{decoded_instruction_valid[1], decoded_instruction[1], orig_instr[1], is_control_flow_instr[1]};
issue_n[1] = '{
decoded_instruction_valid[1],
decoded_instruction[1],
orig_instr[1],
is_control_flow_instr[1]
};

core/id_stage.sv Outdated
issue_n[1] = '{1'b1, decoded_instruction[0], orig_instr[0], is_control_flow_instr[0]};
end else if (fetch_entry_valid_i[0]) begin
fetch_entry_ready_o[0] = ~stall_instr_fetch[0];
issue_n[1] = '{decoded_instruction_valid[0], decoded_instruction[0], orig_instr[0], is_control_flow_instr[0]};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
issue_n[1] = '{decoded_instruction_valid[0], decoded_instruction[0], orig_instr[0], is_control_flow_instr[0]};
issue_n[1] = '{
decoded_instruction_valid[0],
decoded_instruction[0],
orig_instr[0],
is_control_flow_instr[0]
};

core/id_stage.sv Outdated
@@ -371,20 +397,20 @@ module id_stage #(
always_comb begin
issue_n = issue_q;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
issue_n = issue_q;
issue_n = issue_q;

core/id_stage.sv Outdated
Comment on lines 412 to 413
fetch_entry_ready_o[0] = ~stall_instr_fetch[0];
issue_n[0] = '{decoded_instruction_valid[0], decoded_instruction[0], orig_instr[0], is_control_flow_instr[0]};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
fetch_entry_ready_o[0] = ~stall_instr_fetch[0];
issue_n[0] = '{decoded_instruction_valid[0], decoded_instruction[0], orig_instr[0], is_control_flow_instr[0]};
fetch_entry_ready_o[0] = ~stall_instr_fetch[0];
issue_n[0] = '{
decoded_instruction_valid[0],
decoded_instruction[0],
orig_instr[0],
is_control_flow_instr[0]
};

core/id_stage.sv Outdated

endmodule
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
endmodule
endmodule

Copy link
Contributor

❌ failed run, report available here.

1 similar comment
Copy link
Contributor

❌ failed run, report available here.

Copy link
Contributor

github-actions bot commented Feb 3, 2025

❌ failed run, report available here.

@JeanRochCoulon JeanRochCoulon merged commit 2ef1c1b into openhwgroup:master Feb 3, 2025
12 checks passed
@JeanRochCoulon JeanRochCoulon deleted the dev/ZCMPTX_superscalar branch February 3, 2025 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants