[Libre-soc-dev] bitmanip planning

Jacob Lifshay programmerjake at gmail.com
Fri Nov 5 20:11:34 GMT 2021


On Fri, Nov 5, 2021, 12:59 lkcl <luke.leighton at gmail.com> wrote:

> On November 5, 2021 6:35:26 PM UTC, Jacob Lifshay <
> programmerjake at gmail.com> wrote:
>
> >the csv comment field *really* should have been used only for comments,
> >and
> >not what we're currently using it for: the opcode's mnemonic
>
> it came directly from microwatt, and i kept it identical so that if ever
> microwatt wanted to use the CSV files to autogenerate VHDL, they could.
>

well, they can simply use mnemonic + comment as the comment text for vhdl.

alternatively, I can just add a "comment2" field -- that's probably the
best option. Should I just go ahead and add it? I think we should also add
an "unofficial" field that is set to true for all unofficial instructions,
allowing people to easily filter them out.

>
> one possibility is to add a blank line or a line using the comment field
> but all other fields empty.
>

that doesn't work that well when we want to have a mix of official and
unofficial instructions in some file.

>
> another is to add the comments into the markdown "loader" which hm i
> forget where it is or if it's part of the ikiwiki underlay, will look later
>

iirc it's using python's built-in csv parser which doesn't support
comments, unfortunately.

We shouldn't put the comments just in the .py file that parses stuff since
someone could easily use the csv files in their project with their own csv
parser without looking that closely at our .py files -- it's too poorly
associated with the instructions in the csvs.

Jacob


More information about the Libre-soc-dev mailing list