Almost fixed issues with irom and dtim address selection.

This commit is contained in:
Ross Thompson 2022-08-25 15:52:25 -05:00
parent 32f86b1b6b
commit ad3e632119
2 changed files with 4 additions and 2 deletions

View File

@ -185,7 +185,7 @@ module ifu (
assign InstrRawF = AllInstrRawF[31:0];
if (`IROM) begin : irom
irom irom(.clk, .reset, .Adr(PCNextFSpill), .ReadData(FinalInstrRawF));
irom irom(.clk, .reset, .Adr(CPUBusy | reset ? PCPF : PCNextFSpill), .ReadData(FinalInstrRawF));
assign {BusStall, IFUBusRead} = '0;
assign {ICacheStallF, ICacheMiss, ICacheAccess} = '0;

View File

@ -201,7 +201,9 @@ module lsu (
// *** becomes DTIM_RAM_BASE
if (`DMEM) begin : dtim
dtim dtim(.clk, .reset, .LSURWM, .IEUAdrE, .TrapM, .WriteDataM(LSUWriteDataM),
dtim dtim(.clk, .reset, .LSURWM,
.IEUAdrE(CPUBusy | LSURWM[0] | reset ? IEUAdrM : IEUAdrE),
.TrapM, .WriteDataM(LSUWriteDataM),
.ReadDataWordM(ReadDataWordM[`XLEN-1:0]), .ByteMaskM(ByteMaskM[`XLEN/8-1:0]), .Cacheable(CacheableM));
// since we have a local memory the bus connections are all disabled.