[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 15:35:53 GMT 2020


--- Comment #204 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jock Tanner from comment #203)

> 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

ermmm ermermerm i like the idea of keeping things in an external file

*thinks*... actually, CSV format would be better, because it's 3 lines of code:

    import csv # standard python library
    with open(file_path, 'r') as csvfile:
        return list(csv.DictReader(csvfile))

remember, we need to minimise the dependencies (see HDL_workflow, and see
discussion we just had!)

in CSV format, it could be:


the defaults would be, if there is no offset, to make one.  the order of
the pins in the CSV file would define the order in which they appear on
that side.

i think that would work really well.  later we can consider actually embedding
the CSV file contents *into* the docstring (or a function) of the actual nmigen
source code.

or something.

if it turns out to be more sophisticated than that, we can revisit this (or use
an alternative format).

basic guiding principle: keep it *real* simple.  i won't go into full detail of
the nightmare story of someone doing a less-functional "Model-View-Controller"
replacement of 800 lines of python i did, once.  he wrote 16 *THOUSAND* lines
of code - in 5 weeks.  for a simple "real-time CPU usage" web app.

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

More information about the libre-riscv-dev mailing list