forked from Github_Repos/cvw
Made MemPAdrM and related signals PA_BITS wide
This commit is contained in:
parent
de221ff2d0
commit
580ac1c4df
wally-pipelined/src
@ -31,7 +31,7 @@ module dcache(
|
||||
input logic StallW,
|
||||
input logic FlushW,
|
||||
// Upper bits of physical address
|
||||
input logic [`XLEN-1:12] UpperPAdrM,
|
||||
input logic [`PA_BITS-1:12] UpperPAdrM,
|
||||
// Lower 12 bits of virtual address, since it's faster this way
|
||||
input logic [11:0] LowerVAdrM,
|
||||
// Write to the dcache
|
||||
@ -41,7 +41,7 @@ module dcache(
|
||||
input logic [`XLEN-1:0] ReadDataW,
|
||||
input logic MemAckW,
|
||||
// Access requested from the ebu unit
|
||||
output logic [`XLEN-1:0] MemPAdrM,
|
||||
output logic [`PA_BITS-1:0] MemPAdrM,
|
||||
output logic MemReadM, MemWriteM,
|
||||
// High if the dcache is requesting a stall
|
||||
output logic DCacheStallW,
|
||||
@ -56,7 +56,7 @@ module dcache(
|
||||
|
||||
// Input signals to cache memory
|
||||
logic FlushMem;
|
||||
logic [`XLEN-1:12] DCacheMemUpperPAdr;
|
||||
logic [`PA_BITS-1:12] DCacheMemUpperPAdr;
|
||||
logic [11:0] DCacheMemLowerAdr;
|
||||
logic DCacheMemWriteEnable;
|
||||
logic [DCACHELINESIZE-1:0] DCacheMemWriteData;
|
||||
@ -98,7 +98,7 @@ module dcachecontroller #(parameter LINESIZE = 256) (
|
||||
|
||||
// Input the address to read
|
||||
// The upper bits of the physical pc
|
||||
input logic [`XLEN-1:12] DCacheMemUpperPAdr,
|
||||
input logic [`PA_BITS-1:12] DCacheMemUpperPAdr,
|
||||
// The lower bits of the virtual pc
|
||||
input logic [11:0] DCacheMemLowerAdr,
|
||||
|
||||
@ -122,7 +122,7 @@ module dcachecontroller #(parameter LINESIZE = 256) (
|
||||
input logic [`XLEN-1:0] ReadDataW,
|
||||
input logic MemAckW,
|
||||
// The read we request from main memory
|
||||
output logic [`XLEN-1:0] MemPAdrM,
|
||||
output logic [`PA_BITS-1:0] MemPAdrM,
|
||||
output logic MemReadM, MemWriteM
|
||||
);
|
||||
|
||||
@ -144,7 +144,7 @@ module dcachecontroller #(parameter LINESIZE = 256) (
|
||||
|
||||
logic FetchState, BeginFetchState;
|
||||
logic [LOGWPL:0] FetchWordNum, NextFetchWordNum;
|
||||
logic [`XLEN-1:0] LineAlignedPCPF;
|
||||
logic [`PA_BITS-1:0] LineAlignedPCPF;
|
||||
|
||||
flopr #(1) FetchStateFlop(clk, reset, BeginFetchState | (FetchState & ~EndFetchState), FetchState);
|
||||
flopr #(LOGWPL+1) FetchWordNumFlop(clk, reset, NextFetchWordNum, FetchWordNum);
|
||||
|
@ -40,7 +40,7 @@ module dmem (
|
||||
input logic [`XLEN-1:0] WriteDataM,
|
||||
input logic [1:0] AtomicM,
|
||||
input logic CommitM,
|
||||
output logic [`XLEN-1:0] MemPAdrM,
|
||||
output logic [`PA_BITS-1:0] MemPAdrM,
|
||||
output logic MemReadM, MemWriteM,
|
||||
output logic [1:0] AtomicMaskedM,
|
||||
output logic DataMisalignedM,
|
||||
@ -87,8 +87,6 @@ module dmem (
|
||||
logic [1:0] CurrState, NextState;
|
||||
logic preCommittedM;
|
||||
|
||||
logic [`PA_BITS-1:0] MemPAdrMmmu;
|
||||
|
||||
localparam STATE_READY = 0;
|
||||
localparam STATE_FETCH = 1;
|
||||
localparam STATE_FETCH_AMO = 2;
|
||||
@ -97,16 +95,10 @@ module dmem (
|
||||
logic PMPInstrAccessFaultF, PMAInstrAccessFaultF; // *** these are just so that the mmu has somewhere to put these outputs since they aren't used in dmem
|
||||
// *** if you're allowed to parameterize outputs/ inputs existence, these are an easy delete.
|
||||
|
||||
generate
|
||||
if (`XLEN==32)
|
||||
assign MemPAdrM = MemPAdrMmmu[31:0];
|
||||
else
|
||||
assign MemPAdrM = {8'b0, MemPAdrMmmu};
|
||||
endgenerate
|
||||
mmu #(.ENTRY_BITS(`DTLB_ENTRY_BITS), .IMMU(0)) dmmu(.TLBAccessType(MemRWM), .VirtualAddress(MemAdrM),
|
||||
.PTEWriteVal(PageTableEntryM), .PageTypeWriteVal(PageTypeM),
|
||||
.TLBWrite(DTLBWriteM), .TLBFlush(DTLBFlushM),
|
||||
.PhysicalAddress(MemPAdrMmmu), .TLBMiss(DTLBMissM),
|
||||
.PhysicalAddress(MemPAdrM), .TLBMiss(DTLBMissM),
|
||||
.TLBHit(DTLBHitM), .TLBPageFault(DTLBPageFaultM),
|
||||
|
||||
.ExecuteAccessF(1'b0),
|
||||
|
@ -47,7 +47,7 @@ module ahblite (
|
||||
output logic [`XLEN-1:0] InstrRData,
|
||||
output logic InstrAckF,
|
||||
// Signals from Data Cache
|
||||
input logic [`XLEN-1:0] MemPAdrM,
|
||||
input logic [`PA_BITS-1:0] MemPAdrM,
|
||||
input logic MemReadM, MemWriteM,
|
||||
input logic [`XLEN-1:0] WriteDataM,
|
||||
input logic [1:0] MemSizeM,
|
||||
|
@ -135,7 +135,8 @@ module wallypipelinedhart (
|
||||
logic MemReadM, MemWriteM;
|
||||
logic [1:0] AtomicMaskedM;
|
||||
logic [2:0] Funct3M;
|
||||
logic [`XLEN-1:0] MemAdrM, MemPAdrM, WriteDataM;
|
||||
logic [`XLEN-1:0] MemAdrM, WriteDataM;
|
||||
logic [`PA_BITS-1:0] MemPAdrM;
|
||||
logic [`XLEN-1:0] ReadDataW;
|
||||
logic [`XLEN-1:0] InstrPAdrF;
|
||||
logic [`XLEN-1:0] InstrRData;
|
||||
|
Loading…
Reference in New Issue
Block a user