Open yupferris opened 3 years ago
I could do some performance analysis. However, for that I'd need some code written in the language. Of course I can make some myself but it sounds like you already have some code about which you're unhappy with its performance. Would you mind sharing that? In general a larger examples folder (apart from the rust docs which are really good already btw!) would be great. But this may be part of #14. I might be making a start on that by the way.
Re perf, until #23 is solved/changed/landed, there may be significant changes in the Verilog generation code (see this issue comment for a mini-status-update on that). However, if you'd still like to look into this now, I suspect the bottleneck is in VCD crate we use and/or the way we use it, so it's probably still worth verifying if that's the case or not, and if so, possibly looking into fixes/alternatives (I'm not against writing our own, for example, but it's probably best to use something off-the-shelf here).
As for test code, the xenowing project's current master branch should be a good candidate. make generated-rtl
(though I think you also need to install a RISC-V toolchain and run make
in sw/boot_rom
first; I'm moving stuff around there too so it's a bit messy) should generate a single Verilog file with all of the necessary system components (minus fringe top-level stuff to get it onto the FPGA), and it's the largest/most extensive kaze project that I know of (by far), so it should be a good candidate for profiling.
Some sharp edges I've noticed while using it (in addition to some of the notes in #4):
Trace
instance optional, even when tracing is enabled, perhaps by taking anOption<T: Trace>
in the ctor. This may have issues with generics, though, since you'd still have to provide aTrace
type for theNone
case.Trace
instance may not be the best thing, since it means the module can no longer implementClone
/Copy
trivially (without the underlyingTrace
impl also implementing these, which forCopy
probably isn't feasible and doesn't seem very clean in the first place).