From 25aafab86b6c22f711fdd45cdd14f7721cfcffe1 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Thu, 23 Oct 2025 20:46:11 +0000 Subject: [PATCH 1/6] Set `port_id` for Verific PortBus wires --- frontends/verific/verific.cc | 1 + tests/verific/port_bus_order.ys | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 tests/verific/port_bus_order.ys diff --git a/frontends/verific/verific.cc b/frontends/verific/verific.cc index ff8932dac..5790e92f0 100644 --- a/frontends/verific/verific.cc +++ b/frontends/verific/verific.cc @@ -1576,6 +1576,7 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::ma SetIter si ; Port *port ; FOREACH_PORT_OF_PORTBUS(portbus, si, port) { + wire->port_id = nl->IndexOf(port) + 1; import_attributes(wire->attributes, port->GetNet(), nl, portbus->Size()); break; } diff --git a/tests/verific/port_bus_order.ys b/tests/verific/port_bus_order.ys new file mode 100644 index 000000000..8732582a2 --- /dev/null +++ b/tests/verific/port_bus_order.ys @@ -0,0 +1,13 @@ +verific -sv < Date: Tue, 28 Oct 2025 13:01:26 +0100 Subject: [PATCH 2/6] dfflibmap: fix next_state inversion propagation for DFF flops by inverting reset value polarity --- passes/techmap/dfflibmap.cc | 7 ++++++ tests/techmap/dfflibmap_dff_not_next.lib | 24 ++++++++++++++++++ tests/techmap/dfflibmap_formal.ys | 31 ++++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 tests/techmap/dfflibmap_dff_not_next.lib diff --git a/passes/techmap/dfflibmap.cc b/passes/techmap/dfflibmap.cc index f2bd16082..6d55d1b43 100644 --- a/passes/techmap/dfflibmap.cc +++ b/passes/techmap/dfflibmap.cc @@ -271,6 +271,13 @@ static void find_cell(std::vector cells, IdString cell_type, continue; if (!parse_next_state(cell, ff->find("next_state"), cell_next_pin, cell_next_pol, cell_enable_pin, cell_enable_pol) || (has_enable && (cell_enable_pin.empty() || cell_enable_pol != enapol))) continue; + + if (has_reset && !cell_next_pol) { + // next_state is negated + // we later propagate this inversion to the output, + // which requires the negation of the reset value + rstval = !rstval; + } if (has_reset && rstval == false) { if (!parse_pin(cell, ff->find("clear"), cell_rst_pin, cell_rst_pol) || cell_rst_pol != rstpol) continue; diff --git a/tests/techmap/dfflibmap_dff_not_next.lib b/tests/techmap/dfflibmap_dff_not_next.lib new file mode 100644 index 000000000..0a0b011de --- /dev/null +++ b/tests/techmap/dfflibmap_dff_not_next.lib @@ -0,0 +1,24 @@ +library (test_not_next) { + cell (dff_not_next) { + area: 1.0; + pin (QN) { + direction : output; + function : "STATE"; + } + pin (CLK) { + direction : input; + clock : true; + } + pin (D) { + direction : input; + } + pin (RN) { + direction : input; + } + ff (STATE, STATEN) { + clocked_on: "CLK"; + next_state: "!D"; + preset : "!RN"; + } + } +} diff --git a/tests/techmap/dfflibmap_formal.ys b/tests/techmap/dfflibmap_formal.ys index 11c90ea6c..71a52a261 100644 --- a/tests/techmap/dfflibmap_formal.ys +++ b/tests/techmap/dfflibmap_formal.ys @@ -108,6 +108,37 @@ copy top top_unmapped simplemap top dfflibmap -liberty dfflibmap_dffn_dffe.lib -liberty dfflibmap_dffsr_not_next.lib top +async2sync +flatten +opt_clean -purge +equiv_make top top_unmapped equiv +equiv_induct equiv +equiv_status -assert equiv + +################################################################## + +design -reset +read_verilog < Date: Thu, 30 Oct 2025 00:24:42 +0000 Subject: [PATCH 3/6] Bump version --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 108c92b2a..e0b3b561d 100644 --- a/Makefile +++ b/Makefile @@ -160,7 +160,7 @@ ifeq ($(OS), Haiku) CXXFLAGS += -D_DEFAULT_SOURCE endif -YOSYS_VER := 0.58+89 +YOSYS_VER := 0.58+94 YOSYS_MAJOR := $(shell echo $(YOSYS_VER) | cut -d'.' -f1) YOSYS_MINOR := $(shell echo $(YOSYS_VER) | cut -d'.' -f2 | cut -d'+' -f1) YOSYS_COMMIT := $(shell echo $(YOSYS_VER) | cut -d'+' -f2) From 88d101b4626dbeb0c276422c685c0b0db199dc9f Mon Sep 17 00:00:00 2001 From: Vaibhav Singh Date: Fri, 31 Oct 2025 14:06:00 +0530 Subject: [PATCH 4/6] kernel: Fix define ID issue, needs undef first --- kernel/rtlil.h | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/rtlil.h b/kernel/rtlil.h index 394c6f25d..819704cf9 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -569,6 +569,7 @@ template <> struct IDMacroHelper<-1> { } }; +#undef ID #define ID(_id) \ YOSYS_NAMESPACE_PREFIX IDMacroHelper< \ YOSYS_NAMESPACE_PREFIX lookup_well_known_id(#_id) \ From a243e4e60fa34be4b9b9db0992f9023697107717 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Sat, 1 Nov 2025 17:28:39 +1300 Subject: [PATCH 5/6] Docs: ecp5 and nexus are under lattice --- docs/source/cmd/index_techlibs_ecp5.rst | 5 ----- docs/source/cmd/index_techlibs_lattice_nexus.rst | 5 ----- 2 files changed, 10 deletions(-) delete mode 100644 docs/source/cmd/index_techlibs_ecp5.rst delete mode 100644 docs/source/cmd/index_techlibs_lattice_nexus.rst diff --git a/docs/source/cmd/index_techlibs_ecp5.rst b/docs/source/cmd/index_techlibs_ecp5.rst deleted file mode 100644 index 29fd309cf..000000000 --- a/docs/source/cmd/index_techlibs_ecp5.rst +++ /dev/null @@ -1,5 +0,0 @@ -ECP5 ------------------- - -.. autocmdgroup:: techlibs/ecp5 - :members: diff --git a/docs/source/cmd/index_techlibs_lattice_nexus.rst b/docs/source/cmd/index_techlibs_lattice_nexus.rst deleted file mode 100644 index d5ac4184c..000000000 --- a/docs/source/cmd/index_techlibs_lattice_nexus.rst +++ /dev/null @@ -1,5 +0,0 @@ -Lattice Nexus ------------------- - -.. autocmdgroup:: techlibs/nexus - :members: From 797780eda5c5b855e6404aaa2aa1e69850201ba1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 2 Nov 2025 00:26:19 +0000 Subject: [PATCH 6/6] Bump version --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e0b3b561d..5d659e5e8 100644 --- a/Makefile +++ b/Makefile @@ -160,7 +160,7 @@ ifeq ($(OS), Haiku) CXXFLAGS += -D_DEFAULT_SOURCE endif -YOSYS_VER := 0.58+94 +YOSYS_VER := 0.58+98 YOSYS_MAJOR := $(shell echo $(YOSYS_VER) | cut -d'.' -f1) YOSYS_MINOR := $(shell echo $(YOSYS_VER) | cut -d'.' -f2 | cut -d'+' -f1) YOSYS_COMMIT := $(shell echo $(YOSYS_VER) | cut -d'+' -f2)