Upon popular request, airhdl now supports enumerated values for register fields.
Enumerated values are a convenient was to give names to specific field values. As an example, we’ll take a two bit
mode field that is used to control a processing engine. This field supports the following values:
• 0: disabled
• 1: manual
• 2: automatic
When creating and/or editing this field in airhdl, you now have a way to capture those values in the user interface. You just need to enter them as comma-separated key/value pairs:
Once you have done that, airhdl knows about those values and corresponding symbols appear in the generated files. For example, in the generated C header, you’ll find them as preprocessor defines:
Of course, your enumerated values are available in the generated RTL code (VHDL and SystemVerilog) as constants too.
We hope you’ll find them useful.