-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
913 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
Naja EDA Python Package | ||
======================= | ||
|
||
Naja EDA is a Python package that provides data structures and APIs for developing post-synthesis Electronic Design Automation (EDA) algorithms. | ||
It serves as the Python counterpart to the `Naja C++ project <https://github.com/najaeda/naja>`_. | ||
|
||
Installation | ||
------------ | ||
|
||
Install Naja EDA using pip: | ||
|
||
.. code-block:: bash | ||
|
||
pip install najaeda | ||
|
||
Examples | ||
-------- | ||
|
||
Load a design from a liberty file and a Verilog file | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Following snippet shows how to load primitive cells from a liberty file and | ||
a netlist from a Verilog file. | ||
|
||
.. code-block:: python | ||
|
||
from os import path | ||
from najaeda import netlist | ||
|
||
benchmarks = path.join('..','benchmarks') | ||
liberty_files = [ | ||
'NangateOpenCellLibrary_typical.lib', | ||
'fakeram45_1024x32.lib', | ||
'fakeram45_64x32.lib' | ||
] | ||
liberty_files = list(map(lambda p:path.join(benchmarks, 'liberty', p), liberty_files)) | ||
|
||
netlist.load_liberty(liberty_files) | ||
top = netlist.load_verilog([path.join(benchmarks, 'verilog', 'tinyrocket.v')]) | ||
|
||
top.dump_verilog('tinyrocket_naja.v') | ||
|
||
Print all the instances in the netlist | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Next example shows how to browse all the netlist and print all its content. | ||
|
||
.. code-block:: python | ||
|
||
def print_netlist(instance): | ||
for child_instance in instance.get_child_instances(): | ||
print(f"{child_instance}:{child_instance.get_model_name()}") | ||
print_netlist(child_instance) | ||
|
||
Documentation | ||
------------- | ||
|
||
Comprehensive documentation is available on the `Naja GitHub repository <https://github.com/najaeda/naja>`_. | ||
|
||
License | ||
------- | ||
|
||
This project is licensed under the Apache License 2.0. See the `LICENSE <https://github.com/najaeda/naja/blob/main/LICENSE>`_ file for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ build-backend = "scikit_build_core.build" | |
|
||
[project] | ||
name = "najaeda" | ||
version = "0.1.2" | ||
version = "0.1.3" | ||
description = "Naja EDA Python package" | ||
authors = [{name = "Naja Authors", email = "[email protected]"}] | ||
readme = "README.rst" | ||
|
Oops, something went wrong.