Fixed disabling MulDiv when not supported. Started adding generate for FPU unsupported

This commit is contained in:
David Harris 2021-07-04 19:33:46 -04:00
parent 004cac91e1
commit ac163e091c
2 changed files with 351 additions and 331 deletions

View File

@ -43,6 +43,10 @@ module fpu (
output logic [4:0] SetFflagsM, // FPU flags output logic [4:0] SetFflagsM, // FPU flags
output logic [`XLEN-1:0] FPUResultW); // FPU result output logic [`XLEN-1:0] FPUResultW); // FPU result
// *** change FMA to do 16 - 32 - 64 - 128 FEXPBITS // *** change FMA to do 16 - 32 - 64 - 128 FEXPBITS
/*generate
if (`F_SUPPORTED) begin */
// control logic signal instantiation // control logic signal instantiation
logic FWriteEnD, FWriteEnE, FWriteEnM, FWriteEnW; // FP register write enable logic FWriteEnD, FWriteEnE, FWriteEnM, FWriteEnW; // FP register write enable
logic [2:0] FrmD, FrmE, FrmM; // FP rounding mode logic [2:0] FrmD, FrmE, FrmM; // FP rounding mode
@ -398,5 +402,19 @@ module fpu (
SetFflagsM = FPUFlagsW; SetFflagsM = FPUFlagsW;
end end
/* end else begin
assign FStallD = 0;
assign FWriteIntE = 0;
assign FWriteIntM = 0;
assign FWriteIntW = 0;
assign FWriteDataE = 0;
assign FIntResM = 0;
assign FDivBusyE = 0;
assign IllegalFPUInstrD = 0;
assign SetFflagsM = 0;
assign FPUResultW = 0;
end
endgenerate*/
endmodule // fpu endmodule // fpu

View File

@ -139,6 +139,8 @@ module muldiv (
end else begin // no M instructions supported end else begin // no M instructions supported
assign MulDivResultW = 0; assign MulDivResultW = 0;
assign DivBusyE = 0;
assign DivDoneE = 0;
end end
endgenerate endgenerate