Merge branch 'master' into ariane_next

This commit is contained in:
Florian Zaruba 2018-07-20 21:33:23 -07:00
commit 6d5966130f
No known key found for this signature in database
GPG key ID: E742FFE8EC38A792
5 changed files with 24 additions and 13 deletions

@ -1 +1 @@
Subproject commit da0e5af3f04c67cb89a19f5c25f979c4d2b6bec3
Subproject commit 4650ca9006d3ed7dddb3078af150467087823c19

@ -1 +1 @@
Subproject commit 2f1e322c07b483990f31b22e20b8db635b1bec97
Subproject commit ec45a3d13a9b827f35aa76d19a8400e3ef6d13b6

View file

@ -287,15 +287,24 @@ module csr_regfile #(
// sstatus is a subset of mstatus - mask it accordingly
CSR_SSTATUS: begin
mstatus_d = csr_wdata;
// also hardwire the registers for sstatus
mstatus_d.sxl = 2'b10;
mstatus_d.uxl = 2'b10;
// hardwired zero registers
mstatus_d.sd = 1'b0;
mstatus_d.xs = 2'b0;
mstatus_d.fs = 2'b0;
mstatus_d.upie = 1'b0;
mstatus_d.uie = 1'b0;
// not all fields of mstatus can be written
mstatus_d.mie = mstatus_q.mie;
mstatus_d.mpie = mstatus_q.mipe;
mstatus_d.mpp = mscratch_q.mpp
mstatus_d.mie = mstatus_q.mie;
mstatus_d.mpie = mstatus_q.mpie;
mstatus_d.mpp = mstatus_q.mpp;
mstatus_d.mprv = mstatus_q.mprv;
mstatus_d.tsr = mstatus_q.tsr;
mstatus_d.tw = mstatus_q.tw;
mstatus_d.tvm = mstatus_q.tvm;
mstatus_d.sxl = mstatus_q.sxl;
mstatus_d.tsr = mstatus_q.tsr;
mstatus_d.tw = mstatus_q.tw;
mstatus_d.tvm = mstatus_q.tvm;
mstatus_d.sxl = mstatus_q.sxl;
// this instruction has side-effects
flush_o = 1'b1;
end

View file

@ -329,9 +329,11 @@ module ptw #(
// -------
// should we have flushed before we got an rvalid, wait for it until going back to IDLE
if (flush_i) begin
// on a flush check whether we are waiting for a grant, if so: wait for it
// if not go back to idle
if ((CS == WAIT_GRANT) && data_gnt_i)
// on a flush check whether we are
// 1. in the PTE Lookup check whether we still need to wait for an rvalid
// 2. waiting for a grant, if so: wait for it
// if not, go back to idle
if ((CS == PTE_LOOKUP && !data_rvalid_q) || ((CS == WAIT_GRANT) && data_gnt_i))
NS = WAIT_RVALID;
else
NS = IDLE;

2
tb

@ -1 +1 @@
Subproject commit d5605a06ecf7e2fa881c55f25870fdcef5433a48
Subproject commit 6ae0254462a495d43d2d1133664bf43d041d532d