You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
948 B
34 lines
948 B
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) |