6 changed files with 93 additions and 73 deletions
@ -1 +1 @@
@@ -1 +1 @@
|
||||
Subproject commit 53309f9e597c91bf630886f7e125995bf48c6f53 |
||||
Subproject commit f5af7ec3d9554c35f72ed42be6719f49438201c2 |
||||
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
# c17 |
||||
# 5 inputs |
||||
# 2 outputs |
||||
# 0 inverter |
||||
# 6 gates ( 6 NANDs ) |
||||
|
||||
INPUT(1) |
||||
INPUT(2) |
||||
INPUT(3) |
||||
INPUT(6) |
||||
INPUT(7) |
||||
|
||||
OUTPUT(22) |
||||
OUTPUT(23) |
||||
|
||||
10 = NAND(1, 3) |
||||
11 = NAND(3, 6) |
||||
16 = NAND(2, 11) |
||||
19 = NAND(11, 7) |
||||
22 = NAND(10, 16) |
||||
23 = NAND(16, 19) |
||||
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
import pytest |
||||
|
||||
@pytest.fixture(scope='session') |
||||
def mydir(): |
||||
import os |
||||
from pathlib import Path |
||||
return Path(os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))) |
||||
|
||||
@pytest.fixture(scope='session') |
||||
def s27_bench(mydir): |
||||
from kyupy import bench |
||||
# bench parser does not add any clock or set/reset logic. |
||||
return bench.load(mydir / 's27.bench') |
||||
|
||||
@pytest.fixture(scope='session') |
||||
def c17_bench(mydir): |
||||
from kyupy import bench |
||||
# bench parser does not add any clock or set/reset logic. |
||||
return bench.load(mydir / 'c17.bench') |
||||
|
||||
def _resolved(c): |
||||
from kyupy.techlib import KYUPY |
||||
cr = c.copy() |
||||
cr.resolve_tlib_cells(KYUPY) |
||||
return cr |
||||
|
||||
@pytest.fixture(scope='session') |
||||
def c17_resolved(c17_bench): |
||||
# tlib-resolved copy, ready for LogicSim2V / the SAF simulators. |
||||
return _resolved(c17_bench) |
||||
|
||||
@pytest.fixture(scope='session') |
||||
def s27_resolved(s27_bench): |
||||
return _resolved(s27_bench) |
||||
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
# 4 inputs |
||||
# 1 outputs |
||||
# 3 D-type flipflops |
||||
# 2 inverters |
||||
# 8 gates (1 ANDs + 1 NANDs + 2 ORs + 4 NORs) |
||||
|
||||
INPUT(G0) |
||||
INPUT(G1) |
||||
INPUT(G2) |
||||
INPUT(G3) |
||||
|
||||
OUTPUT(G17) |
||||
|
||||
G5 = DFF(G10) |
||||
G6 = DFF(G11) |
||||
G7 = DFF(G13) |
||||
|
||||
G14 = NOT(G0) |
||||
G17 = NOT(G11) |
||||
|
||||
G8 = AND(G14, G6) |
||||
|
||||
G15 = OR(G12, G8) |
||||
G16 = OR(G3, G8) |
||||
|
||||
G9 = NAND(G16, G15) |
||||
|
||||
G10 = NOR(G14, G11) |
||||
G11 = NOR(G5, G9) |
||||
G12 = NOR(G1, G7) |
||||
G13 = NOR(G2, G12) |
||||
Loading…
Reference in new issue