-
Notifications
You must be signed in to change notification settings - Fork 65
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
Add structure for tests & fmt features #30
base: master
Are you sure you want to change the base?
Conversation
The problem is that source files in hw and tb directory would compile twice when execute a test & compile command. |
Why would it compile twice? I don't understand. IIUC it is exactly like |
Emm, That might not be exactly. I mean each time executing compile or test, it will compile all files found in the directory specified. |
Ah you mean the current situations where we put everything in |
Yes |
I don't understand why. I don't know for mill but for sbt it seems that when we split main/test (or equivalently hw/tb) it splits into two compilation units (like two projects actually, |
They are the same, but specify the sources directly might break the internal logic of the build tools. |
I'm annoyed because I cannot reproduce… Can you provide an example, please? |
At first, I would say I mixed some problems together, which is not good. Now, here is some suggestion on this PR.
Suggestions for the whole template:
My first SpinalHDL project is based on this and feels the directory structure is really good. I also understand that hardware people would like directories with "hw/rtl/tb" like structures. So let's keep it as simple as possible to make their modification easily. Btw, I tried your PR with sbt "Test/runMain xxxx.xxxx" it works without multiple compilation. I will try to fix the Mill version. |
PR:
So I suggest, for now, to keep the simulation in Template:
If you can fix mill build I'll thank you much! I'm really bad with mill, sorry I have just done something which seems to work, didn't do more testing 😅 |
Agree |
Closes #28 and #26