chipsalliance / chisel-template

A template project for beginning new Chisel work
The Unlicense
583 stars 185 forks source link

Bump to Chisel 6, migrate to svsim #122

Closed seldridge closed 9 months ago

seldridge commented 9 months ago

Bump the template to Chisel 6. Drop the ChiselTest dependency and migrate to svsim.

The test is not as efficient as it could be right now. However, it works!

seldridge commented 9 months ago

I think this needs to install Verilator in the image as this is working locally for me.

schoeberl commented 9 months ago

LGTM. At least we see now svsim in action. Still very low lever, but I think we can build on that.

seldridge commented 9 months ago

LGTM. At least we see now svsim in action. Still very low lever, but I think we can build on that.

Yep! Please start seeing if this would work for you and your teaching.

Note that this example can be made much, much cleaner. I don't see why we couldn't add the equivalent of enqueueSeq and dequeueSeq at a minimum. This can also land directly in Chisel's svsim area so it works for any decoupled. Fork and join are more tedious, but I don't see why this couldn't be made to work.

seldridge commented 9 months ago

This works in CI with a manual Verilator install. The installation can be sped up by properly setting up ccache (which Verilator is configured to use by default). 🎊 It would also be worthwhile to see if upstream verilator would accept (or we implement) a GitHub action that just does the Verilator install reusably.

schoeberl commented 9 months ago

LGTM. At least we see now svsim in action. Still very low lever, but I think we can build on that.

Yep! Please start seeing if this would work for you and your teaching.

Note that this example can be made much, much cleaner. I don't see why we couldn't add the equivalent of enqueueSeq and dequeueSeq at a minimum. This can also land directly in Chisel's svsim area so it works for any decoupled. Fork and join are more tedious, but I don't see why this couldn't be made to work.

Yes, to fork and join. It needs to be a bit nicer/polished UI for use in teaching. I will start playing around with it soon ;-) However, I still think we should provide an ChiselTest version based on svsim, with a compatible API. Of course, not using SFC. Just the interface.