mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Update extend.sv
Program clean up
This commit is contained in:
parent
1d24a9c912
commit
304adcb9b0
@ -30,7 +30,7 @@
|
||||
module extend #(parameter XLEN, A_SUPPORTED) (
|
||||
input logic [31:7] InstrD, // All instruction bits except opcode (lower 7 bits)
|
||||
input logic [2:0] ImmSrcD, // Select what kind of extension to perform
|
||||
output logic [XLEN-1:0 ] ImmExtD); // Extended immediate
|
||||
output logic [XLEN-1:0] ImmExtD); // Extended immediate
|
||||
|
||||
localparam [XLEN-1:0] undefined = {(XLEN){1'bx}}; // could change to 0 after debug
|
||||
|
||||
@ -45,10 +45,10 @@ module extend #(parameter XLEN, A_SUPPORTED) (
|
||||
// J-type (jal)
|
||||
3'b011: ImmExtD = {{(XLEN-20){InstrD[31]}}, InstrD[19:12], InstrD[20], InstrD[30:21], 1'b0};
|
||||
// U-type (lui, auipc)
|
||||
3'b100: ImmExtD = {{(XLEN-31){InstrD[31]}}, InstrD[30:12], 12'b0};
|
||||
3'b100: ImmExtD = {{(XLEN-31){InstrD[31]}}, InstrD[30:12], 12'b0};
|
||||
// Store Conditional: zero offset
|
||||
3'b101: if (A_SUPPORTED) ImmExtD = 0;
|
||||
else ImmExtD = undefined;
|
||||
else ImmExtD = undefined;
|
||||
default: ImmExtD = undefined; // undefined
|
||||
endcase
|
||||
endmodule
|
||||
|
Loading…
Reference in New Issue
Block a user