@@ -20,23 +20,29 @@ takahe/
2020 kauri.h Memory safety (arena, bounds, strings).
2121
2222 defs/
23- sv_tok.def Lexer: keywords, operators, literals.
24- sv_opt.def Optimiser: boolean identities, transforms.
25- tech_map.def Mapper: logic pattern -> cell templates.
26- report.def Reporter: output format definitions.
23+ sv_tok.def SystemVerilog lexer (247 kw, 65 ops).
24+ vhdl_tok.def VHDL lexer (118 kw, 34 ops).
25+ abel_tok.def ABEL-HDL lexer (37 kw, 36 ops).
26+ cells.def Binary cell truth tables.
27+ cells_ter.def Ternary cell truth tables.
28+ cells_doz.def Dozenal cell truth tables.
29+ (+ 10 more paradigm defs)
2730
2831 src/
2932 main.c CLI driver. Wires stages together.
3033
3134 lex/ STAGE 1: Lexer + Preprocessor
3235 tk_pp.c Preprocessor (`ifdef, `define, macro expand)
33- tk_lex.c Tokeniser (driven by sv_tok.def)
36+ tk_lex.c SystemVerilog tokeniser (sv_tok.def)
37+ vh_lex.c VHDL tokeniser (vhdl_tok.def)
38+ ab_lex.c ABEL-HDL tokeniser (abel_tok.def)
3439 tk_dload.c Definition loader (two-pass, string interning)
3540
3641 parse/ STAGE 2: Parser
37- tk_parse.c Recursive descent -> flat AST
38- Module, port, param, always, case, if,
39- for, generate, expressions, instantiation.
42+ tk_parse.c SystemVerilog recursive descent -> flat AST
43+ vh_parse.c VHDL recursive descent -> same flat AST
44+ ab_parse.c ABEL-HDL recursive descent -> same flat AST
45+ Three frontends, one AST format.
4046
4147 elab/ STAGE 3: Elaboration
4248 tk_elab.c Parameter resolution, generate expansion.
@@ -74,9 +80,19 @@ takahe/
7480 trtl.c RTL IR tests.
7581 topt.c Optimiser tests.
7682 tmap.c Mapper tests.
83+ tvhdl.c VHDL frontend tests.
84+ tabel.c ABEL-HDL frontend tests.
7785 smoke.sv Basic SystemVerilog (counter + ALU).
7886 bigger.sv FIFO with enums, structs, generate.
7987
88+ designs/
89+ decoder.abl ABEL 2-to-4 decoder (test design).
90+ dozenal_alu.sv Dozenal ALU (generates, instances).
91+ voyager_fds.sv Voyager flight computer.
92+ ruru.sv Probabilistic processor.
93+ qsim.sv Quantum circuit accelerator.
94+ (+ more)
95+
8096
8197NAMING CONVENTIONS
8298==================
@@ -85,7 +101,9 @@ NAMING CONVENTIONS
85101 pp_ preprocessor (lex/)
86102 lx_ lexer (lex/)
87103 dl_ def loader (lex/)
88- pk_ parser (parse/)
104+ pk_ parser, SystemVerilog (parse/)
105+ vh_ parser/lexer, VHDL (parse/, lex/)
106+ ab_ parser/lexer, ABEL (parse/, lex/)
89107 el_ elaboration (elab/)
90108 ce_ constant eval (elab/)
91109 wi_ width inference (elab/)
@@ -112,13 +130,13 @@ NAMING CONVENTIONS
112130DATA FLOW
113131=========
114132
115- Source (.sv)
133+ Source (.sv / .vhd / .abl )
116134 |
117135 [lex/] tk_pp.c -> preprocessed text
118136 |
119- [lex/] tk_lex.c -> tk_token_t[]
137+ [lex/] tk_lex.c / vh_lex.c / ab_lex.c -> tk_token_t[]
120138 |
121- [parse/] tk_parse.c -> tk_node_t[] (flat AST)
139+ [parse/] tk_parse.c / vh_parse.c / ab_parse.c -> tk_node_t[] (flat AST)
122140 |
123141 [elab/] tk_elab.c -> elaborated AST
124142 tk_ceval.c (params resolved, generates expanded,
0 commit comments