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
Behavior different with newest version of Cλash (and how to test via downgrade)? #88
Comments
OK, so I successfully downgraded. Probably not the best way; I just cabal-uninstalled everything That fixed the issue. As far as I can tell, this is bad. It means that the behavior of the compiled verilog changed across versions and broke something. The only code changes were replacing For now, I'm going to keep using the old version. How can I help you debug this? I don't actually know what's wrong, just that it broke something. |
I installed the new version of Cλash in a sandbox. I took the exact same code and generated verilog from it with The verilog files generated by Also, something interesting: if I run the sandboxed clash as |
Sorry for all the problems with downgrading... Indeed, I should fix my upper bounds on my own packages so that downgrading is not as difficult as it is now. When you say it broke, you mean that it generated syntactically correct Verilog, but that the Verilog simulation results differ from the Haskell/CLaSH simulation results, correct? Or is it that the generated verilog won't even compile any more? If it is the first, then there's something wrong with one of the new transformations that I introduced, in which case I would really like to have the Verilog testbench (at least, I assume you're having problems building your Lambda16 project for which I couldn't find the Verilog testbench). |
OK, It seems to be what I was dreading: Both the VHDL and Verilog code are syntactically correct... as in GHDL and iverilog accept the code. Which means you did indeed mean that the compiler is not preserving the behaviour of the Haskell description, which is bad. I would really like to have your Verilog testbench (I couldn't find it in your Lambda16 project) so I can run a |
Email sent! The testbench doesn't belong to me, so I didn't put it online publicly. |
Thank you. I will start working on it right away when I get back in the office tomorrow morning. |
OK, it took some time to find the bug, but I fixed it now. Next time I'll be sure to test new transformations more thoroughly before putting a release on hackage. |
Also, thanks a lot for giving me the test bench, it was instrumental in finding the bug. I hope to do a bugfix release today. |
Yay! No problem; glad I could help. |
In a rush to fix issue #88, i first checked for disjoin expressions in the subject of a case-expression, before checking the alternatives of a case-expression. Any expression seen in the subject, would considered not to be disjoint from the expression in the alternatives. However, given a case-expression of the form: > case (f ..) of A -> (f ..); B -> (f ..); C -> (f ..) I would not be able to lift out the 'f's in the alternatives because they are not disjoint from the 'f' in the subject. So, by checking the alternatives first, I can lift out all the 'f's in the alternatives, but leave the 'f' in the subject (because it is not disjoint from the 'f's in the alternatives). Hence DEC now has more oppertunities to make the circuit smaller while still being correctly implemented.
Adds the ability to simulate clock control in networks, and several sample topologies. Adds "probes" to dump simulation data to csv and a python script to generate plots from this data. Networks are created using Template Haskell. Co-authored-by: Leon Schoorl <leon@qbaylogic.com> Co-authored-by: Vanessa McHale <vanessa@qbaylogic.com> Co-authored-by: Martijn Bastiaan <martijn@qbaylogic.com>
All of a sudden, my compiled verilog code stopped working as expected (although the binary version still works as expected). That is to say, the compiled results are now different from the simulated results (using iverilog). I did just update to the newest version of Cλash, and nothing else stands out as having changed. However, I would like to rule this out. How can I downgrade to before Cλash-prelude 0.10?
On hackage, it looks like the constraints are such that a downgrade of clash-ghc won't require older versions of e.g. clash-prelude, which means that, if there's a problem there, this won't fix it. What's the best approach to get my Cλash to the way it was before the most recent updates?
The text was updated successfully, but these errors were encountered: