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

Vivado/ModelSim simulation Hanging #80

Open
adeel47 opened this issue Sep 15, 2020 · 4 comments
Open

Vivado/ModelSim simulation Hanging #80

adeel47 opened this issue Sep 15, 2020 · 4 comments

Comments

@adeel47
Copy link

adeel47 commented Sep 15, 2020

I am using riscv-dbg IP with RI5CY core in my design which is running at 25MHz. I am simulating my design Using Vivado (Same issue in ModelSim as well). In Vivado when testing the riscv-dbg tests, in file dm_mem.sv, at line 239 when we got a new request which is a write and the address addr_i becomes HaltedAddr, the Vivado simulation hangs there and is not proceeding anymore, which seems like a race condition has been started. While further debugging the issue, it seems that the simulation gets in a loop between read/write logic always_comb block (line 239) and hart ctrl queue always_comb block (line 136).
I found a temporarily solution as when i replace the always_comb block of hart ctrl queue logic with always@(posedge clk_i), the issue is gone. May i please know what is happening and what could be the right solution of the problem?

@bluewww
Copy link
Collaborator

bluewww commented Oct 1, 2020

So basically two always_comb block are triggering each other forever? I can't reproduce this bug

@adeel47
Copy link
Author

adeel47 commented Oct 1, 2020

Yes, both the always_comb blocks are triggering forever. Which simulator are you using?

@bluewww
Copy link
Collaborator

bluewww commented Oct 1, 2020

Questa Sim-64 vsim 10.7b_1 Simulator 2018.07 Jul 26 2018
or
verilator

@majbthrd
Copy link

I was seeing the same thing in Vivado v2020.2 and have submitted pull request #102 with a suggested fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants