From 3c1a1346cb5f843b12d5b5d678532b62e527ae69 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 21 Feb 2020 12:39:20 +0000 Subject: [PATCH] use alternative experimental class TestAddMod2 --- Makefile2 | 1 + Makefile3 | 1 + examples/part_sig_add.py | 5 ++--- examples/test_part_add.py | 13 +++++++++++++ nets3.txt | 4 +--- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Makefile2 b/Makefile2 index a69d673..67b4c52 100755 --- a/Makefile2 +++ b/Makefile2 @@ -11,6 +11,7 @@ NETLISTS = $(shell cat nets2.txt) + VST_FLAGS = --vst-use-concat include ./mk/design-flow.mk diff --git a/Makefile3 b/Makefile3 index 10cf761..f7f0e15 100755 --- a/Makefile3 +++ b/Makefile3 @@ -11,6 +11,7 @@ NETLISTS = $(shell cat nets3.txt) + VST_FLAGS = --vst-use-concat include ./mk/design-flow.mk diff --git a/examples/part_sig_add.py b/examples/part_sig_add.py index 2caf2b4..b6af3b3 100644 --- a/examples/part_sig_add.py +++ b/examples/part_sig_add.py @@ -1,5 +1,5 @@ from nmigen.cli import rtlil -from ieee754.part.test.test_partsig import TestAddMod +from ieee754.part.test.test_partsig import TestAddMod2 import subprocess import os from nmigen import Signal @@ -7,13 +7,12 @@ from nmigen import Signal def test(): width = 16 pmask = Signal(4) # divide into 4-bits - module = TestAddMod(width, pmask) + module = TestAddMod2(width, pmask) sim = create_ilang(module, [pmask, module.a.sig, module.b.sig, module.add_output, - module.eq_output, module.ls_output, module.sub_output, module.eq_output, diff --git a/examples/test_part_add.py b/examples/test_part_add.py index 2e1b234..19527e4 100644 --- a/examples/test_part_add.py +++ b/examples/test_part_add.py @@ -36,6 +36,7 @@ class TestAddMod(Elaboratable): sync += self.add_carry_out.eq(add_carry) return m + if __name__ == '__main__': width = 16 pmask = Signal(3) # divide into 4-bits @@ -50,3 +51,15 @@ if __name__ == '__main__': module.add_carry_out, ], "test_part_add") + print (dir(module)) + add_1 = module.a.m.submodules.add_1 + print (dir(add_1.part_pts)) + create_ilang(add_1, + [pmask, + add_1.a, + add_1.b, + add_1.output, + add_1.carry_in, + add_1.carry_out, + ], + "test_add") diff --git a/nets3.txt b/nets3.txt index 82796b0..886cd9c 100644 --- a/nets3.txt +++ b/nets3.txt @@ -1,3 +1 @@ -test_part_add -ripple -add1 +test_part_add add_1 ripple -- 2.30.2