Expand description
DSL parsing for instruction definitions.
This module parses .chipi files (or source strings) into an intermediate representation.
The parser handles:
- Decoder configuration (name, width, bit order)
- Type aliases for custom field types
- Instruction definitions with fixed bit patterns and variable fields
Bit ranges are converted from DSL notation (where the order depends on bit_order config) to hardware notation (LSB=0) during validation.
Functionsยง
- dsl_
to_ hardware - Convert DSL bit positions to hardware (LSB=0) positions with unit support.
- parse
- Parse DSL source text into a decoder definition.
- parse_
file - Parse a
.chipifile from a path, resolvingincludedirectives relative to its directory. - parse_
file_ with_ deps - Parse a
.chipifile and return both the definition and the set of all resolved file paths (input + includes). Useful forcargo:rerun-if-changed.