Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] spr_eear not saving instruction address when illegal instruction exception #99

Open
JaewonHur opened this issue Dec 4, 2019 · 0 comments · May be fixed by #108
Open

[Bug] spr_eear not saving instruction address when illegal instruction exception #99

JaewonHur opened this issue Dec 4, 2019 · 0 comments · May be fixed by #108

Comments

@JaewonHur
Copy link
Contributor

JaewonHur commented Dec 4, 2019

As in spec,
EEAR register should save the instruction fetch VA when illegal instruction exception.

We should change code in mor1kx_ctrl_cappuccino.v as follow.

    always @(posedge clk `OR_ASYNC_RST)
     if (rst)
       spr_eear <= {OPTION_OPERAND_WIDTH{1'b0}};
     else if (/*padv_ctrl & exception*/ exception_re)
       begin
	  if (except_ibus_err_i | except_itlb_miss_i | except_ipagefault_i | except_illegal_i)
	    spr_eear <= pc_ctrl_i;
	  else if (except_dbus_i | except_dtlb_miss_i | except_dpagefault_i | except_align_i)
	    spr_eear <= ctrl_lsu_adr_i;
       end 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant