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

Code_coverage: condition RTL with the IS_XLEN64 parameter #1666

Merged

Conversation

AEzzejjari
Copy link
Member

Condition RTL with IS_XLEN64 parameter to identify the dead code and remove the dead gates from netlist.

Based on if() directives, VCS is able to identify the unused code, this will allow to improuve code coverage.

Copy link
Contributor

github-actions bot commented Dec 1, 2023

❌ failed run, report available here.

@@ -284,9 +284,6 @@ module alu
endcase
end
unique case (fu_data_i.operation)
// Left Shift 32 bit unsigned
SLLIUW:
result_o = {{riscv::XLEN-32{1'b0}}, fu_data_i.operand_a[31:0]} << fu_data_i.operand_b[5:0];
// Integer minimum/maximum
MAX: result_o = less ? fu_data_i.operand_b : fu_data_i.operand_a;
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
MAX: result_o = less ? fu_data_i.operand_b : fu_data_i.operand_a;
MAX: result_o = less ? fu_data_i.operand_b : fu_data_i.operand_a;

core/alu.sv Outdated

default: ; // default case to suppress unique warning
// Left Shift 32 bit unsigned
default: if(fu_data_i.operation == SLLIUW && riscv::IS_XLEN64) result_o = {{riscv::XLEN-32{1'b0}}, fu_data_i.operand_a[31:0]} << fu_data_i.operand_b[5:0]; // default case to suppress unique warning
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
default: if(fu_data_i.operation == SLLIUW && riscv::IS_XLEN64) result_o = {{riscv::XLEN-32{1'b0}}, fu_data_i.operand_a[31:0]} << fu_data_i.operand_b[5:0]; // default case to suppress unique warning
default:
if (fu_data_i.operation == SLLIUW && riscv::IS_XLEN64)
result_o = {{riscv::XLEN-32{1'b0}}, fu_data_i.operand_a[31:0]} << fu_data_i.operand_b[5:0]; // default case to suppress unique warning

core/cache_subsystem/wt_axi_adapter.sv Outdated Show resolved Hide resolved
@@ -205,7 +205,7 @@ module wt_axi_adapter
2'b10:
axi_wr_be[0][dcache_data.paddr[$clog2(CVA6Cfg.AxiDataWidth/8)-1:0]+:4] = '1; // word
default:
axi_wr_be[0][dcache_data.paddr[$clog2(CVA6Cfg.AxiDataWidth/8)-1:0]+:8] = '1; // dword
if (riscv::IS_XLEN64) axi_wr_be[0][dcache_data.paddr[$clog2(CVA6Cfg.AxiDataWidth/8)-1:0]+:8] = '1; // dword
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 (riscv::IS_XLEN64) axi_wr_be[0][dcache_data.paddr[$clog2(CVA6Cfg.AxiDataWidth/8)-1:0]+:8] = '1; // dword
if (riscv::IS_XLEN64)
axi_wr_be[0][dcache_data.paddr[$clog2(
CVA6Cfg.AxiDataWidth/8
)-1:0]+:8] = '1; // dword

Copy link
Contributor

github-actions bot commented Dec 4, 2023

✔️ successful run, report available here.

1 similar comment
Copy link
Contributor

github-actions bot commented Dec 4, 2023

✔️ successful run, report available here.

core/alu.sv Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Dec 4, 2023

❌ failed run, report available here.

AEzzejjari and others added 2 commits December 4, 2023 15:51
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
core/alu.sv Outdated
@@ -344,7 +341,7 @@ module alu
ORCB: result_o = orcbw_result;
REV8: result_o = rev8w_result;

default: ; // default case to suppress unique warning
default: if(fu_data_i.operation == SLLIUW && riscv::IS_XLEN64) result_o = {{riscv::XLEN-32{1'b0}}, fu_data_i.operand_a[31:0]} << fu_data_i.operand_b[5:0]; // Left Shift 32 bit unsigned
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
default: if(fu_data_i.operation == SLLIUW && riscv::IS_XLEN64) result_o = {{riscv::XLEN-32{1'b0}}, fu_data_i.operand_a[31:0]} << fu_data_i.operand_b[5:0]; // Left Shift 32 bit unsigned
default:
if (fu_data_i.operation == SLLIUW && riscv::IS_XLEN64)
result_o = {{riscv::XLEN-32{1'b0}}, fu_data_i.operand_a[31:0]} << fu_data_i.operand_b[5:0]; // Left Shift 32 bit unsigned

Copy link
Contributor

github-actions bot commented Dec 4, 2023

✔️ successful run, report available here.

1 similar comment
Copy link
Contributor

github-actions bot commented Dec 4, 2023

✔️ successful run, report available here.

@JeanRochCoulon JeanRochCoulon merged commit 3720295 into openhwgroup:master Dec 4, 2023
14 checks passed
@AEzzejjari AEzzejjari deleted the Xlen64_Delete branch December 19, 2023 15:15
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