Second noob question: is there a natural way, in python or myhdl, to represent a horizontal microcode ROM?
For example, is there a simple/natural way to concatenate enums for representation in each line of the the ROM (e.g. as an intbv) and then, when a line is read, to extract the individual enum fields as separate micro-opcodes for different functional elements?
Here’s a link to the wikipedia article, which covers horizontal and vertical microcode. In horizontal microcode the control word is a set of (usually) fixed-width fields, each of which controls a different functional block in a processor, e.g. ALU operations, status flag control, operand selection and so on. For design and debugging it’s preferable to express these operations in a human readable form (see below), which can then be compiled into the memory contents. If each field is specified using an enumerated type this should help detect errors.
However, once the control word is read from the memory, it would then be helpful to unpack the enumerations for use in each separate block.
Perhaps I’m arguing myself into modelling each line of the ROM as a list of enums, or as an object with particular enum elements, and then maybe using something else to generate a binary output for synthesis.