Skip to content

Commit

Permalink
Merge pull request #27 from ehw-fit/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
honzastor authored Oct 3, 2024
2 parents 397876b + 616efb2 commit 63a11f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:
name: documentation
path: html
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4
uses: JamesIves/github-pages-deploy-action@4.1.1
with:
branch: gh-pages # The branch the action should deploy to.
folder: html/ariths_gen # The folder the action should deploy.
12 changes: 9 additions & 3 deletions ariths_gen/core/cgp_circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,15 @@ def __init__(self, code: str = "", input_widths: list = None, inputs: list = Non

assert sum(
input_widths) == c_in, f"CGP input width {c_in} doesn't match input_widths {input_widths}"

inputs = [Bus(N=bw, prefix=f"input_{chr(i)}")
for i, bw in enumerate(input_widths, start=0x61)]

def get_name(i):
if i < 26:
return chr(i + 0x61)
assert i < 26 * 26
return chr(i // 26 + 0x60) + chr(i % 26 + 0x61)

inputs = [Bus(N=bw, prefix=f"input_{get_name(i)}")
for i, bw in enumerate(input_widths)]

# Assign each Bus object in self.inputs to a named attribute of self
for bus in inputs:
Expand Down

0 comments on commit 63a11f2

Please sign in to comment.