circt icon indicating copy to clipboard operation
circt copied to clipboard

Share HW Parameter List Parsing and Printing

Open andrewb1999 opened this issue 2 years ago • 1 comments

Currently, the code for parsing/printing HW parameter lists is duplicated between the MSFT dialect and the HW dialect. Soon, the Calyx dialect will also need to parse/print HW parameter lists, resulting in the code being duplicated again.

The parsing/printing code for these parameters should be shared instead of duplicated. A few solutions have been proposed in #3565, including moving the parsing into the HWInstanceLike interface or something like Support/PrinterParsers.h.

andrewb1999 avatar Jul 29 '22 15:07 andrewb1999

I commonized some parts of parsing, but not all of it. It'd be nice to have a "library" of custom<Blah>(..) parsers which could be used in the assembly format which are useful for parsing/printing module-like ops.

teqdruid avatar Jul 29 '22 20:07 teqdruid