Added mmu tests to regression-wally.

imperas64mmu passes but imperas32mmu does not.
This commit is contained in:
Ross Thompson 2022-01-04 11:13:36 -06:00
parent 4fa19ae4c5
commit f84200fee4
6 changed files with 24 additions and 19 deletions

View File

@ -51,7 +51,7 @@ tc = TestCase(
grepstr="400100000 instructions")
configs.append(tc)
tests64gc = ["arch64i", "arch64priv", "arch64c", "arch64m", "arch64d", "imperas64i", "imperas64f", "imperas64d", "imperas64p", "imperas64m", "imperas64a", "imperas64c", "wally64priv"] # "wally64i", #, "testsBP64"]
tests64gc = ["arch64i", "arch64priv", "arch64c", "arch64m", "arch64d", "imperas64i", "imperas64f", "imperas64d", "imperas64p", "imperas64m", "imperas64a", "imperas64c", "wally64priv", "imperas64mmu"] # "wally64i", #, "testsBP64"]
for test in tests64gc:
tc = TestCase(
name=test,
@ -59,7 +59,7 @@ for test in tests64gc:
cmd="vsim > {} -c <<!\ndo wally-pipelined-batch.do rv64gc "+test+"\n!",
grepstr="All tests ran without failures")
configs.append(tc)
tests32gc = ["arch32i", "arch32priv", "arch32c", "arch32m", "arch32f", "imperas32i", "imperas32f", "imperas32p", "imperas32m", "imperas32a", "imperas32c", "wally32priv"] #"wally32i",
tests32gc = ["arch32i", "arch32priv", "arch32c", "arch32m", "arch32f", "imperas32i", "imperas32f", "imperas32p", "imperas32m", "imperas32a", "imperas32c", "wally32priv", "imperas32mmu"] #"wally32i",
for test in tests32gc:
tc = TestCase(
name=test,

View File

@ -123,7 +123,7 @@ module dcache
mux3 #(INDEXLEN)
AdrSelMux(.d0(LsuAdrE[INDEXLEN+OFFSETLEN-1:OFFSETLEN]),
.d1(PreLsuPAdrM[INDEXLEN+OFFSETLEN-1:OFFSETLEN]), // *** optimize change to virtual address.
.d1(PreLsuPAdrM[INDEXLEN+OFFSETLEN-1:OFFSETLEN]),
.d2(FlushAdr),
.s(SelAdrM),
.y(RAdr));

View File

@ -143,6 +143,7 @@ module dcachefsm
// PTW ready the CPU will stall.
// The page table walker asserts it's control 1 cycle
// after the TLBs miss.
SelAdrM = 2'b01;
NextState = STATE_READY;
end

View File

@ -32,7 +32,8 @@ module icache
input logic CPUBusy,
// mmu
input logic CacheableF,
//input logic CacheableF,
input logic [1:0] IfuRWF,
// cpu side
input logic InvalidateICacheM,
@ -161,7 +162,7 @@ module icache
.IgnoreRequest,
.ICacheBusAck,
.ICacheFetchLine,
.CacheableF,
.IfuRWF,
.hit,
.SelAdr,
.LRUWriteEn);

View File

@ -32,7 +32,7 @@ module icachefsm
input logic CPUBusy,
input logic IgnoreRequest,
input logic CacheableF,
input logic [1:0] IfuRWF,
// BUS interface
input logic ICacheBusAck,
@ -88,7 +88,7 @@ module icachefsm
NextState = STATE_READY;
ICacheStallF = 1'b0;
end
else if (CacheableF & hit) begin
else if (IfuRWF[1] & hit) begin
ICacheStallF = 1'b0;
LRUWriteEn = 1'b1;
if(CPUBusy) begin
@ -97,7 +97,7 @@ module icachefsm
end else begin
NextState = STATE_READY;
end
end else if (CacheableF & ~hit) begin
end else if (IfuRWF[1] & ~hit) begin
SelAdr = 1'b1; /// *********(
NextState = STATE_MISS_FETCH_WDV;
end else begin

View File

@ -240,10 +240,13 @@ module ifu (
generate
if(`MEM_ICACHE) begin : icache
logic [1:0] IfuRWF;
assign IfuRWF = CacheableF ? 2'b10 : 2'b00;
icache icache(.clk, .reset, .CPUBusy, .IgnoreRequest, .ICacheMemWriteData , .ICacheBusAck,
.ICacheBusAdr, .ICacheStallF, .FinalInstrRawF,
.ICacheFetchLine,
.CacheableF,
.IfuRWF(IfuRWF), //aways read
.PCNextF(PCNextFMux),
.PCPF(PCPF),
.PCF(PCFMux),