Modified lsu and uncore so only 1 sww is present. The sww is in the LSU if there is a cache or dtim. uncore.sv contains the sww if there is no local memory in the LSU. This is necessary as the subword write needs the read data to be valid and that read data is not aviable in the correct cycle in the LSU if there is no dtim or cache. Muxing could be done to provide the correct read data, but it adds muxes to the critical path.

This commit is contained in:
Ross Thompson 2022-02-16 15:22:19 -06:00
parent a64839d999
commit bd7343b791
2 changed files with 15 additions and 14 deletions

View File

@ -200,7 +200,7 @@ module lsu (
.LSUBusHRDATA, .LSUBusHWDATA, .LSUBusAck, .LSUBusWrite, .LSUBusRead, .LSUBusSize, .LSUBusHRDATA, .LSUBusHWDATA, .LSUBusAck, .LSUBusWrite, .LSUBusRead, .LSUBusSize,
.WordCount, .LSUBusWriteCrit, .WordCount, .LSUBusWriteCrit,
.LSUFunct3M, .LSUBusAdr, .DCacheBusAdr, .DCacheFetchLine, .LSUFunct3M, .LSUBusAdr, .DCacheBusAdr, .DCacheFetchLine,
.DCacheWriteLine, .DCacheBusAck, .DCacheBusWriteData, .LSUPAdrM, .FinalAMOWriteDataM, .DCacheWriteLine, .DCacheBusAck, .DCacheBusWriteData, .LSUPAdrM, .FinalAMOWriteDataM(FinalWriteDataM),
.ReadDataWordM, .ReadDataWordMuxM, .IgnoreRequest, .LSURWM, .CPUBusy, .CacheableM, .ReadDataWordM, .ReadDataWordMuxM, .IgnoreRequest, .LSURWM, .CPUBusy, .CacheableM,
.BusStall, .BusCommittedM); .BusStall, .BusCommittedM);
@ -234,13 +234,12 @@ module lsu (
subwordread subwordread(.ReadDataWordMuxM, .LSUPAdrM(LSUPAdrM[2:0]), subwordread subwordread(.ReadDataWordMuxM, .LSUPAdrM(LSUPAdrM[2:0]),
.Funct3M(LSUFunct3M), .ReadDataM); .Funct3M(LSUFunct3M), .ReadDataM);
// this might only get instantiated if there is a dcache or dtim. if(`DMEM != `MEM_BUS)
// There is a copy in the ebu. *** is it needed there, or can data come in from ebu, get subwordwrite subwordwrite(.HRDATA(CacheableM ? ReadDataWordM : '0), .HADDRD(LSUPAdrM[2:0]),
// muxed here and sent back out. .HSIZED({LSUFunct3M[2], 1'b0, LSUFunct3M[1:0]}),
// Explore changing feedback path from output of AMOALU to subword write *** .HWDATAIN(FinalAMOWriteDataM), .HWDATA(FinalWriteDataM));
subwordwrite subwordwrite(.HRDATA(ReadDataWordM), .HADDRD(LSUPAdrM[2:0]), else
.HSIZED({LSUFunct3M[2], 1'b0, LSUFunct3M[1:0]}), assign FinalWriteDataM = FinalAMOWriteDataM;
.HWDATAIN(FinalAMOWriteDataM), .HWDATA(FinalWriteDataM));
///////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////
// Atomic operations // Atomic operations

View File

@ -90,12 +90,14 @@ module uncore (
// unswizzle HSEL signals // unswizzle HSEL signals
assign {HSELEXT, HSELBootRom, HSELRam, HSELCLINT, HSELGPIO, HSELUART, HSELPLIC, HSELSDC} = HSELRegions[7:0]; assign {HSELEXT, HSELBootRom, HSELRam, HSELCLINT, HSELGPIO, HSELUART, HSELPLIC, HSELSDC} = HSELRegions[7:0];
// subword accesses: converts HWDATAIN to HWDATA // subword accesses: converts HWDATAIN to HWDATA only if no dtim or cache.
// *** can this be merged into LSU instead of replicated? if(`DMEM == `MEM_BUS)
subwordwrite sww( subwordwrite sww(
.HRDATA, .HRDATA,
.HADDRD, .HSIZED, .HADDRD, .HSIZED,
.HWDATAIN, .HWDATA); .HWDATAIN, .HWDATA);
else assign HWDATA = HWDATAIN;
// generate // generate
// on-chip RAM // on-chip RAM