[libre-riscv-dev] pinmux in nmigen

Rishabh Jain rishucoding at gmail.com
Fri Apr 12 13:51:30 BST 2019


one quick question: I checked this link:
https://www.crowdsupply.com/libre-risc-v/m-class while I was reading your
post on riscv hw-dev group. It says " With RISC-V being 40% more power
efficient than x86 or ARM...", an eye-opener
for me. Can you share some source supporting this ? as I am very curious to
understand how ISA helps in saving energy.
As I understand, I think the support for compressed instructions which
increases code density (by putting more instructions in same
amount of memory) is one reason.

continuing to the previous discussion:
1. i understood writing unit test. Really good comments by daniel helped me
to grasp things.
2. i checked the makefile in pinmux. Yess.. you are using epydoc there. I
will try to follow from there.
3. i will get back by Tuesday with (2) and pinmux hdl/rec.py

can we put implementation of pinmux in nmigen as a big task for NLnet
foundation proposal?
we can discuss over breaking into milestons .. and have a rough timeline
for completion?




On Thu, Apr 4, 2019 at 3:50 AM Luke Kenneth Casson Leighton <lkcl at lkcl.net>
wrote:

> On Wed, Apr 3, 2019 at 6:05 PM Rishabh Jain <rishucoding at gmail.com> wrote:
> >
> > Hello luke,
> >
> > I have started with migen. I found a good tutorial at
> > http://blog.lambdaconcept.com/doku.php?id=migen:tutorial
> > I am getting to like it :)
>
>  oo that's a good tutorial example, i'll make a note of it here
> https://libre-riscv.org/3d_gpu/
>
> > Now, I have a better understanding of migen.
> > I found there are some good examples in migen and nmigen repo. I am going
> > to check them soon.
>
>  yehyeh they're pretty good.  now if you look again at daniel's work
> (and also back at the tutorial) you'll see how to set up a simulaton
> (a unit test), which is a key step.
>
> > I was wondering if there is any technical document on migen or nmigen
> > giving complete documentation about this library. are you aware of
> anything
> > here?
>
>  *sigh* ok so one way is to run epydoc on the actual source code
> (remember that in the Makefile of the pinmux?) and that will give you
> something current, based on the docstrings.  or, you can go here but
> bear in mind it's based on migen not nmigen:
> https://m-labs.hk/migen/manual/
>
> > I find migen similar to cocotb in the sense, we write the design logic in
> > high level abstract manner (FHDL).
>
>  yehyeh
>
> > I remember, we were using myHdl?
>
>  that's right.
>
> > So, may you give me some pointers on choosing nmigen over it?
>
>  myhdl you are forced to conform to a strict subset of python.  using
> classes is extremely awkward, and constructing complex data structures
> even more so.
>
>  by contrast, in nmigen and migen, you get to use *python* features to
> construct the HDL.
>
> > I haven't checked pinmux yet, but for starting writing modules in nmigen,
> > may you share thoughts on where can I begin?
>
>  well, try looking at two similar examples from migen and nmigen, then
> pick say that tutorial and do a conversion from migen to nmigen.
>
>  first of course, have a unit test working and be familiar with the
> gtkwave output.   you *should* be able to do it nearly line-by-line
> and still on each change have the unit test running, because there is
> a compatibility from migen to nmigen.
>
>  just... do it :)
>
>  btw when you get to the pinmux, have a look at nmigen Record
> (hdl/rec.py) - you'll find it *already has* the exact in/out
> capability we need!
>
> l.
>
> _______________________________________________
> libre-riscv-dev mailing list
> libre-riscv-dev at lists.libre-riscv.org
> http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
>


More information about the libre-riscv-dev mailing list