mirror of
https://github.com/ehw-fit/ariths-gen.git
synced 2025-04-10 09:12:11 +01:00
commit
63a11f244c
2
.github/workflows/generate.yml
vendored
2
.github/workflows/generate.yml
vendored
@ -164,7 +164,7 @@ jobs:
|
|||||||
name: documentation
|
name: documentation
|
||||||
path: html
|
path: html
|
||||||
- name: Deploy 🚀
|
- name: Deploy 🚀
|
||||||
uses: JamesIves/github-pages-deploy-action@4
|
uses: JamesIves/github-pages-deploy-action@4.1.1
|
||||||
with:
|
with:
|
||||||
branch: gh-pages # The branch the action should deploy to.
|
branch: gh-pages # The branch the action should deploy to.
|
||||||
folder: html/ariths_gen # The folder the action should deploy.
|
folder: html/ariths_gen # The folder the action should deploy.
|
||||||
|
@ -42,9 +42,15 @@ class UnsignedCGPCircuit(GeneralCircuit):
|
|||||||
|
|
||||||
assert sum(
|
assert sum(
|
||||||
input_widths) == c_in, f"CGP input width {c_in} doesn't match input_widths {input_widths}"
|
input_widths) == c_in, f"CGP input width {c_in} doesn't match input_widths {input_widths}"
|
||||||
|
|
||||||
|
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_{chr(i)}")
|
inputs = [Bus(N=bw, prefix=f"input_{get_name(i)}")
|
||||||
for i, bw in enumerate(input_widths, start=0x61)]
|
for i, bw in enumerate(input_widths)]
|
||||||
|
|
||||||
# Assign each Bus object in self.inputs to a named attribute of self
|
# Assign each Bus object in self.inputs to a named attribute of self
|
||||||
for bus in inputs:
|
for bus in inputs:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user