From d15cf5c65c8626829aa1971aa91f6458779f47e5 Mon Sep 17 00:00:00 2001 From: Ross Thompson Date: Fri, 9 Dec 2022 17:07:35 -0600 Subject: [PATCH] Added comments about why it is not possible to use FlushWay and VictimWay directly. --- pipelined/src/cache/cacheway.sv | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pipelined/src/cache/cacheway.sv b/pipelined/src/cache/cacheway.sv index 8a075a46..1fcc2566 100644 --- a/pipelined/src/cache/cacheway.sv +++ b/pipelined/src/cache/cacheway.sv @@ -82,11 +82,12 @@ module cacheway #(parameter NUMLINES=512, parameter LINELEN = 256, TAGLEN = 26, logic FlushWayEn, VictimWayEn; + // FlushWay and VictimWay are part of a one hot way selection. Must clear them if FlushWay not selected + // or VictimWay not selected. assign FlushWayEn = FlushWay & SelFlush; assign VictimWayEn = VictimWay & SelEvict; - assign SelWriteback = SelFlush | SetValid | SelEvict; - //assign SelWriteback = FlushWay | SetValid | SelEvict; + assign SelWriteback = FlushWayEn | SetValid | SelEvict; mux2 #(1) seltagmux(VictimWay, FlushWay, SelFlush, SelTag); //assign SelTag = VictimWay | FlushWay;