mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
More progress towards verilator.
This commit is contained in:
parent
5062a8c89c
commit
4a3cc8b9c8
@ -125,14 +125,21 @@ module copyShadow import cvw::*; #(parameter cvw_t P,
|
||||
output logic CacheValid,
|
||||
output logic CacheDirty);
|
||||
|
||||
logic [P.XLEN-1:0] TagExtend;
|
||||
logic [P.XLEN-1:0] IndexExtend;
|
||||
logic [P.XLEN-1:0] CacheWordExtend;
|
||||
|
||||
assign TagExtend = {{{P.XLEN-(P.PA_BITS-tagstart)}{1'b0}}, tag};
|
||||
assign IndexExtend = {{{P.XLEN-32}{1'b0}}, index};
|
||||
assign CacheWordExtend = {{{P.XLEN-32}{1'b0}}, cacheWord};
|
||||
|
||||
always_ff @(posedge clk) begin
|
||||
if(start) begin
|
||||
CacheTag = tag;
|
||||
CacheTag = TagExtend;
|
||||
CacheValid = valid;
|
||||
CacheDirty = dirty;
|
||||
CacheData = data;
|
||||
CacheAdr = (tag << tagstart) + (index << loglinebytelen) + (cacheWord << $clog2(sramlen/8));
|
||||
CacheAdr = (TagExtend << tagstart) + (IndexExtend << loglinebytelen) + (CacheWordExtend << $clog2(sramlen/8));
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user