Moore is a compiler for hardware description languages that outputs LLHD, with a focus on usability, clear error reporting, and completeness.
Compilation - parse input file(s) - serialize AST to disk
Elaboration
- load ASTs from disk
- renumber nodes
- resolve names
- lower to HIR
- apply default values
- merge ANSI and non-ANSI ports
- split ports into port decl and var/net decl
- split net decl assignments into net decl and continuous assignment
- always_{ff,latch,comb}
-> always
- flatten nested design elements and sort hierarchy items
- assign and check types (can be one step)
- evaluate const exprs
- specialize generic instances
- lower to MIR
- evaluate generate constructs
- determine scheduling
- perform static analyses (future work)
- lower to LLHD
- link and emit output file
Lowering to HIR resolves syntactic sugar and applies default values. Additionally, the following steps are performed: