-
Notifications
You must be signed in to change notification settings - Fork 1
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
Unittest failure in coupling.d(48) #1
Comments
Hi @gmlewis, thanks for the bug report. Can you please post the generated rtl/Coupling/obj_dir/VCoupling.h (or the entire /rtl/Coupling/obj_dir folder) somewhere for me to take a look? My current best guess of what might be happening here is that there is a bug computing the offset of where that signal is represented in memory, so having that header file would help diagnose it. Is it a 32- or 64-bit OS? This DHDL design is not very good, and I published it mostly just as a stop gag. Fortunately, at the end of last year I did a redesign, which I am much happier with. Then I started a new job and I dropped work on this for a while. By coincidence, just this past weekend I picked this up again, and I started converting my DConf demo to use the new design. Over the following weeks, I'm going to be finishing the conversion, cleaning up the demo hardware design and I'll publish both the new DHDL version (in this repo) and my demo hardware (in another repo). I'm also working on a compiler that will serve as a testbed for several D-related experiments, including as a frontend for DHDL, so that you can design hardware with a much more natural syntax than the DHDL library affords, but that will take longer to achieve. |
Hi @luismarques - sure, I've made gists of VCoupling.h and VCoupling.cpp for you. But after reading your second paragraph, I'm really excited to try out your new design, so if you want to ignore this report and focus on the new design, that is totally fine with me! 😄 |
The new design still uses the same/similar code for getting the signal offsets, so it's still important to get to the bottom of this issue. Thanks for the files, I'll take a look at them. |
@gmlewis In the meanwhile, if you could upgrade to the latest version of Verilator (it should be easy to compile it yourself) and try running the tests again, that would also help. |
Hi @luismarques - it turns out I already was using the latest version:
|
@gmlewis Thanks. When I find the time I'll send you a (source code) program that will diagnose this issue by running the simulation both from C++ and D, as well as looking at the signal memory addresses, to try to find the discrepancy. |
@gmlewis Before I write the program to diagnose this situation, I thought I should see if I could reproduce it locally, as that would be easier to debug. I installed Linux Mint but I couldn't reproduce the issue (all tests passed). Could you please provide more information, such as:
Thanks! |
I'm now away from my machine. I should have access again next week and will get the answers for you. |
Sorry for the delay!
|
@gmlewis Thanks for the bug report. The problem was the reset logic. Before the fix (3d4514f), DHDL did:
It now does:
I'm not quite sure how Verilog's event ordering requirements and the Verilator Notes for future improvement:
|
That fixed it for me, @luismarques! Thank you! |
When I run
dub test
on Linux Mint, everything passes except:Also, are there any example designs using
dhdl
?The text was updated successfully, but these errors were encountered: