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

Mistaken use of variable assignment in ibex_cs_registers.sv #378

Open
chris-stafford-64 opened this issue Jan 8, 2025 · 2 comments · May be fixed by #379
Open

Mistaken use of variable assignment in ibex_cs_registers.sv #378

chris-stafford-64 opened this issue Jan 8, 2025 · 2 comments · May be fixed by #379

Comments

@chris-stafford-64
Copy link

File ibex_cs_registers.sv contains following:
logic cheri_exception_code = mcause_q == 6'h1C;

However, cheri_exception_code is a variable (not a net) and is therefore initialised 'X' at time 0ns and remains 'X'.

Probably really wanted continuous assignment:
logic cheri_exception_code;
assign cheri_exception_code = mcause_q == 6'h1C;

@marnovandermaas
Copy link
Contributor

I wonder why this worked before in that case. Either way I've taken your suggestion and fixed it here: lowRISC/cheriot-ibex@97de74d
This'll be pulled in the next time we pull in the latest version of CHERIoT Ibex.

@chris-stafford-64
Copy link
Author

Thanks Marno.
Yes strange that it has previously worked. Problem was highlighted using Xcelium simulator.

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.

2 participants