mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Added mmu tests to regression-wally.
imperas64mmu passes but imperas32mmu does not.
This commit is contained in:
parent
4fa19ae4c5
commit
f84200fee4
@ -51,7 +51,7 @@ tc = TestCase(
|
|||||||
grepstr="400100000 instructions")
|
grepstr="400100000 instructions")
|
||||||
configs.append(tc)
|
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:
|
for test in tests64gc:
|
||||||
tc = TestCase(
|
tc = TestCase(
|
||||||
name=test,
|
name=test,
|
||||||
@ -59,7 +59,7 @@ for test in tests64gc:
|
|||||||
cmd="vsim > {} -c <<!\ndo wally-pipelined-batch.do rv64gc "+test+"\n!",
|
cmd="vsim > {} -c <<!\ndo wally-pipelined-batch.do rv64gc "+test+"\n!",
|
||||||
grepstr="All tests ran without failures")
|
grepstr="All tests ran without failures")
|
||||||
configs.append(tc)
|
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:
|
for test in tests32gc:
|
||||||
tc = TestCase(
|
tc = TestCase(
|
||||||
name=test,
|
name=test,
|
||||||
|
2
wally-pipelined/src/cache/dcache.sv
vendored
2
wally-pipelined/src/cache/dcache.sv
vendored
@ -123,7 +123,7 @@ module dcache
|
|||||||
|
|
||||||
mux3 #(INDEXLEN)
|
mux3 #(INDEXLEN)
|
||||||
AdrSelMux(.d0(LsuAdrE[INDEXLEN+OFFSETLEN-1:OFFSETLEN]),
|
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),
|
.d2(FlushAdr),
|
||||||
.s(SelAdrM),
|
.s(SelAdrM),
|
||||||
.y(RAdr));
|
.y(RAdr));
|
||||||
|
1
wally-pipelined/src/cache/dcachefsm.sv
vendored
1
wally-pipelined/src/cache/dcachefsm.sv
vendored
@ -143,6 +143,7 @@ module dcachefsm
|
|||||||
// PTW ready the CPU will stall.
|
// PTW ready the CPU will stall.
|
||||||
// The page table walker asserts it's control 1 cycle
|
// The page table walker asserts it's control 1 cycle
|
||||||
// after the TLBs miss.
|
// after the TLBs miss.
|
||||||
|
SelAdrM = 2'b01;
|
||||||
NextState = STATE_READY;
|
NextState = STATE_READY;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
5
wally-pipelined/src/cache/icache.sv
vendored
5
wally-pipelined/src/cache/icache.sv
vendored
@ -32,7 +32,8 @@ module icache
|
|||||||
input logic CPUBusy,
|
input logic CPUBusy,
|
||||||
|
|
||||||
// mmu
|
// mmu
|
||||||
input logic CacheableF,
|
//input logic CacheableF,
|
||||||
|
input logic [1:0] IfuRWF,
|
||||||
|
|
||||||
// cpu side
|
// cpu side
|
||||||
input logic InvalidateICacheM,
|
input logic InvalidateICacheM,
|
||||||
@ -161,7 +162,7 @@ module icache
|
|||||||
.IgnoreRequest,
|
.IgnoreRequest,
|
||||||
.ICacheBusAck,
|
.ICacheBusAck,
|
||||||
.ICacheFetchLine,
|
.ICacheFetchLine,
|
||||||
.CacheableF,
|
.IfuRWF,
|
||||||
.hit,
|
.hit,
|
||||||
.SelAdr,
|
.SelAdr,
|
||||||
.LRUWriteEn);
|
.LRUWriteEn);
|
||||||
|
26
wally-pipelined/src/cache/icachefsm.sv
vendored
26
wally-pipelined/src/cache/icachefsm.sv
vendored
@ -27,31 +27,31 @@
|
|||||||
|
|
||||||
module icachefsm
|
module icachefsm
|
||||||
(// Inputs from pipeline
|
(// Inputs from pipeline
|
||||||
input logic clk, reset,
|
input logic clk, reset,
|
||||||
|
|
||||||
input logic CPUBusy,
|
input logic CPUBusy,
|
||||||
|
|
||||||
input logic IgnoreRequest,
|
input logic IgnoreRequest,
|
||||||
input logic CacheableF,
|
input logic [1:0] IfuRWF,
|
||||||
|
|
||||||
// BUS interface
|
// BUS interface
|
||||||
input logic ICacheBusAck,
|
input logic ICacheBusAck,
|
||||||
|
|
||||||
// icache internal inputs
|
// icache internal inputs
|
||||||
input logic hit,
|
input logic hit,
|
||||||
|
|
||||||
// Load data into the cache
|
// Load data into the cache
|
||||||
output logic ICacheMemWriteEnable,
|
output logic ICacheMemWriteEnable,
|
||||||
|
|
||||||
// Outputs to pipeline control stuff
|
// Outputs to pipeline control stuff
|
||||||
output logic ICacheStallF,
|
output logic ICacheStallF,
|
||||||
|
|
||||||
// Bus interface outputs
|
// Bus interface outputs
|
||||||
output logic ICacheFetchLine,
|
output logic ICacheFetchLine,
|
||||||
|
|
||||||
// icache internal outputs
|
// icache internal outputs
|
||||||
output logic SelAdr,
|
output logic SelAdr,
|
||||||
output logic LRUWriteEn
|
output logic LRUWriteEn
|
||||||
);
|
);
|
||||||
|
|
||||||
// FSM states
|
// FSM states
|
||||||
@ -88,7 +88,7 @@ module icachefsm
|
|||||||
NextState = STATE_READY;
|
NextState = STATE_READY;
|
||||||
ICacheStallF = 1'b0;
|
ICacheStallF = 1'b0;
|
||||||
end
|
end
|
||||||
else if (CacheableF & hit) begin
|
else if (IfuRWF[1] & hit) begin
|
||||||
ICacheStallF = 1'b0;
|
ICacheStallF = 1'b0;
|
||||||
LRUWriteEn = 1'b1;
|
LRUWriteEn = 1'b1;
|
||||||
if(CPUBusy) begin
|
if(CPUBusy) begin
|
||||||
@ -97,7 +97,7 @@ module icachefsm
|
|||||||
end else begin
|
end else begin
|
||||||
NextState = STATE_READY;
|
NextState = STATE_READY;
|
||||||
end
|
end
|
||||||
end else if (CacheableF & ~hit) begin
|
end else if (IfuRWF[1] & ~hit) begin
|
||||||
SelAdr = 1'b1; /// *********(
|
SelAdr = 1'b1; /// *********(
|
||||||
NextState = STATE_MISS_FETCH_WDV;
|
NextState = STATE_MISS_FETCH_WDV;
|
||||||
end else begin
|
end else begin
|
||||||
|
@ -240,10 +240,13 @@ module ifu (
|
|||||||
|
|
||||||
generate
|
generate
|
||||||
if(`MEM_ICACHE) begin : icache
|
if(`MEM_ICACHE) begin : icache
|
||||||
|
logic [1:0] IfuRWF;
|
||||||
|
assign IfuRWF = CacheableF ? 2'b10 : 2'b00;
|
||||||
|
|
||||||
icache icache(.clk, .reset, .CPUBusy, .IgnoreRequest, .ICacheMemWriteData , .ICacheBusAck,
|
icache icache(.clk, .reset, .CPUBusy, .IgnoreRequest, .ICacheMemWriteData , .ICacheBusAck,
|
||||||
.ICacheBusAdr, .ICacheStallF, .FinalInstrRawF,
|
.ICacheBusAdr, .ICacheStallF, .FinalInstrRawF,
|
||||||
.ICacheFetchLine,
|
.ICacheFetchLine,
|
||||||
.CacheableF,
|
.IfuRWF(IfuRWF), //aways read
|
||||||
.PCNextF(PCNextFMux),
|
.PCNextF(PCNextFMux),
|
||||||
.PCPF(PCPF),
|
.PCPF(PCPF),
|
||||||
.PCF(PCFMux),
|
.PCF(PCFMux),
|
||||||
|
Loading…
Reference in New Issue
Block a user