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

Add initial DCLS support and documentation #246

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

kgugala
Copy link
Member

@kgugala kgugala commented Oct 14, 2024

This PR adds a Dual Core Lockstep feature into VeeR CPU behind configuration options. The DCLS tracks inputs and outputs of the main CPU core and compares it with the expected states. There is a possibility to include and track copy of the register file in a shadow core. New feature is configurable via following flags:

  • -set lockstep_enable=1 that generates RV_LOCKSTEP_ENABLE which enables the DCLS feature,
  • -set lockstep_delay=<2-4> that generates RV_LOCKSTEP_DELAY which specifies the delay between the shadow core and the main core,
  • -set lockstep_regfile_enable=1 that generates RV_LOCKSTEP_REGFILE_ENABLE which exposes the register file to top level and adds it to the equvalency checker.

The Dual Core Lockstep is appended to the documentation and comes with a basic test for delayed reset functionality.

Additionally this PR includes a codebase cleanup:

  • removes reduntant imports from RTL,
  • assigns some hanging outputs to unused_* wires,
  • adds explicit lint waivers for VeeR codebase,
  • adds test-specific lint waivers for test wrappers,
  • builds complex test design using multiple CPU threads,
  • fixes simulation build for VCS.

.scan_mode(scan_mode)
);

assign corruption_detected = 0;

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
assign corruption_detected = 0;
assign corruption_detected = 0;

input logic o_cpu_halt_ack, // Core Acknowledge to Halt request
input logic o_cpu_halt_status, // 1'b1 indicates processor is halted
input logic o_cpu_run_ack, // Core Acknowledge to run request
input logic o_debug_mode_status, // Core to the PMU that core is in debug mode. When core is in debug mode, the PMU should refrain from sendng a halt or run request

Choose a reason for hiding this comment

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

⚠️ [verible-verilog-lint] reported by reviewdog 🐶
Line length exceeds max: 100; is: 168 [Style: line-length] [line-length]

input logic ic_rd_en,

input logic [pt.ICACHE_BANKS_WAY-1:0][70:0] ic_wr_data, // Data to fill to the Icache. With ECC
input logic [63:0] ic_rd_data , // Data read from Icache. 2x64bits + parity bits. F2 stage. With ECC

Choose a reason for hiding this comment

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

⚠️ [verible-verilog-lint] reported by reviewdog 🐶
Line length exceeds max: 100; is: 126 [Style: line-length] [line-length]


input logic [pt.ICACHE_BANKS_WAY-1:0][70:0] ic_wr_data, // Data to fill to the Icache. With ECC
input logic [63:0] ic_rd_data , // Data read from Icache. 2x64bits + parity bits. F2 stage. With ECC
input logic [70:0] ic_debug_rd_data , // Data read from Icache. 2x64bits + parity bits. F2 stage. With ECC

Choose a reason for hiding this comment

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

⚠️ [verible-verilog-lint] reported by reviewdog 🐶
Line length exceeds max: 100; is: 132 [Style: line-length] [line-length]

@mgielda mgielda changed the title Add DCLS support Add initial DCLS support and documentation Oct 14, 2024
Copy link

Links to coverage and verification reports for this PR (#246) are available at https://chipsalliance.github.io/Cores-VeeR-EL2/

Copy link

Links to coverage and verification reports for this PR (#246) are available at https://chipsalliance.github.io/Cores-VeeR-EL2/

);

modport veer_tlu_rf(
output pc, npc, mstatus, mie, mtvec, mscratch, mepc, mcause, mtval, mip, mcyclel, mcycleh, minstretl, minstreth, mrac

Choose a reason for hiding this comment

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

⚠️ [verible-verilog-lint] reported by reviewdog 🐶
Line length exceeds max: 100; is: 123 [Style: line-length] [line-length]


modport veer_rf_src(
output ra, sp, fp, a0, a1, a2, a3, a4, a5, a6, a7,
output pc, npc, mstatus, mie, mtvec, mscratch, mepc, mcause, mtval, mip, mcyclel, mcycleh, minstretl, minstreth, mrac

Choose a reason for hiding this comment

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

⚠️ [verible-verilog-lint] reported by reviewdog 🐶
Line length exceeds max: 100; is: 123 [Style: line-length] [line-length]


modport veer_rf_sink(
input ra, sp, fp, a0, a1, a2, a3, a4, a5, a6, a7,
input pc, npc, mstatus, mie, mtvec, mscratch, mepc, mcause, mtval, mip, mcyclel, mcycleh, minstretl, minstreth, mrac

Choose a reason for hiding this comment

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

⚠️ [verible-verilog-lint] reported by reviewdog 🐶
Line length exceeds max: 100; is: 122 [Style: line-length] [line-length]

Comment on lines 426 to 453
el2_regfile_if regfile_if ();
assign regfile.ra = regfile_if.ra;
assign regfile.sp = regfile_if.sp;
assign regfile.fp = regfile_if.fp;
assign regfile.a0 = regfile_if.a0;
assign regfile.a1 = regfile_if.a1;
assign regfile.a2 = regfile_if.a2;
assign regfile.a3 = regfile_if.a3;
assign regfile.a4 = regfile_if.a4;
assign regfile.a5 = regfile_if.a5;
assign regfile.a6 = regfile_if.a6;
assign regfile.a7 = regfile_if.a7;

assign regfile.pc = regfile_if.pc;
assign regfile.npc = regfile_if.npc;
assign regfile.mstatus = regfile_if.mstatus;
assign regfile.mie = regfile_if.mie;
assign regfile.mtvec = regfile_if.mtvec;
assign regfile.mscratch = regfile_if.mscratch;
assign regfile.mepc = regfile_if.mepc;
assign regfile.mcause = regfile_if.mcause;
assign regfile.mtval = regfile_if.mtval;
assign regfile.mip = regfile_if.mip;
assign regfile.mcyclel = regfile_if.mcyclel;
assign regfile.mcycleh = regfile_if.mcycleh;
assign regfile.minstretl = regfile_if.minstretl;
assign regfile.minstreth = regfile_if.minstreth;
assign regfile.mrac = regfile_if.mrac;

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
el2_regfile_if regfile_if ();
assign regfile.ra = regfile_if.ra;
assign regfile.sp = regfile_if.sp;
assign regfile.fp = regfile_if.fp;
assign regfile.a0 = regfile_if.a0;
assign regfile.a1 = regfile_if.a1;
assign regfile.a2 = regfile_if.a2;
assign regfile.a3 = regfile_if.a3;
assign regfile.a4 = regfile_if.a4;
assign regfile.a5 = regfile_if.a5;
assign regfile.a6 = regfile_if.a6;
assign regfile.a7 = regfile_if.a7;
assign regfile.pc = regfile_if.pc;
assign regfile.npc = regfile_if.npc;
assign regfile.mstatus = regfile_if.mstatus;
assign regfile.mie = regfile_if.mie;
assign regfile.mtvec = regfile_if.mtvec;
assign regfile.mscratch = regfile_if.mscratch;
assign regfile.mepc = regfile_if.mepc;
assign regfile.mcause = regfile_if.mcause;
assign regfile.mtval = regfile_if.mtval;
assign regfile.mip = regfile_if.mip;
assign regfile.mcyclel = regfile_if.mcyclel;
assign regfile.mcycleh = regfile_if.mcycleh;
assign regfile.minstretl = regfile_if.minstretl;
assign regfile.minstreth = regfile_if.minstreth;
assign regfile.mrac = regfile_if.mrac;
el2_regfile_if regfile_if ();
assign regfile.ra = regfile_if.ra;
assign regfile.sp = regfile_if.sp;
assign regfile.fp = regfile_if.fp;
assign regfile.a0 = regfile_if.a0;
assign regfile.a1 = regfile_if.a1;
assign regfile.a2 = regfile_if.a2;
assign regfile.a3 = regfile_if.a3;
assign regfile.a4 = regfile_if.a4;
assign regfile.a5 = regfile_if.a5;
assign regfile.a6 = regfile_if.a6;
assign regfile.a7 = regfile_if.a7;
assign regfile.pc = regfile_if.pc;
assign regfile.npc = regfile_if.npc;
assign regfile.mstatus = regfile_if.mstatus;
assign regfile.mie = regfile_if.mie;
assign regfile.mtvec = regfile_if.mtvec;
assign regfile.mscratch = regfile_if.mscratch;
assign regfile.mepc = regfile_if.mepc;
assign regfile.mcause = regfile_if.mcause;
assign regfile.mtval = regfile_if.mtval;
assign regfile.mip = regfile_if.mip;
assign regfile.mcyclel = regfile_if.mcyclel;
assign regfile.mcycleh = regfile_if.mcycleh;
assign regfile.minstretl = regfile_if.minstretl;
assign regfile.minstreth = regfile_if.minstreth;
assign regfile.mrac = regfile_if.mrac;


el2_dec_tlu_ctl #(.pt(pt)) tlu (.*);
el2_dec_tlu_ctl #(.pt(pt)

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
el2_dec_tlu_ctl #(.pt(pt)
el2_dec_tlu_ctl #(
.pt(pt)

`ifdef RV_LOCKSTEP_REGFILE_ENABLE
.regfile(regfile_if.veer_tlu_rf),
`endif
.*);

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
.*);
.*
);

Comment on lines 472 to 473
.raddr0(dec_i0_rs1_d[4:0]),
.raddr1(dec_i0_rs2_d[4:0]),

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
.raddr0(dec_i0_rs1_d[4:0]),
.raddr1(dec_i0_rs2_d[4:0]),
.raddr0 (dec_i0_rs1_d[4:0]),
.raddr1 (dec_i0_rs2_d[4:0]),

@@ -39,6 +39,10 @@ import el2_pkg::*;
output logic [31:0] rd0, // read data

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
output logic [31:0] rd0, // read data
output logic [31:0] rd0, // read data

Comment on lines +873 to +877
el2_regfile_if regfile ();
// TODO: Connect to the Shadow Core
initial begin
$display("Dual Core Lockstep enabled!\n");
end

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
el2_regfile_if regfile ();
// TODO: Connect to the Shadow Core
initial begin
$display("Dual Core Lockstep enabled!\n");
end
el2_regfile_if regfile ();
// TODO: Connect to the Shadow Core
initial begin
$display("Dual Core Lockstep enabled!\n");
end

Comment on lines 880 to 882
// Instantiate the el2_veer core
el2_veer #(.pt(pt)) veer (
.clk(clk),

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
// Instantiate the el2_veer core
el2_veer #(.pt(pt)) veer (
.clk(clk),
// Instantiate the el2_veer core
el2_veer #(
.pt(pt)
) veer (
.clk(clk),

// Instantiate the el2_veer core
el2_veer #(.pt(pt)) veer (
.clk(clk),
`ifdef RV_LOCKSTEP_REGFILE_ENABLE
.regfile(regfile.veer_rf_src),

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
.regfile(regfile.veer_rf_src),
.regfile(regfile.veer_rf_src),

Comment on lines 22 to 26
logic [31:0] ra; // Return address
logic [31:0] sp; // Stack pointer
logic [31:0] fp; // Frame pointer
logic [31:0] a0, a1; // Function arguments 0-1 / Return values 0-1
logic [31:0] a2, a3, a4, a5, a6, a7; // Function arguments 2-7

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 [31:0] ra; // Return address
logic [31:0] sp; // Stack pointer
logic [31:0] fp; // Frame pointer
logic [31:0] a0, a1; // Function arguments 0-1 / Return values 0-1
logic [31:0] a2, a3, a4, a5, a6, a7; // Function arguments 2-7
logic [31:0] ra; // Return address
logic [31:0] sp; // Stack pointer
logic [31:0] fp; // Frame pointer
logic [31:0] a0, a1; // Function arguments 0-1 / Return values 0-1
logic [31:0] a2, a3, a4, a5, a6, a7; // Function arguments 2-7

Comment on lines 29 to 46
logic [31:0] pc, npc; // (Next) Program Counter
logic [31:0] mstatus; // Machine status
logic [31:0] mie; // Machine interrupt enable
logic [31:0] mtvec; // Machine trap-handler base address
logic [31:0] mscratch; // Scratch register for machine trap handlers
logic [31:0] mepc; // Machine exception program counter
logic [31:0] mcause; // Machine trap cause
logic [31:0] mtval; // Machine bad address or instruction
logic [31:0] mip; // Machine interrupt pending
logic [31:0] mcyclel; // Machine cycle counter
logic [31:0] mcycleh; // Machine cycle counter
logic [31:0] minstretl; // Machine instructions-retired counter
logic [31:0] minstreth; // Machine instructions-retired counter
logic [31:0] mrac; // Region access control

modport veer_gpr_rf(
output ra, sp, fp, a0, a1, a2, a3, a4, a5, a6, a7
);

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 [31:0] pc, npc; // (Next) Program Counter
logic [31:0] mstatus; // Machine status
logic [31:0] mie; // Machine interrupt enable
logic [31:0] mtvec; // Machine trap-handler base address
logic [31:0] mscratch; // Scratch register for machine trap handlers
logic [31:0] mepc; // Machine exception program counter
logic [31:0] mcause; // Machine trap cause
logic [31:0] mtval; // Machine bad address or instruction
logic [31:0] mip; // Machine interrupt pending
logic [31:0] mcyclel; // Machine cycle counter
logic [31:0] mcycleh; // Machine cycle counter
logic [31:0] minstretl; // Machine instructions-retired counter
logic [31:0] minstreth; // Machine instructions-retired counter
logic [31:0] mrac; // Region access control
modport veer_gpr_rf(
output ra, sp, fp, a0, a1, a2, a3, a4, a5, a6, a7
);
logic [31:0] pc, npc; // (Next) Program Counter
logic [31:0] mstatus; // Machine status
logic [31:0] mie; // Machine interrupt enable
logic [31:0] mtvec; // Machine trap-handler base address
logic [31:0] mscratch; // Scratch register for machine trap handlers
logic [31:0] mepc; // Machine exception program counter
logic [31:0] mcause; // Machine trap cause
logic [31:0] mtval; // Machine bad address or instruction
logic [31:0] mip; // Machine interrupt pending
logic [31:0] mcyclel; // Machine cycle counter
logic [31:0] mcycleh; // Machine cycle counter
logic [31:0] minstretl; // Machine instructions-retired counter
logic [31:0] minstreth; // Machine instructions-retired counter
logic [31:0] mrac; // Region access control
modport veer_gpr_rf(output ra, sp, fp, a0, a1, a2, a3, a4, a5, a6, a7);

Copy link

Links to coverage and verification reports for this PR (#246) are available at https://chipsalliance.github.io/Cores-VeeR-EL2/

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

verible-verilog-format

verification/block/dcls/el2_veer_lockstep_wrapper.sv|166|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|172|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|175|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|188|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|191|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|196|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|200|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|213|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|222|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|235|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|238|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|243|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|247|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|260|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|266|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|269|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|276|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|279|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|282|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|288|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|291|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|300|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|307|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|315|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|320|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|329|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|334|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|343|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|346|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|349|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|356|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|359|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|367|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|373|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|383|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|386|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|390|
verification/block/dcls/el2_veer_lockstep_wrapper.sv|392|

Comment on lines +426 to +453
el2_regfile_if regfile_if ();
assign regfile.gpr.ra = regfile_if.gpr.ra;
assign regfile.gpr.sp = regfile_if.gpr.sp;
assign regfile.gpr.fp = regfile_if.gpr.fp;
assign regfile.gpr.a0 = regfile_if.gpr.a0;
assign regfile.gpr.a1 = regfile_if.gpr.a1;
assign regfile.gpr.a2 = regfile_if.gpr.a2;
assign regfile.gpr.a3 = regfile_if.gpr.a3;
assign regfile.gpr.a4 = regfile_if.gpr.a4;
assign regfile.gpr.a5 = regfile_if.gpr.a5;
assign regfile.gpr.a6 = regfile_if.gpr.a6;
assign regfile.gpr.a7 = regfile_if.gpr.a7;

assign regfile.tlu.pc = regfile_if.tlu.pc;
assign regfile.tlu.npc = regfile_if.tlu.npc;
assign regfile.tlu.mstatus = regfile_if.tlu.mstatus;
assign regfile.tlu.mie = regfile_if.tlu.mie;
assign regfile.tlu.mtvec = regfile_if.tlu.mtvec;
assign regfile.tlu.mscratch = regfile_if.tlu.mscratch;
assign regfile.tlu.mepc = regfile_if.tlu.mepc;
assign regfile.tlu.mcause = regfile_if.tlu.mcause;
assign regfile.tlu.mtval = regfile_if.tlu.mtval;
assign regfile.tlu.mip = regfile_if.tlu.mip;
assign regfile.tlu.mcyclel = regfile_if.tlu.mcyclel;
assign regfile.tlu.mcycleh = regfile_if.tlu.mcycleh;
assign regfile.tlu.minstretl = regfile_if.tlu.minstretl;
assign regfile.tlu.minstreth = regfile_if.tlu.minstreth;
assign regfile.tlu.mrac = regfile_if.tlu.mrac;

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
el2_regfile_if regfile_if ();
assign regfile.gpr.ra = regfile_if.gpr.ra;
assign regfile.gpr.sp = regfile_if.gpr.sp;
assign regfile.gpr.fp = regfile_if.gpr.fp;
assign regfile.gpr.a0 = regfile_if.gpr.a0;
assign regfile.gpr.a1 = regfile_if.gpr.a1;
assign regfile.gpr.a2 = regfile_if.gpr.a2;
assign regfile.gpr.a3 = regfile_if.gpr.a3;
assign regfile.gpr.a4 = regfile_if.gpr.a4;
assign regfile.gpr.a5 = regfile_if.gpr.a5;
assign regfile.gpr.a6 = regfile_if.gpr.a6;
assign regfile.gpr.a7 = regfile_if.gpr.a7;
assign regfile.tlu.pc = regfile_if.tlu.pc;
assign regfile.tlu.npc = regfile_if.tlu.npc;
assign regfile.tlu.mstatus = regfile_if.tlu.mstatus;
assign regfile.tlu.mie = regfile_if.tlu.mie;
assign regfile.tlu.mtvec = regfile_if.tlu.mtvec;
assign regfile.tlu.mscratch = regfile_if.tlu.mscratch;
assign regfile.tlu.mepc = regfile_if.tlu.mepc;
assign regfile.tlu.mcause = regfile_if.tlu.mcause;
assign regfile.tlu.mtval = regfile_if.tlu.mtval;
assign regfile.tlu.mip = regfile_if.tlu.mip;
assign regfile.tlu.mcyclel = regfile_if.tlu.mcyclel;
assign regfile.tlu.mcycleh = regfile_if.tlu.mcycleh;
assign regfile.tlu.minstretl = regfile_if.tlu.minstretl;
assign regfile.tlu.minstreth = regfile_if.tlu.minstreth;
assign regfile.tlu.mrac = regfile_if.tlu.mrac;
el2_regfile_if regfile_if ();
assign regfile.gpr.ra = regfile_if.gpr.ra;
assign regfile.gpr.sp = regfile_if.gpr.sp;
assign regfile.gpr.fp = regfile_if.gpr.fp;
assign regfile.gpr.a0 = regfile_if.gpr.a0;
assign regfile.gpr.a1 = regfile_if.gpr.a1;
assign regfile.gpr.a2 = regfile_if.gpr.a2;
assign regfile.gpr.a3 = regfile_if.gpr.a3;
assign regfile.gpr.a4 = regfile_if.gpr.a4;
assign regfile.gpr.a5 = regfile_if.gpr.a5;
assign regfile.gpr.a6 = regfile_if.gpr.a6;
assign regfile.gpr.a7 = regfile_if.gpr.a7;
assign regfile.tlu.pc = regfile_if.tlu.pc;
assign regfile.tlu.npc = regfile_if.tlu.npc;
assign regfile.tlu.mstatus = regfile_if.tlu.mstatus;
assign regfile.tlu.mie = regfile_if.tlu.mie;
assign regfile.tlu.mtvec = regfile_if.tlu.mtvec;
assign regfile.tlu.mscratch = regfile_if.tlu.mscratch;
assign regfile.tlu.mepc = regfile_if.tlu.mepc;
assign regfile.tlu.mcause = regfile_if.tlu.mcause;
assign regfile.tlu.mtval = regfile_if.tlu.mtval;
assign regfile.tlu.mip = regfile_if.tlu.mip;
assign regfile.tlu.mcyclel = regfile_if.tlu.mcyclel;
assign regfile.tlu.mcycleh = regfile_if.tlu.mcycleh;
assign regfile.tlu.minstretl = regfile_if.tlu.minstretl;
assign regfile.tlu.minstreth = regfile_if.tlu.minstreth;
assign regfile.tlu.mrac = regfile_if.tlu.mrac;

Comment on lines +55 to +65
assign regfile.gpr.ra = gpr_out[1][31:0]; // x1
assign regfile.gpr.sp = gpr_out[2][31:0]; // x2
assign regfile.gpr.fp = gpr_out[8][31:0]; // x8
assign regfile.gpr.a0 = gpr_out[10][31:0]; // x10
assign regfile.gpr.a1 = gpr_out[11][31:0]; // x11
assign regfile.gpr.a2 = gpr_out[12][31:0]; // x12
assign regfile.gpr.a3 = gpr_out[13][31:0]; // x13
assign regfile.gpr.a4 = gpr_out[14][31:0]; // x14
assign regfile.gpr.a5 = gpr_out[15][31:0]; // x15
assign regfile.gpr.a6 = gpr_out[16][31:0]; // x16
assign regfile.gpr.a7 = gpr_out[17][31:0]; // x17

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
assign regfile.gpr.ra = gpr_out[1][31:0]; // x1
assign regfile.gpr.sp = gpr_out[2][31:0]; // x2
assign regfile.gpr.fp = gpr_out[8][31:0]; // x8
assign regfile.gpr.a0 = gpr_out[10][31:0]; // x10
assign regfile.gpr.a1 = gpr_out[11][31:0]; // x11
assign regfile.gpr.a2 = gpr_out[12][31:0]; // x12
assign regfile.gpr.a3 = gpr_out[13][31:0]; // x13
assign regfile.gpr.a4 = gpr_out[14][31:0]; // x14
assign regfile.gpr.a5 = gpr_out[15][31:0]; // x15
assign regfile.gpr.a6 = gpr_out[16][31:0]; // x16
assign regfile.gpr.a7 = gpr_out[17][31:0]; // x17
assign regfile.gpr.ra = gpr_out[1][31:0]; // x1
assign regfile.gpr.sp = gpr_out[2][31:0]; // x2
assign regfile.gpr.fp = gpr_out[8][31:0]; // x8
assign regfile.gpr.a0 = gpr_out[10][31:0]; // x10
assign regfile.gpr.a1 = gpr_out[11][31:0]; // x11
assign regfile.gpr.a2 = gpr_out[12][31:0]; // x12
assign regfile.gpr.a3 = gpr_out[13][31:0]; // x13
assign regfile.gpr.a4 = gpr_out[14][31:0]; // x14
assign regfile.gpr.a5 = gpr_out[15][31:0]; // x15
assign regfile.gpr.a6 = gpr_out[16][31:0]; // x16
assign regfile.gpr.a7 = gpr_out[17][31:0]; // x17

Comment on lines +1020 to +1023
delayed_main_core_regfile[i+1].gpr <= '0;
delayed_main_core_regfile[i+1].tlu <= '0;

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
delayed_main_core_regfile[i+1].gpr <= '0;
delayed_main_core_regfile[i+1].tlu <= '0;
delayed_main_core_regfile[i+1].gpr <= '0;
delayed_main_core_regfile[i+1].tlu <= '0;

Comment on lines +886 to +887
.*
);

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
.*
);
.*
);

);

`ifdef RV_LOCKSTEP_ENABLE
logic lockstep_corruption_detected;

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 lockstep_corruption_detected;
logic lockstep_corruption_detected;

Comment on lines +128 to +139
logic [ 31:0] lsu_axi_awaddr;
logic [ 3:0] lsu_axi_awregion;
logic [ 7:0] lsu_axi_awlen;
logic [ 2:0] lsu_axi_awsize;
logic [ 1:0] lsu_axi_awburst;
logic lsu_axi_awlock;
logic [ 3:0] lsu_axi_awcache;
logic [ 2:0] lsu_axi_awprot;
logic [ 3:0] lsu_axi_awqos;

logic lsu_axi_wvalid;
logic lsu_axi_wready;

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 [ 31:0] lsu_axi_awaddr;
logic [ 3:0] lsu_axi_awregion;
logic [ 7:0] lsu_axi_awlen;
logic [ 2:0] lsu_axi_awsize;
logic [ 1:0] lsu_axi_awburst;
logic lsu_axi_awlock;
logic [ 3:0] lsu_axi_awcache;
logic [ 2:0] lsu_axi_awprot;
logic [ 3:0] lsu_axi_awqos;
logic lsu_axi_wvalid;
logic lsu_axi_wready;
logic [31:0] lsu_axi_awaddr;
logic [3:0] lsu_axi_awregion;
logic [7:0] lsu_axi_awlen;
logic [2:0] lsu_axi_awsize;
logic [1:0] lsu_axi_awburst;
logic lsu_axi_awlock;
logic [3:0] lsu_axi_awcache;
logic [2:0] lsu_axi_awprot;
logic [3:0] lsu_axi_awqos;
logic lsu_axi_wvalid;
logic lsu_axi_wready;

Comment on lines +141 to +142
logic [ 7:0] lsu_axi_wstrb;
logic lsu_axi_wlast;

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 [ 7:0] lsu_axi_wstrb;
logic lsu_axi_wlast;
logic [7:0] lsu_axi_wstrb;
logic lsu_axi_wlast;

Comment on lines +144 to +146
logic lsu_axi_bvalid;
logic lsu_axi_bready;
logic [ 1:0] lsu_axi_bresp;

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 lsu_axi_bvalid;
logic lsu_axi_bready;
logic [ 1:0] lsu_axi_bresp;
logic lsu_axi_bvalid;
logic lsu_axi_bready;
logic [1:0] lsu_axi_bresp;

Comment on lines +149 to +151
// AXI Read Channels
logic lsu_axi_arvalid;
logic lsu_axi_arready;

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
// AXI Read Channels
logic lsu_axi_arvalid;
logic lsu_axi_arready;
// AXI Read Channels
logic lsu_axi_arvalid;
logic lsu_axi_arready;

Comment on lines +153 to +164
logic [ 31:0] lsu_axi_araddr;
logic [ 3:0] lsu_axi_arregion;
logic [ 7:0] lsu_axi_arlen;
logic [ 2:0] lsu_axi_arsize;
logic [ 1:0] lsu_axi_arburst;
logic lsu_axi_arlock;
logic [ 3:0] lsu_axi_arcache;
logic [ 2:0] lsu_axi_arprot;
logic [ 3:0] lsu_axi_arqos;

logic lsu_axi_rvalid;
logic lsu_axi_rready;

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 [ 31:0] lsu_axi_araddr;
logic [ 3:0] lsu_axi_arregion;
logic [ 7:0] lsu_axi_arlen;
logic [ 2:0] lsu_axi_arsize;
logic [ 1:0] lsu_axi_arburst;
logic lsu_axi_arlock;
logic [ 3:0] lsu_axi_arcache;
logic [ 2:0] lsu_axi_arprot;
logic [ 3:0] lsu_axi_arqos;
logic lsu_axi_rvalid;
logic lsu_axi_rready;
logic [31:0] lsu_axi_araddr;
logic [3:0] lsu_axi_arregion;
logic [7:0] lsu_axi_arlen;
logic [2:0] lsu_axi_arsize;
logic [1:0] lsu_axi_arburst;
logic lsu_axi_arlock;
logic [3:0] lsu_axi_arcache;
logic [2:0] lsu_axi_arprot;
logic [3:0] lsu_axi_arqos;
logic lsu_axi_rvalid;
logic lsu_axi_rready;

delayed_main_core_regfile[0].tlu <= main_core_regfile.tlu;
end
end
for (genvar i = 0; i < LockstepDelay; i++) begin

Choose a reason for hiding this comment

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

⚠️ [verible-verilog-lint] reported by reviewdog 🐶
All generate block statements must have a label [Style: generate-statements] [generate-label]


`ifdef RV_LOCKSTEP_REGFILE_ENABLE
logic regfile_corrupted;
assign regfile_corrupted = (delayed_main_core_regfile[LockstepDelay].gpr != shadow_core_regfile.gpr)

Choose a reason for hiding this comment

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

⚠️ [verible-verilog-lint] reported by reviewdog 🐶
Line length exceeds max: 100; is: 104 [Style: line-length] [line-length]

`ifdef RV_LOCKSTEP_REGFILE_ENABLE
logic regfile_corrupted;
assign regfile_corrupted = (delayed_main_core_regfile[LockstepDelay].gpr != shadow_core_regfile.gpr)
| (delayed_main_core_regfile[LockstepDelay].tlu != shadow_core_regfile.tlu);

Choose a reason for hiding this comment

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

⚠️ [verible-verilog-lint] reported by reviewdog 🐶
Line length exceeds max: 100; is: 105 [Style: line-length] [line-length]

mczyz-antmicro and others added 8 commits October 25, 2024 18:47
Internal-tag: [#62496]
Signed-off-by: Michal Czyz <[email protected]>
Signed-off-by: Wiktoria Kuna <[email protected]>
Internal-tag: [#66891]
Signed-off-by: Wiktoria Kuna <[email protected]>
Signed-off-by: Robert Szczepanski <[email protected]>
Signed-off-by: Robert Szczepanski <[email protected]>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Comment on lines +166 to +168
logic [ 63:0] lsu_axi_rdata;
logic [ 1:0] lsu_axi_rresp;
logic lsu_axi_rlast;

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 [ 63:0] lsu_axi_rdata;
logic [ 1:0] lsu_axi_rresp;
logic lsu_axi_rlast;
logic [63:0] lsu_axi_rdata;
logic [1:0] lsu_axi_rresp;
logic lsu_axi_rlast;

Comment on lines +172 to +173
logic ifu_axi_awvalid;
logic ifu_axi_awready;

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 ifu_axi_awvalid;
logic ifu_axi_awready;
logic ifu_axi_awvalid;
logic ifu_axi_awready;

Comment on lines +175 to +186
logic [ 31:0] ifu_axi_awaddr;
logic [ 3:0] ifu_axi_awregion;
logic [ 7:0] ifu_axi_awlen;
logic [ 2:0] ifu_axi_awsize;
logic [ 1:0] ifu_axi_awburst;
logic ifu_axi_awlock;
logic [ 3:0] ifu_axi_awcache;
logic [ 2:0] ifu_axi_awprot;
logic [ 3:0] ifu_axi_awqos;

logic ifu_axi_wvalid;
logic ifu_axi_wready;

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 [ 31:0] ifu_axi_awaddr;
logic [ 3:0] ifu_axi_awregion;
logic [ 7:0] ifu_axi_awlen;
logic [ 2:0] ifu_axi_awsize;
logic [ 1:0] ifu_axi_awburst;
logic ifu_axi_awlock;
logic [ 3:0] ifu_axi_awcache;
logic [ 2:0] ifu_axi_awprot;
logic [ 3:0] ifu_axi_awqos;
logic ifu_axi_wvalid;
logic ifu_axi_wready;
logic [31:0] ifu_axi_awaddr;
logic [3:0] ifu_axi_awregion;
logic [7:0] ifu_axi_awlen;
logic [2:0] ifu_axi_awsize;
logic [1:0] ifu_axi_awburst;
logic ifu_axi_awlock;
logic [3:0] ifu_axi_awcache;
logic [2:0] ifu_axi_awprot;
logic [3:0] ifu_axi_awqos;
logic ifu_axi_wvalid;
logic ifu_axi_wready;

Comment on lines +188 to +189
logic [ 7:0] ifu_axi_wstrb;
logic ifu_axi_wlast;

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 [ 7:0] ifu_axi_wstrb;
logic ifu_axi_wlast;
logic [7:0] ifu_axi_wstrb;
logic ifu_axi_wlast;

Comment on lines +191 to +193
logic ifu_axi_bvalid;
logic ifu_axi_bready;
logic [ 1:0] ifu_axi_bresp;

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 ifu_axi_bvalid;
logic ifu_axi_bready;
logic [ 1:0] ifu_axi_bresp;
logic ifu_axi_bvalid;
logic ifu_axi_bready;
logic [1:0] ifu_axi_bresp;

Comment on lines +329 to +330
logic lsu_hready;
logic lsu_hresp;

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 lsu_hready;
logic lsu_hresp;
logic lsu_hready;
logic lsu_hresp;

Comment on lines +334 to +339
logic [ 2:0] sb_hburst;
logic sb_hmastlock;
logic [ 3:0] sb_hprot;
logic [ 2:0] sb_hsize;
logic [ 1:0] sb_htrans;
logic sb_hwrite;

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 [ 2:0] sb_hburst;
logic sb_hmastlock;
logic [ 3:0] sb_hprot;
logic [ 2:0] sb_hsize;
logic [ 1:0] sb_htrans;
logic sb_hwrite;
logic [2:0] sb_hburst;
logic sb_hmastlock;
logic [3:0] sb_hprot;
logic [2:0] sb_hsize;
logic [1:0] sb_htrans;
logic sb_hwrite;

Comment on lines +343 to +344
logic sb_hready;
logic sb_hresp;

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 sb_hready;
logic sb_hresp;
logic sb_hready;
logic sb_hresp;

Comment on lines +346 to +347
// DMA Slave
logic dma_hsel;

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
// DMA Slave
logic dma_hsel;
// DMA Slave
logic dma_hsel;

Comment on lines +349 to +354
logic [ 2:0] dma_hburst;
logic dma_hmastlock;
logic [ 3:0] dma_hprot;
logic [ 2:0] dma_hsize;
logic [ 1:0] dma_htrans;
logic dma_hwrite;

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 [ 2:0] dma_hburst;
logic dma_hmastlock;
logic [ 3:0] dma_hprot;
logic [ 2:0] dma_hsize;
logic [ 1:0] dma_htrans;
logic dma_hwrite;
logic [2:0] dma_hburst;
logic dma_hmastlock;
logic [3:0] dma_hprot;
logic [2:0] dma_hsize;
logic [1:0] dma_htrans;
logic dma_hwrite;

Copy link

Links to coverage and verification reports for this PR (#246) are available at https://chipsalliance.github.io/Cores-VeeR-EL2/

- Remove reduntant imports from RTL
- Assign some hanging outputs to `unused_*` wires
- Add explicit lint waivers for VeeR codebase
- Add test-specific lint waivers for test wrappers
- Build complex test design using multiple threads

Signed-off-by: Robert Szczepanski <[email protected]>
logic [ 1:0] dma_htrans;
logic dma_hwrite;
logic [63:0] dma_hwdata;
logic dma_hreadyin;

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 dma_hreadyin;
logic dma_hreadyin;

Comment on lines +359 to +360
logic dma_hreadyout;
logic dma_hresp;

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 dma_hreadyout;
logic dma_hresp;
logic dma_hreadyout;
logic dma_hresp;

Comment on lines +367 to +370
logic dmi_reg_en; // read or write
logic [ 6:0] dmi_reg_addr; // address of DM register
logic dmi_reg_wr_en; // write instruction
logic [31:0] dmi_reg_wdata; // write data

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 dmi_reg_en; // read or write
logic [ 6:0] dmi_reg_addr; // address of DM register
logic dmi_reg_wr_en; // write instruction
logic [31:0] dmi_reg_wdata; // write data
logic dmi_reg_en; // read or write
logic [6:0] dmi_reg_addr; // address of DM register
logic dmi_reg_wr_en; // write instruction
logic [31:0] dmi_reg_wdata; // write data

logic [31:0] dmi_reg_wdata; // write data
logic [31:0] dmi_reg_rdata;

// ICCM/DCCM ECC status

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
// ICCM/DCCM ECC status
// ICCM/DCCM ECC status


el2_regfile_if regfile ();

el2_veer #(.pt(pt)) veer (

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
el2_veer #(.pt(pt)) veer (
el2_veer #(
.pt(pt)
) veer (

el2_veer #(.pt(pt)) veer (
`ifdef RV_LOCKSTEP_REGFILE_ENABLE
.regfile(regfile.veer_rf_src),
`endif // `ifdef RV_LOCKSTEP_REGFILE_ENABLE

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
`endif // `ifdef RV_LOCKSTEP_REGFILE_ENABLE
`endif // `ifdef RV_LOCKSTEP_REGFILE_ENABLE

.*
);

el2_veer_lockstep #(.pt(pt)) lockstep (

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
el2_veer_lockstep #(.pt(pt)) lockstep (
el2_veer_lockstep #(
.pt(pt)
) lockstep (

Comment on lines +392 to +393
.main_core_regfile(regfile.veer_rf_sink),
`endif // `ifdef RV_LOCKSTEP_REGFILE_ENABLE

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
.main_core_regfile(regfile.veer_rf_sink),
`endif // `ifdef RV_LOCKSTEP_REGFILE_ENABLE
.main_core_regfile (regfile.veer_rf_sink),
`endif // `ifdef RV_LOCKSTEP_REGFILE_ENABLE

@tmichalak tmichalak marked this pull request as ready for review October 28, 2024 15:31
@tmichalak tmichalak marked this pull request as draft October 28, 2024 16:20
Copy link

Links to coverage and verification reports for this PR (#246) are available at https://chipsalliance.github.io/Cores-VeeR-EL2/

1 similar comment
Copy link

Links to coverage and verification reports for this PR (#246) are available at https://chipsalliance.github.io/Cores-VeeR-EL2/

Signed-off-by: Robert Szczepanski <[email protected]>
Signed-off-by: Robert Szczepanski <[email protected]>
Copy link

github-actions bot commented Nov 5, 2024

Links to coverage and verification reports for this PR (#246) are available at https://chipsalliance.github.io/Cores-VeeR-EL2/

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.

4 participants