Reference
This part of the documentation focuses on an information-oriented approach. Use it as a reference for the technical implementation of the ASHES project code.
fpaa_compile(funcName)
Returns the verilog code after conversion.
The entry function of the system-level compiler.
Source code in ashes_fg/fpaa/new_converter.py
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 |
|
module_parse(node, mod)
Source code in ashes_fg/fpaa/new_converter.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
parse_py(node)
Takes a Python-style HDL circuit description and translates it into an
intermediate Verilog netlist. This function walks the AST (abstract syntax
tree) of the Python HDL file recursively, thereby allowing a top-level
circuit to contain many subcircuits. The recursion continues until a node
that is a function definition is passed; in ASHES' Python HDL, a function
definition is where the circuit elements are actually istantiated and
connected, which is why the base case executes module_parse()
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node
|
Module | FunctionDef
|
An AST node produced by Python's |
required |
- If of type
ast.Module
:node
is the entire Python HDL file (top-level circuit container). - If of type
ast.FunctionDef
:node
is a function that contains circuit instantiations and connections.
Returns:
Name | Type | Description |
---|---|---|
module_ast |
module_ast
|
An object representing the parsed Verilog module. Contains the module's name, ports, instances, and connectivity extracted from the Python HDL. |
Source code in ashes_fg/fpaa/new_converter.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|