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
module_parse(node, mod)
Source code in ashes_fg/fpaa/new_converter.py
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:nodeis the entire Python HDL file (top-level circuit container). - If of type
ast.FunctionDef:nodeis 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. |