[libre-riscv-dev] [Bug 276] SR NAND Latch needed in nmigen
bugzilla-daemon at libre-riscv.org
bugzilla-daemon at libre-riscv.org
Fri Apr 3 14:58:51 BST 2020
http://bugs.libre-riscv.org/show_bug.cgi?id=276
--- Comment #7 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to whitequark from comment #6)
> > yes. this i _believe_ is what Staf has implemented for us, in the nsxlib Cell Library: http://bugs.libre-riscv.org/show_bug.cgi?id=154#c21
>
> If your designs are already using $sr cells then the cxxsim approach would
> be ideal.
brilliant. at a suitable time in the future we'd need a (quick) indicator
on how to express $sr in nmigen
> > ah then that's worthwhile investigating straight away. are there examples anywhere?
>
> Yes, in the pull request introducing the backend (which is not yet merged,
> I'm adding some polish to it right now):
> https://github.com/YosysHQ/yosys/pull/1562. The examples are a bit sparse
> but I think the developers working on this project will have no issues
> figuring things out
correct :)
> (or just ask me).
>
> The general idea behind cxxsim is to be as straightforward translation of
> RTLIL to C++ as possible. Of course, RTLIL is not imperative, so some extra
> logic is necessary.
>
> This extra logic isn't something I invented myself, but rather I took the
> well-known VHDL two-phase simulator that provides deterministic* results
> regardless of evaluation order, even for combinatorial loops, and adapted it
> to RTLIL. Some VHDL developers call it "the crown jewel of VHDL" and I
> concur, it is an excellent algorithm.
i heard rumour about this from elsewhere.
> > out of interest would that be feasible using cxxsim (either as an addition
> > to cocotb or as a separate project)?
>
> So, I'm working on two different patches, which are somewhat confusingly
> named "cxxrtl" and "cxxsim".
:)
> For now I suggest that you simulate your code using a C++ testbench to see
> what sort of performance you get, and running simple acceptanace tests to
> see if there are any glaring issues in cxxrtl that break your design.
willdo.
> I
> think there is no point writing code to integrate cxxrtl with cocotb; cxxsim
> is about as much effort, and will let you use your exiting testcases
> unmodified.
fantastic.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-riscv-dev
mailing list