[Libre-soc-bugs] [Bug 665] very basic nmigen-to-c compiler needed
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Wed Dec 8 12:57:05 GMT 2021
https://bugs.libre-soc.org/show_bug.cgi?id=665
--- Comment #13 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
https://cffi.readthedocs.io/en/latest/overview.html#if-you-don-t-have-an-already-installed-c-library-to-call
cffi looks really good! it has the huge advantage over ctypes that if
there are any errors in the c definition given, the c compiler will throw
a syntax error.
loooks like a great start
https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=dd56be83b81d17105061478e40fdfa57db9c8af1
that looks like the bare minimum needed, which is great.
one thing you will find incredibly useful, seeing the names of the Signals:
https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=ba350a46860654464853df07e6583f22d052132d
also i fixed an error in nmutil on the detection of the new Simulator API,
the engine= parameter was getting overwritten. i also added an on_Display()
function which, some of us are using a patched version of nmigen which can
output $display for debugging purposes.
can i recommend starting from a waay smaller unit test :)
the one you picked, although it is the ultimate goal here, it generates
so much code that it's both overwhelming and also takes much longer to
run.
feel free to duplicate test_power_decoder.py then drastically cut it back
or even replace the dut with e.g. one of the nmigen examples. this one
would do:
https://git.libre-soc.org/?p=nmigen.git;a=blob;f=examples/basic/ctr.py;hb=HEAD
or, for a pure combinatorial one:
https://git.libre-soc.org/?p=nmigen.git;a=blob;f=examples/basic/pmux.py;hb=HEAD
general advice: start very small so that it's extremely quick, you can
encounter errors quickly, and better relate the input to the output.
overall a fantastic start.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list