forked from Github_Repos/cvw
Simplify IEU-FP datapath
This commit is contained in:
parent
746842107b
commit
69be6d0873
@ -87,8 +87,8 @@ module datapath (
|
|||||||
// Writeback stage signals
|
// Writeback stage signals
|
||||||
logic [`XLEN-1:0] SCResultW;
|
logic [`XLEN-1:0] SCResultW;
|
||||||
logic [`XLEN-1:0] ResultW;
|
logic [`XLEN-1:0] ResultW;
|
||||||
logic [`XLEN-1:0] IFResultW;
|
logic [`XLEN-1:0] IFResultW, IFCvtResultW;
|
||||||
|
|
||||||
// Decode stage
|
// Decode stage
|
||||||
assign Rs1D = InstrD[19:15];
|
assign Rs1D = InstrD[19:15];
|
||||||
assign Rs2D = InstrD[24:20];
|
assign Rs2D = InstrD[24:20];
|
||||||
@ -123,16 +123,14 @@ module datapath (
|
|||||||
flopenrc #(`XLEN) IFResultWReg(clk, reset, FlushW, ~StallW, IFResultM, IFResultW);
|
flopenrc #(`XLEN) IFResultWReg(clk, reset, FlushW, ~StallW, IFResultM, IFResultW);
|
||||||
flopenrc #(5) RdWReg(clk, reset, FlushW, ~StallW, RdM, RdW);
|
flopenrc #(5) RdWReg(clk, reset, FlushW, ~StallW, RdM, RdW);
|
||||||
|
|
||||||
// floating point interactions: fcvt, fp stores
|
// floating point inputs: FIntResM comes from fclass, fcmp, fmv; FCvtIntResW comes from fcvt
|
||||||
if (`F_SUPPORTED) begin:fpmux
|
if (`F_SUPPORTED) begin:fpmux
|
||||||
logic [`XLEN-1:0] IFCvtResultW;
|
|
||||||
mux2 #(`XLEN) resultmuxM(IEUResultM, FIntResM, FWriteIntM, IFResultM);
|
mux2 #(`XLEN) resultmuxM(IEUResultM, FIntResM, FWriteIntM, IFResultM);
|
||||||
mux2 #(`XLEN) cvtresultmuxW(IFResultW, FCvtIntResW, ~FResSelW[1]&FResSelW[0], IFCvtResultW);
|
mux2 #(`XLEN) cvtresultmuxW(IFResultW, FCvtIntResW, ~FResSelW[1]&FResSelW[0], IFCvtResultW);
|
||||||
mux5 #(`XLEN) resultmuxW(IFCvtResultW, ReadDataW, CSRReadValW, MDUResultW, SCResultW, ResultSrcW, ResultW);
|
|
||||||
end else begin:fpmux
|
end else begin:fpmux
|
||||||
assign IFResultM = IEUResultM;
|
assign IFResultM = IEUResultM; assign IFCvtResultW = IFResultW;
|
||||||
mux5 #(`XLEN) resultmuxW(IFResultW, ReadDataW, CSRReadValW, MDUResultW, SCResultW, ResultSrcW, ResultW);
|
|
||||||
end
|
end
|
||||||
|
mux5 #(`XLEN) resultmuxW(IFCvtResultW, ReadDataW, CSRReadValW, MDUResultW, SCResultW, ResultSrcW, ResultW);
|
||||||
|
|
||||||
// handle Store Conditional result if atomic extension supported
|
// handle Store Conditional result if atomic extension supported
|
||||||
if (`A_SUPPORTED) assign SCResultW = {{(`XLEN-1){1'b0}}, SquashSCW};
|
if (`A_SUPPORTED) assign SCResultW = {{(`XLEN-1){1'b0}}, SquashSCW};
|
||||||
|
Loading…
Reference in New Issue
Block a user