-
Notifications
You must be signed in to change notification settings - Fork 688
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 clean-up of the number of register address bits #2483
Code clean-up of the number of register address bits #2483
Conversation
core/decoder.sv
Outdated
instruction_o.fu = ALU; | ||
imm_select = UIMM; | ||
instruction_o.use_pc = 1'b1; | ||
instruction_o.rd[4:0] = instr.utype.rd; | ||
instruction_o.rd = instr.utype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.fu = ALU; | |
imm_select = UIMM; | |
instruction_o.use_pc = 1'b1; | |
instruction_o.rd[4:0] = instr.utype.rd; | |
instruction_o.rd = instr.utype.rd; | |
instruction_o.fu = ALU; | |
imm_select = UIMM; | |
instruction_o.use_pc = 1'b1; | |
instruction_o.rd = instr.utype.rd; |
core/decoder.sv
Outdated
check_fprm = 1'b1; | ||
allow_replication = 1'b1; |
There was a problem hiding this comment.
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 🐶
check_fprm = 1'b1; | |
allow_replication = 1'b1; | |
check_fprm = 1'b1; | |
allow_replication = 1'b1; |
core/decoder.sv
Outdated
instruction_o.op = ariane_pkg::FADD; // vfadd.vfmt - Vectorial FP Addition | ||
instruction_o.rs1 = '0; // Operand A is set to 0 |
There was a problem hiding this comment.
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 🐶
instruction_o.op = ariane_pkg::FADD; // vfadd.vfmt - Vectorial FP Addition | |
instruction_o.rs1 = '0; // Operand A is set to 0 | |
instruction_o.op = ariane_pkg::FADD; // vfadd.vfmt - Vectorial FP Addition | |
instruction_o.rs1 = '0; // Operand A is set to 0 |
core/decoder.sv
Outdated
check_fprm = 1'b1; | ||
allow_replication = 1'b1; | ||
// decode vectorial FP instruction | ||
unique case (instr.rvftype.vecfltop) | ||
5'b00001: begin | ||
instruction_o.op = ariane_pkg::FADD; // vfadd.vfmt - Vectorial FP Addition | ||
instruction_o.rs1 = '0; // Operand A is set to 0 | ||
instruction_o.rs2[4:0] = instr.rvftype.rs1; // Operand B is set to rs1 | ||
instruction_o.rs2 = instr.rvftype.rs1; // Operand B is set to rs1 | ||
imm_select = IIMM; // Operand C is set to rs2 |
There was a problem hiding this comment.
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 🐶
imm_select = IIMM; // Operand C is set to rs2 | |
imm_select = IIMM; // Operand C is set to rs2 |
core/decoder.sv
Outdated
@@ -820,9 +820,9 @@ | |||
// -------------------------- | |||
riscv::OpcodeOp32: begin | |||
instruction_o.fu = (instr.rtype.funct7 == 7'b000_0001) ? MULT : ALU; |
There was a problem hiding this comment.
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 🐶
instruction_o.fu = (instr.rtype.funct7 == 7'b000_0001) ? MULT : ALU; | |
instruction_o.fu = (instr.rtype.funct7 == 7'b000_0001) ? MULT : ALU; |
core/decoder.sv
Outdated
@@ -1391,9 +1391,9 @@ | |||
riscv::OpcodeJalr: begin | |||
instruction_o.fu = CTRL_FLOW; | |||
instruction_o.op = ariane_pkg::JALR; | |||
instruction_o.rs1[4:0] = instr.itype.rs1; | |||
instruction_o.rs1 = instr.itype.rs1; |
There was a problem hiding this comment.
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 🐶
instruction_o.rs1 = instr.itype.rs1; | |
instruction_o.rs1 = instr.itype.rs1; |
core/decoder.sv
Outdated
imm_select = IIMM; | ||
instruction_o.rd[4:0] = instr.itype.rd; | ||
instruction_o.rd = instr.itype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.rd = instr.itype.rd; | |
instruction_o.rd = instr.itype.rd; |
core/decoder.sv
Outdated
instruction_o.op = ariane_pkg::FADD; // vfadd.vfmt - Vectorial FP Addition | ||
instruction_o.rs1 = '0; // Operand A is set to 0 |
There was a problem hiding this comment.
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 🐶
instruction_o.op = ariane_pkg::FADD; // vfadd.vfmt - Vectorial FP Addition | |
instruction_o.rs1 = '0; // Operand A is set to 0 | |
instruction_o.op = ariane_pkg::FADD; // vfadd.vfmt - Vectorial FP Addition | |
instruction_o.rs1 = '0; // Operand A is set to 0 |
core/decoder.sv
Outdated
// decode vectorial FP instruction | ||
unique case (instr.rvftype.vecfltop) | ||
5'b00001: begin | ||
instruction_o.op = ariane_pkg::FADD; // vfadd.vfmt - Vectorial FP Addition | ||
instruction_o.rs1 = '0; // Operand A is set to 0 | ||
instruction_o.rs2[4:0] = instr.rvftype.rs1; // Operand B is set to rs1 | ||
instruction_o.rs2 = instr.rvftype.rs1; // Operand B is set to rs1 | ||
imm_select = IIMM; // Operand C is set to rs2 |
There was a problem hiding this comment.
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 🐶
imm_select = IIMM; // Operand C is set to rs2 | |
imm_select = IIMM; // Operand C is set to rs2 |
core/decoder.sv
Outdated
@@ -820,9 +820,9 @@ module decoder | |||
// -------------------------- | |||
riscv::OpcodeOp32: begin | |||
instruction_o.fu = (instr.rtype.funct7 == 7'b000_0001) ? MULT : ALU; |
There was a problem hiding this comment.
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 🐶
instruction_o.fu = (instr.rtype.funct7 == 7'b000_0001) ? MULT : ALU; | |
instruction_o.fu = (instr.rtype.funct7 == 7'b000_0001) ? MULT : ALU; |
core/decoder.sv
Outdated
@@ -1391,9 +1391,9 @@ module decoder | |||
riscv::OpcodeJalr: begin | |||
instruction_o.fu = CTRL_FLOW; | |||
instruction_o.op = ariane_pkg::JALR; | |||
instruction_o.rs1[4:0] = instr.itype.rs1; | |||
instruction_o.rs1 = instr.itype.rs1; |
There was a problem hiding this comment.
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 🐶
instruction_o.rs1 = instr.itype.rs1; | |
instruction_o.rs1 = instr.itype.rs1; |
core/decoder.sv
Outdated
imm_select = IIMM; | ||
instruction_o.rd[4:0] = instr.itype.rd; | ||
instruction_o.rd = instr.itype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.rd = instr.itype.rd; | |
instruction_o.rd = instr.itype.rd; |
core/decoder.sv
Outdated
@@ -1402,21 +1402,21 @@ module decoder | |||
riscv::OpcodeJal: begin | |||
instruction_o.fu = CTRL_FLOW; | |||
imm_select = JIMM; | |||
instruction_o.rd[4:0] = instr.utype.rd; | |||
instruction_o.rd = instr.utype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.rd = instr.utype.rd; | |
instruction_o.rd = instr.utype.rd; |
core/decoder.sv
Outdated
instruction_o.rs2[4:0] = instr.rvftype.rs1; // Operand B is set to rs1 | ||
instruction_o.op = ariane_pkg::FADD; // vfadd.vfmt - Vectorial FP Addition | ||
instruction_o.rs1 = '0; // Operand A is set to 0 | ||
instruction_o.rs2 = instr.rvftype.rs1; // Operand B is set to rs1 | ||
imm_select = IIMM; // Operand C is set to rs2 |
There was a problem hiding this comment.
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 🐶
imm_select = IIMM; // Operand C is set to rs2 | |
imm_select = IIMM; // Operand C is set to rs2 |
core/decoder.sv
Outdated
@@ -820,9 +820,9 @@ | |||
// -------------------------- | |||
riscv::OpcodeOp32: begin | |||
instruction_o.fu = (instr.rtype.funct7 == 7'b000_0001) ? MULT : ALU; |
There was a problem hiding this comment.
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 🐶
instruction_o.fu = (instr.rtype.funct7 == 7'b000_0001) ? MULT : ALU; | |
instruction_o.fu = (instr.rtype.funct7 == 7'b000_0001) ? MULT : ALU; |
core/decoder.sv
Outdated
@@ -1391,9 +1391,9 @@ | |||
riscv::OpcodeJalr: begin | |||
instruction_o.fu = CTRL_FLOW; | |||
instruction_o.op = ariane_pkg::JALR; | |||
instruction_o.rs1[4:0] = instr.itype.rs1; | |||
instruction_o.rs1 = instr.itype.rs1; |
There was a problem hiding this comment.
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 🐶
instruction_o.rs1 = instr.itype.rs1; | |
instruction_o.rs1 = instr.itype.rs1; |
core/decoder.sv
Outdated
imm_select = IIMM; | ||
instruction_o.rd[4:0] = instr.itype.rd; | ||
instruction_o.rd = instr.itype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.rd = instr.itype.rd; | |
instruction_o.rd = instr.itype.rd; |
core/decoder.sv
Outdated
@@ -1402,21 +1402,21 @@ | |||
riscv::OpcodeJal: begin | |||
instruction_o.fu = CTRL_FLOW; | |||
imm_select = JIMM; | |||
instruction_o.rd[4:0] = instr.utype.rd; | |||
instruction_o.rd = instr.utype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.rd = instr.utype.rd; | |
instruction_o.rd = instr.utype.rd; |
core/decoder.sv
Outdated
@@ -820,9 +820,9 @@ module decoder | |||
// -------------------------- | |||
riscv::OpcodeOp32: begin | |||
instruction_o.fu = (instr.rtype.funct7 == 7'b000_0001) ? MULT : ALU; |
There was a problem hiding this comment.
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 🐶
instruction_o.fu = (instr.rtype.funct7 == 7'b000_0001) ? MULT : ALU; | |
instruction_o.fu = (instr.rtype.funct7 == 7'b000_0001) ? MULT : ALU; |
core/decoder.sv
Outdated
@@ -1391,9 +1391,9 @@ module decoder | |||
riscv::OpcodeJalr: begin | |||
instruction_o.fu = CTRL_FLOW; | |||
instruction_o.op = ariane_pkg::JALR; | |||
instruction_o.rs1[4:0] = instr.itype.rs1; | |||
instruction_o.rs1 = instr.itype.rs1; |
There was a problem hiding this comment.
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 🐶
instruction_o.rs1 = instr.itype.rs1; | |
instruction_o.rs1 = instr.itype.rs1; |
core/decoder.sv
Outdated
imm_select = IIMM; | ||
instruction_o.rd[4:0] = instr.itype.rd; | ||
instruction_o.rd = instr.itype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.rd = instr.itype.rd; | |
instruction_o.rd = instr.itype.rd; |
core/decoder.sv
Outdated
@@ -1402,21 +1402,21 @@ module decoder | |||
riscv::OpcodeJal: begin | |||
instruction_o.fu = CTRL_FLOW; | |||
imm_select = JIMM; | |||
instruction_o.rd[4:0] = instr.utype.rd; | |||
instruction_o.rd = instr.utype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.rd = instr.utype.rd; | |
instruction_o.rd = instr.utype.rd; |
core/decoder.sv
Outdated
imm_select = UIMM; | ||
instruction_o.fu = ALU; |
There was a problem hiding this comment.
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 🐶
imm_select = UIMM; | |
instruction_o.fu = ALU; | |
imm_select = UIMM; | |
instruction_o.fu = ALU; |
core/decoder.sv
Outdated
imm_select = IIMM; | ||
instruction_o.rd[4:0] = instr.itype.rd; | ||
instruction_o.rd = instr.itype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.rd = instr.itype.rd; | |
instruction_o.rd = instr.itype.rd; |
core/decoder.sv
Outdated
@@ -1402,21 +1402,21 @@ module decoder | |||
riscv::OpcodeJal: begin | |||
instruction_o.fu = CTRL_FLOW; | |||
imm_select = JIMM; | |||
instruction_o.rd[4:0] = instr.utype.rd; | |||
instruction_o.rd = instr.utype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.rd = instr.utype.rd; | |
instruction_o.rd = instr.utype.rd; |
core/decoder.sv
Outdated
imm_select = UIMM; | ||
instruction_o.fu = ALU; |
There was a problem hiding this comment.
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 🐶
imm_select = UIMM; | |
instruction_o.fu = ALU; | |
imm_select = UIMM; | |
instruction_o.fu = ALU; |
core/decoder.sv
Outdated
instruction_o.fu = (instr.rtype.funct7 == 7'b000_0001) ? MULT : ALU; | ||
instruction_o.rs1 = instr.rtype.rs1; | ||
instruction_o.rs2 = instr.rtype.rs2; | ||
instruction_o.rd = instr.rtype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.rd = instr.rtype.rd; | |
instruction_o.rd = instr.rtype.rd; |
core/decoder.sv
Outdated
@@ -1391,9 +1391,9 @@ module decoder | |||
riscv::OpcodeJalr: begin | |||
instruction_o.fu = CTRL_FLOW; | |||
instruction_o.op = ariane_pkg::JALR; | |||
instruction_o.rs1[4:0] = instr.itype.rs1; | |||
instruction_o.rs1 = instr.itype.rs1; |
There was a problem hiding this comment.
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 🐶
instruction_o.rs1 = instr.itype.rs1; | |
instruction_o.rs1 = instr.itype.rs1; |
core/decoder.sv
Outdated
imm_select = IIMM; | ||
instruction_o.rd[4:0] = instr.itype.rd; | ||
instruction_o.rd = instr.itype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.rd = instr.itype.rd; | |
instruction_o.rd = instr.itype.rd; |
core/decoder.sv
Outdated
@@ -1402,21 +1402,21 @@ module decoder | |||
riscv::OpcodeJal: begin | |||
instruction_o.fu = CTRL_FLOW; | |||
imm_select = JIMM; | |||
instruction_o.rd[4:0] = instr.utype.rd; | |||
instruction_o.rd = instr.utype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.rd = instr.utype.rd; | |
instruction_o.rd = instr.utype.rd; |
core/decoder.sv
Outdated
imm_select = UIMM; | ||
instruction_o.fu = ALU; |
There was a problem hiding this comment.
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 🐶
imm_select = UIMM; | |
instruction_o.fu = ALU; | |
imm_select = UIMM; | |
instruction_o.fu = ALU; |
core/decoder.sv
Outdated
instruction_o.fu = (instr.rtype.funct7 == 7'b000_0001) ? MULT : ALU; | ||
instruction_o.rs1 = instr.rtype.rs1; | ||
instruction_o.rs2 = instr.rtype.rs2; | ||
instruction_o.rd = instr.rtype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.rd = instr.rtype.rd; | |
instruction_o.rd = instr.rtype.rd; |
core/decoder.sv
Outdated
@@ -1402,21 +1402,21 @@ | |||
riscv::OpcodeJal: begin | |||
instruction_o.fu = CTRL_FLOW; | |||
imm_select = JIMM; | |||
instruction_o.rd[4:0] = instr.utype.rd; | |||
instruction_o.rd = instr.utype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.rd = instr.utype.rd; | |
instruction_o.rd = instr.utype.rd; |
core/decoder.sv
Outdated
imm_select = UIMM; | ||
instruction_o.fu = ALU; |
There was a problem hiding this comment.
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 🐶
imm_select = UIMM; | |
instruction_o.fu = ALU; | |
imm_select = UIMM; | |
instruction_o.fu = ALU; |
core/decoder.sv
Outdated
instruction_o.fu = (instr.rtype.funct7 == 7'b000_0001) ? MULT : ALU; | ||
instruction_o.rs1 = instr.rtype.rs1; | ||
instruction_o.rs2 = instr.rtype.rs2; | ||
instruction_o.rd = instr.rtype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.rd = instr.rtype.rd; | |
instruction_o.rd = instr.rtype.rd; |
core/decoder.sv
Outdated
imm_select = UIMM; | ||
instruction_o.fu = ALU; |
There was a problem hiding this comment.
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 🐶
imm_select = UIMM; | |
instruction_o.fu = ALU; | |
imm_select = UIMM; | |
instruction_o.fu = ALU; |
core/decoder.sv
Outdated
instruction_o.fu = (instr.rtype.funct7 == 7'b000_0001) ? MULT : ALU; | ||
instruction_o.rs1 = instr.rtype.rs1; | ||
instruction_o.rs2 = instr.rtype.rs2; | ||
instruction_o.rd = instr.rtype.rd; |
There was a problem hiding this comment.
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 🐶
instruction_o.rd = instr.rtype.rd; | |
instruction_o.rd = instr.rtype.rd; |
core/decoder.sv
Outdated
@@ -1102,9 +1102,9 @@ | |||
riscv::OpcodeMadd, riscv::OpcodeMsub, riscv::OpcodeNmsub, riscv::OpcodeNmadd: begin | |||
if (CVA6Cfg.FpPresent && fs_i != riscv::Off && ((CVA6Cfg.RVH && (!v_i || vfs_i != riscv::Off)) || !CVA6Cfg.RVH)) begin // only generate decoder if FP extensions are enabled (static) | |||
instruction_o.fu = FPU; |
There was a problem hiding this comment.
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 🐶
instruction_o.fu = FPU; | |
instruction_o.fu = FPU; |
core/decoder.sv
Outdated
@@ -1102,9 +1102,9 @@ module decoder | |||
riscv::OpcodeMadd, riscv::OpcodeMsub, riscv::OpcodeNmsub, riscv::OpcodeNmadd: begin | |||
if (CVA6Cfg.FpPresent && fs_i != riscv::Off && ((CVA6Cfg.RVH && (!v_i || vfs_i != riscv::Off)) || !CVA6Cfg.RVH)) begin // only generate decoder if FP extensions are enabled (static) | |||
instruction_o.fu = FPU; |
There was a problem hiding this comment.
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 🐶
instruction_o.fu = FPU; | |
instruction_o.fu = FPU; |
50a6536
to
e489571
Compare
✔️ successful run, report available here. |
@ASintzoff ready to merge |
rs1[4:0], rs2[4:0], rd[4:0] are replaced by rs1, rs2 and rd.