Skip to content

Commit

Permalink
Merge pull request #12 from CIDARLAB/dev
Browse files Browse the repository at this point in the history
merge dev branch
  • Loading branch information
chris-krenz authored Mar 29, 2024
2 parents 115183c + a534bbe commit b4e3dd3
Show file tree
Hide file tree
Showing 11 changed files with 97,661 additions and 97,646 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Test, Lint, Cover, Profile

on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]

permissions:
contents: read

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest coverage
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: pytest
# - name: Report coverage
# run: |
# coverage run -m pytest
# coverage report
- name: Profile code
run: python -m cProfile core_algorithm/utils/unit_tests/test_dna_design.py
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ If you don't mind running the program in the console without a graphical user in
### Docker Pull
You can pull the image for this core algorithm from the Docker Hub...
```
docker pull
docker pull ckrenz/cello-core-v2-1
```

### Docker Build
Alternatively, you can build the docker image with the following command, executed from the root directory...
```
docker build . -t "cidarlab/cello-core-v2-1"
docker build . -t ckrenz/cello-core-v2-1
```

### Docker Run
After either pulling or building the image, you can start the container as follows...
```
docker run -i -v <LOCAL_DIR_TO_SAVE_RESULTS>:/app/temp_out -v <LOCAL_DIR_TO_SAVE_LOGS>:/app/logs -t cello-core-test
docker run -i -v <LOCAL_DIR_TO_SAVE_RESULTS>:/app/temp_out -v <LOCAL_DIR_TO_SAVE_LOGS>:/app/logs -v <LOCAL_DIR_TO_GET_VERILOGS>:/app/library/verilogs -v <LOCAL_DIR_TO_GET_CONSTRAINT_FILES>:/app/library/constraints -t ckrenz/cello-core-v2-1
```
-i makes the run interactive so that you can interface with the program in the console

-v creates a bind mount to save files on your local system
-v creates a mounts a volume to save files on or read files from your local system


#
Expand Down Expand Up @@ -100,6 +100,10 @@ Alternatively, you could make a script to call the ```CELLO3``` process and use
Input files can be found in the [library](/library/) folder. This includes the UCF files for Cello, as well as a few dozen
Verilog files. You may use your own Verilog files (structural or behavioral) or modified UCF files.


#
## Other Info

#
### Example Output
Here is an example of what the result from Cello looks like in the terminal.
Expand Down Expand Up @@ -137,7 +141,6 @@ $$
Only one iteration is stored in the memory at a time in the exhaustive pass. Each iteration has to store a truth table where each row has inputs toggled ON/OFF. The circuit for the intermediate logic circuit design placement is stored in memory with different data for each row.

#
## Other Info
### Contributing
We welcome contributions from the community! If you'd like to contribute to CELLO-2.1, please follow the guidelines in the CONTRIBUTING.md file.
(Cello 2.1 is still being developed, but we would welcome any feedback.)
Expand Down
Empty file added core_algorithm/__init__.py
Empty file.
10 changes: 5 additions & 5 deletions core_algorithm/celloAlgo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1085,11 +1085,11 @@ def fill_truth_table_IO(graph_node):
print(score)

# NOTE: confirm intermediate output nodes are CMs...
for output in graph.outputs:
if 'Hill_response' != output.func_name: # TODO: What is appropriate CM detection?
for gate in graph.gates:
if output.id in gate.inputs:
score = 0.0, truth_table, truth_table_labels
# for output in graph.outputs:
# if 'Hill_response' != output.func_name: # TODO: What is appropriate CM detection?
# for gate in graph.gates:
# if output.id in gate.inputs:
# score = 0.0, truth_table, truth_table_labels

return score

Expand Down
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import sys

sys.path.insert(0, '../') # Add parent directory to Python path
sys.path.insert(0, '../../') # Add parent directory to Python path
from logic_synthesis import *
import time
from log import *
Expand Down
65 changes: 0 additions & 65 deletions core_algorithm/utils/unit_tests/dna_design_unit_tests.py

This file was deleted.

Loading

0 comments on commit b4e3dd3

Please sign in to comment.