[libre-riscv-dev] [Bug 178] first coriolis2 tutorial, workflow and "test project" page

bugzilla-daemon at libre-riscv.org bugzilla-daemon at libre-riscv.org
Wed Mar 11 14:51:22 GMT 2020


http://bugs.libre-riscv.org/show_bug.cgi?id=178

--- Comment #203 from Jock Tanner <tanner.of.kha at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #201)
> let me know how you get on with the analogy of creating something similar to
> ioring.py, to create "Pads" that you can see in the experiments5 and
> alu_hier nmigen benchs.  you might even be able to use the code *from*
> coriolis2 that imports ioring.py as a base.

Can the solution looks like this:

> ('experiment5/alu_heir.py')
>
> def create_pads(top_element, pins, file_name):
>     for pin in pins:
>         # some introspective magic
>         # as well as a bunch of guessing
>         pass
> 
>     with open(file_name, "w") as ioring:
>         # a bit of templating magic with jinja2
>
>
>         ...
>
>
> if __name__ == "__main__":
>     alu = ALU(width=16)
>     pins = [alu.op, alu.a, alu.b, alu.o]
>     create_pads(alu, pins, "coriolis2/ioring.py")
>     create_ilang(alu, pins, "alu_hier")
>

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-riscv-dev mailing list