6. Programming model
The SiliconCompiler project includes a Python API and programming model to facilitate development of advanced hardware compilation flows. The basic programming model includes the following ordered steps.
6.1. Object Creation
Compilation is based on a single chip object that follows the design from start to finish. A chip object is created by calling the Core API class constructor.
import siliconcompiler chip = siliconcompiler.Chip('topmodule')
Once the chip object has been created, functions and data are all contained within that object. A compilation is set up by accessing methods and parameters from the chip object. Parameters can generally be configured in any order during setup.
The snippet of code below shows the basic principles.
chip.set('input', 'rtl', 'verilog', '<file>.v')
Once all the parameters have been setup, compilation is done by a single atomic call to
Once the compilation has completed, chip object can be queried and another
run() can be called.
chip.summary() print(chip.get('metric', 'cellarea', step='syn', index='0')) #..do something else
For complete information, see the Core API section of the reference manual.