Reordered inputs/outputs in caches.

This commit is contained in:
Ross Thompson 2022-01-03 22:52:50 -06:00
parent fa39de9cef
commit 4b4aa11684
3 changed files with 23 additions and 24 deletions

View File

@ -30,34 +30,35 @@ module dcache
input logic reset, input logic reset,
input logic CPUBusy, input logic CPUBusy,
// mmu
input logic CacheableM,
// cpu side // cpu side
input logic [1:0] LsuRWM, input logic [1:0] LsuRWM,
input logic [1:0] LsuAtomicM, input logic [1:0] LsuAtomicM,
input logic FlushDCacheM, input logic FlushDCacheM,
input logic [11:0] LsuAdrE, // virtual address, but we only use the lower 12 bits. input logic [11:0] LsuAdrE, // virtual address, but we only use the lower 12 bits.
input logic [`PA_BITS-1:0] LsuPAdrM, // physical address input logic [`PA_BITS-1:0] LsuPAdrM, // physical address
input logic [`XLEN-1:0] FinalWriteDataM, input logic [`XLEN-1:0] FinalWriteDataM,
output logic [`XLEN-1:0] ReadDataWordM, output logic [`XLEN-1:0] ReadDataWordM,
output logic DCacheStall,
output logic DCacheMiss,
output logic DCacheAccess,
output logic DCacheCommittedM, output logic DCacheCommittedM,
output logic DCacheWriteLine,
// Bus fsm interface
input logic IgnoreRequest,
output logic DCacheFetchLine, output logic DCacheFetchLine,
output logic DCacheWriteLine,
input logic DCacheBusAck, input logic DCacheBusAck,
output logic [`PA_BITS-1:0] DCacheBusAdr, output logic [`PA_BITS-1:0] DCacheBusAdr,
output logic [`XLEN-1:0] ReadDataBlockSetsM [(`DCACHE_BLOCKLENINBITS/`XLEN)-1:0],
input logic [`DCACHE_BLOCKLENINBITS-1:0] DCacheMemWriteData, input logic [`DCACHE_BLOCKLENINBITS-1:0] DCacheMemWriteData,
output logic [`XLEN-1:0] ReadDataBlockSetsM [(`DCACHE_BLOCKLENINBITS/`XLEN)-1:0],
output logic DCacheStall,
// inputs from TLB and PMA/P // to performance counters
input logic CacheableM, output logic DCacheMiss,
// from ptw output logic DCacheAccess
input logic IgnoreRequest
); );
localparam integer BLOCKLEN = `DCACHE_BLOCKLENINBITS; localparam integer BLOCKLEN = `DCACHE_BLOCKLENINBITS;

View File

@ -30,25 +30,25 @@ module icache
// Basic pipeline stuff // Basic pipeline stuff
input logic clk, reset, input logic clk, reset,
input logic CPUBusy, input logic CPUBusy,
// mmu
input logic CacheableF,
// cpu side
input logic InvalidateICacheM,
input logic [11:0] PCNextF, input logic [11:0] PCNextF,
input logic [`PA_BITS-1:0] PCPF, input logic [`PA_BITS-1:0] PCPF,
input logic [`XLEN-1:0] PCF, input logic [`XLEN-1:0] PCF,
// bus fsm interface
input logic IgnoreRequest, input logic IgnoreRequest,
// Data read in from the ebu unit
input logic [`ICACHE_BLOCKLENINBITS-1:0] ICacheMemWriteData, input logic [`ICACHE_BLOCKLENINBITS-1:0] ICacheMemWriteData,
output logic ICacheFetchLine, output logic ICacheFetchLine,
(* mark_debug = "true" *) input logic ICacheBusAck, (* mark_debug = "true" *) input logic ICacheBusAck,
// Read requested from the ebu unit
(* mark_debug = "true" *) output logic [`PA_BITS-1:0] ICacheBusAdr, (* mark_debug = "true" *) output logic [`PA_BITS-1:0] ICacheBusAdr,
// High if the instruction currently in the fetch stage is compressed
//output logic CompressedF,
// High if the icache is requesting a stall // High if the icache is requesting a stall
output logic ICacheStallF, output logic ICacheStallF,
input logic CacheableF,
input logic InvalidateICacheM,
// The raw (not decompressed) instruction that was requested // The raw (not decompressed) instruction that was requested
// If this instruction is compressed, upper 16 bits may be the next 16 bits or may be zeros // If this instruction is compressed, upper 16 bits may be the next 16 bits or may be zeros

View File

@ -350,8 +350,6 @@ module ifu (
// branch and jump predictor // branch and jump predictor
generate generate
if (`BPRED_ENABLED == 1) begin : bpred if (`BPRED_ENABLED == 1) begin : bpred
// I am making the port connection explicit for now as I want to see them and they will be changing.
bpred bpred(.clk, .reset, bpred bpred(.clk, .reset,
.StallF, .StallD, .StallE, .StallF, .StallD, .StallE,
.FlushF, .FlushD, .FlushE, .FlushF, .FlushD, .FlushE,