Skip to content

Commit

Permalink
Merge pull request #26 from ehw-fit/devel
Browse files Browse the repository at this point in the history
Merge Devel into Main
  • Loading branch information
mrazekv authored Oct 2, 2024
2 parents cf74791 + e804265 commit 397876b
Show file tree
Hide file tree
Showing 73 changed files with 3,161 additions and 940 deletions.
60 changes: 48 additions & 12 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.x'
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Run generating axmults
run: python generate_axmuls.py
- name: Upload results
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v4
with:
name: arithmetic-circuits-8
path: test_circuits
Expand All @@ -44,17 +44,17 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install iverilog
run: sudo apt install iverilog
- name: Set up Python 3.x
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.x'
- run: python -m pip install numpy
- name: Download workflow run artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: arithmetic-circuits-8
path: test_circuits
Expand All @@ -81,6 +81,42 @@ jobs:
cd tests
bash test_circuits_verilog.sh
cd ..
- name: Python circuits testing
run: |
cd tests
python test_all.py
cd ..
- name: Python ax testing
run: |
cd tests
python test_ax.py
cd ..
- name: Python CGP testing
run: |
cd tests
python test_cgp.py
cd ..
- name: Python Compare testing
run: |
cd tests
python test_compare.py
cd ..
- name: Python Popcount testing
run: |
cd tests
python test_popcnt.py
cd ..
- name: Python Reduce testing
run: |
cd tests
python test_reduce.py
cd ..
test_python:
runs-on: ubuntu-latest
Expand All @@ -90,9 +126,9 @@ jobs:
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
name: Python ${{ matrix.python-version }} test
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand All @@ -107,9 +143,9 @@ jobs:
needs: test
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.x'
Expand All @@ -123,12 +159,12 @@ jobs:
- name: Generate documentation
run: pdoc --html ariths_gen
- name: Upload results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: documentation
path: html
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.4.1
uses: JamesIves/github-pages-deploy-action@4
with:
branch: gh-pages # The branch the action should deploy to.
folder: html/ariths_gen # The folder the action should deploy.
8 changes: 7 additions & 1 deletion .testall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@ cd tests
bash test_mac.sh
bash test_circuits.sh
bash test_circuits_verilog.sh
bash test_circuits_cgp.sh
bash test_circuits_cgp.sh
python test_all.py
python test_ax.py
python test_cgp.py
python test_compare.py
python test_popcnt.py
python test_reduce.py
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ print("Mean average error", np.abs(r - (va * vb)).mean())
The `yosys_equiv_check.sh` script enables to formally check the equivalence of generated Verilog and BLIF representations of the same circuit.
It uses the Yosys Open SYnthesis Suite tool by Claire Xenia Wolf. For further information, please visit: https://yosyshq.readthedocs.io/projects/yosys/en/latest/index.html.

## Install Yosys
```bash
sudo apt-get install yosys
```

## Execute permission
```bash
chmod +x yosys_equiv_check.sh
Expand Down
7 changes: 2 additions & 5 deletions ariths_gen/core/arithmetic_circuits/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
from .arithmetic_circuit import (
ArithmeticCircuit,
ThreeInputArithmeticCircuit
from .general_circuit import (
GeneralCircuit
)

from .general_circuit import (GeneralCircuit)

from .multiplier_circuit import (
MultiplierCircuit
)
Loading

0 comments on commit 397876b

Please sign in to comment.