circt
circt copied to clipboard
Share HW Parameter List Parsing and Printing
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
.
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.