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
Playing around spinal in scala console fails #1284
Comments
Hi, SpinalHDL can't realy be used in console mode in this way. You have to provide a toplevel component : SpinalVerilog(new MyTopLevel) And have all your hardware statements in that toplevel herarchy Reason is that SpinalHDL has a lot of hidden stuff happening under the hood which require some setup (done by the SpinalVerilog function) |
FYI in case the |
Thanks for pointing out this. Personally I prefer the console way (works like python console which I use a lot). Though '~runMain' produces immediate results, it runs the whole code and print everything all at once. With console, it seems to be more newbie-friendly. For example, to find out the difference between 'd := a |<< c' and 'd := a << c', I can put them in console and see the difference. |
Go it. Assume I'd like to learn the difference of '##' and '@@', as a newbie, the preferable way to do so is to type the following code (Pardon me if it has errors):
Is there a way? |
Personnaly, i'm using Intellij Idea and that template project : Else you can use sbt to generate some verilog, see the readme of that template project. Else you can do some one liner as : But the thing is that you need your repl to have the SpinalHDL compiler plugin in. i never tried. |
OK, i'll figure it out. Thank you Dolu. |
I'm learning spinal in windows.
I downloaded the latest SpinalTemplateSbt and msys2. I'm good with compile and run, but have problems playing around spinalhdl in console. Below is my build.sbt with Eclipse Adoptium JDK 17.0.81
Below is what I typed in console. I tried msys and native windows cmd, both gave the same errors.
I can see the results of my code immediately in console. Making it work is really helpful for new learners. Appreciate it!
The text was updated successfully, but these errors were encountered: