Fix CI 🐛 in CSR exception

This commit is contained in:
Florian Zaruba 2017-06-05 19:13:18 +02:00
parent 059b177382
commit 0ed5df5f0f
2 changed files with 4 additions and 2 deletions

View file

@ -248,7 +248,7 @@ module csr_regfile #(
CSR_MTVAL: mtval_n = csr_wdata;
default: update_access_exception = 1'b1;
endcase
// TODO: this is unnecessary
// so we wrote something, TODO: this can be finer grained (e.g.: did it have side effects?)
flush_o = 1'b1;
end else begin
update_access_exception = 1'b1;
@ -263,6 +263,8 @@ module csr_regfile #(
// Exception is taken
if (ex_i.valid) begin
automatic priv_lvl_t trap_to_priv_lvl = PRIV_LVL_M;
// do not flush, flush is reserved for CSR writes with side effects
flush_o = 1'b0;
// figure out where to trap to
// a m-mode trap might be delegated if we are taking it in S mode
// first figure out if this was an exception or an interrupt e.g.: look at bit 63

View file

@ -107,7 +107,7 @@ module pcgen (
// 4. Exception
// -------------------------------
if (ex_i.valid) begin
npc_n = trap_vector_base_i;
npc_n = trap_vector_base_i;
branch_predict_o.valid = 1'b0;
end