forked from Github_Repos/cvw
Minor simplification of cacheway way selection muxes.
This commit is contained in:
parent
033f844d09
commit
38adcb5b17
2
pipelined/src/cache/cache.sv
vendored
2
pipelined/src/cache/cache.sv
vendored
@ -174,7 +174,7 @@ module cache #(parameter LINELEN, NUMLINES, NUMWAYS, LOGBWPL, WORDLEN, MUXINTE
|
||||
.d1({Tag, PAdr[SETTOP-1:OFFSETLEN], {OFFSETLEN{1'b0}}}),
|
||||
.d2({Tag, FlushAdr, {OFFSETLEN{1'b0}}}),
|
||||
.s({SelFlush, SelEvict}), .y(CacheBusAdr));
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Flush address and way generation during flush
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
17
pipelined/src/cache/cacheway.sv
vendored
17
pipelined/src/cache/cacheway.sv
vendored
@ -77,9 +77,22 @@ module cacheway #(parameter NUMLINES=512, parameter LINELEN = 256, TAGLEN = 26,
|
||||
logic SetDirtyWay;
|
||||
logic ClearDirtyWay;
|
||||
logic SelectedWay;
|
||||
logic SelWriteback;
|
||||
logic SelData;
|
||||
logic FlushWayEn, VictimWayEn;
|
||||
|
||||
|
||||
assign FlushWayEn = FlushWay & SelFlush;
|
||||
assign VictimWayEn = VictimWay & SelEvict;
|
||||
|
||||
assign SelWriteback = SelFlush | SetValid | SelEvict;
|
||||
//assign SelWriteback = FlushWay | SetValid | SelEvict;
|
||||
|
||||
mux2 #(1) seltagmux(VictimWay, FlushWay, SelFlush, SelTag);
|
||||
mux2 #(1) selectedwaymux(HitWay, SelTag, SelFlush | SetValid | SelEvict, SelectedWay);
|
||||
//assign SelTag = VictimWay | FlushWay;
|
||||
assign SelData = HitWay | FlushWayEn | VictimWayEn;
|
||||
|
||||
mux2 #(1) selectedwaymux(HitWay, SelTag, SelWriteback , SelectedWay);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Write Enable demux
|
||||
@ -133,7 +146,7 @@ module cacheway #(parameter NUMLINES=512, parameter LINELEN = 256, TAGLEN = 26,
|
||||
end
|
||||
|
||||
// AND portion of distributed read multiplexers
|
||||
assign ReadDataLineWay = SelectedWay ? ReadDataLine : '0; // AND part of AO mux.
|
||||
assign ReadDataLineWay = SelData ? ReadDataLine : '0; // AND part of AO mux.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Valid Bits
|
||||
|
Loading…
Reference in New Issue
Block a user