Compare commits

..

15 commits

Author SHA1 Message Date
Gabriel Somlo
42c53e8632 update to 0.52 snapshot 2025-04-13 10:28:53 -04:00
Gabriel Somlo
2cb95a5362 pick earliest 0.51 snapshot, buy time to fix subsequent upstream regression 2025-03-26 07:49:44 -04:00
Gabriel Somlo
5ceccb9aac update to 0.51 snapshot 2025-03-14 10:06:59 -04:00
Gabriel Somlo
0af15760e8 update to 0.50 snapshot 2025-02-11 20:19:27 -05:00
Gabriel Somlo
d0141b58bb update to 0.49 snapshot 2025-01-26 19:31:43 -05:00
Gabriel Somlo
67ded857cf update to 0.48 snapshot 2024-12-13 07:51:10 -05:00
Gabriel Somlo
edc5ab8b0f update to 0.47 snapshot 2024-11-13 07:49:45 -05:00
Gabriel Somlo
2c68d1db7c update to 0.46 snapshot 2024-10-12 10:13:19 -04:00
Gabriel Somlo
9ff82b1f71 update to 0.45 snapshot 2024-09-11 18:54:50 -04:00
Gabriel Somlo
0cf0a4423f update to 0.44 snapshot 2024-08-08 18:11:11 -04:00
Gabriel Somlo
846eef0c6a update to 0.43 snapshot 2024-07-17 08:46:22 -04:00
Gabriel Somlo
8d9a876823 update to 0.42 2024-06-10 17:01:37 -04:00
Gabriel Somlo
7c099d6793 update to 0.41 snapshot 2024-05-24 20:11:07 -04:00
Gabriel Somlo
9af9a686b0 update to 0.40 2024-04-13 14:01:10 -04:00
Gabriel Somlo
51aebfab45 update to 0.39 snapshot 2024-03-14 17:40:07 -04:00
8 changed files with 198 additions and 155 deletions

17
.gitignore vendored
View file

@ -54,20 +54,3 @@
/yosys-c4b5190.tar.gz
/yosys-fee39a3.tar.gz
/yosys_0.52-1.debian.tar.xz
/yosys-53c22ab.tar.gz
/yosys-e0747b7.tar.gz
/yosys-60f126c.tar.gz
/yosys-8c71226.tar.gz
/yosys-cec48c6.tar.gz
/yosys_0.52-2.debian.tar.xz
/yosys-9a12d92.tar.gz
/yosys-529886f.tar.gz
/yosys-0e31e38.tar.gz
/yosys-967b47d.tar.gz
/yosys-1717fa0.tar.gz
/yosys-3bc26ff.tar.gz
/yosys-90c26fe.tar.gz
/yosys-86f2dde.tar.gz
/yosys-b88b73a.tar.gz
/yosys_0.65-1.debian.tar.xz
/yosys-22c15a7.tar.gz

View file

@ -1,49 +0,0 @@
From e54bbc1ffa4b8f81559e3e4d9d2521e9d83f1748 Mon Sep 17 00:00:00 2001
From: Gabriel Somlo <gsomlo@gmail.com>
Date: Mon, 13 Jul 2026 17:01:17 -0400
Subject: [PATCH] fedora: unbundle cxxopts
---
kernel/CMakeLists.txt | 1 -
kernel/driver.cc | 2 +-
libs/CMakeLists.txt | 1 -
3 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/kernel/CMakeLists.txt b/kernel/CMakeLists.txt
index 4cd76b4ff..24d86997b 100644
--- a/kernel/CMakeLists.txt
+++ b/kernel/CMakeLists.txt
@@ -91,7 +91,6 @@ yosys_core(kernel
INCLUDE_DIRS
${pybind11_INCLUDE_DIR}
LIBRARIES
- cxxopts
$<${YOSYS_ENABLE_PLUGINS}:${Dlfcn_LIBRARIES}>
$<${YOSYS_ENABLE_ZLIB}:PkgConfig::zlib>
$<${YOSYS_ENABLE_READLINE}:PkgConfig::readline>
diff --git a/kernel/driver.cc b/kernel/driver.cc
index 2a4ad1295..7bb67ffea 100644
--- a/kernel/driver.cc
+++ b/kernel/driver.cc
@@ -21,7 +21,7 @@
#include "kernel/hashlib.h"
#include "libs/sha1/sha1.h"
#define CXXOPTS_VECTOR_DELIMITER '\0'
-#include "libs/cxxopts/include/cxxopts.hpp"
+#include <cxxopts.hpp>
#include <iostream>
#include <chrono>
diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt
index cb81b3af2..4eb313c5d 100644
--- a/libs/CMakeLists.txt
+++ b/libs/CMakeLists.txt
@@ -1,5 +1,4 @@
add_subdirectory(bigint)
-add_subdirectory(cxxopts)
add_subdirectory(dlfcn-win32)
add_subdirectory(ezsat)
add_subdirectory(fst)
--
2.54.0

View file

@ -0,0 +1,41 @@
From 6b5fbc8e22aa88ba8a60f4f1171931949d85fa8d Mon Sep 17 00:00:00 2001
From: Gabriel Somlo <gsomlo@gmail.com>
Date: Tue, 16 Jul 2024 15:20:56 -0400
Subject: [PATCH 1/3] fedora yosys-cfginc patch
Fedora-specific patch:
Change the substitution done when making yosys-config so that it outputs
CXXFLAGS with -I/usr/include/yosys
---
Makefile | 2 +-
tests/various/plugin.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 15ff178ad..ab4d5c95f 100644
--- a/Makefile
+++ b/Makefile
@@ -778,7 +778,7 @@ LIBS_NOVERIFIC = $(LIBS)
endif
$(PROGRAM_PREFIX)yosys-config: misc/yosys-config.in $(YOSYS_SRC)/Makefile
- $(P) $(SED) -e 's#@CXXFLAGS@#$(subst -Ilibs/dlfcn-win32,,$(subst -I. -I"$(YOSYS_SRC)",-I"$(DATDIR)/include",$(strip $(CXXFLAGS_NOVERIFIC))))#;' \
+ $(P) $(SED) -e 's#@CXXFLAGS@#$(subst -Ilibs/dlfcn-win32,,$(subst -I. -I"$(YOSYS_SRC)",-I"$(PREFIX)/include/yosys",$(strip $(CXXFLAGS_NOVERIFIC))))#;' \
-e 's#@CXX@#$(strip $(CXX))#;' -e 's#@LINKFLAGS@#$(strip $(LINKFLAGS) $(PLUGIN_LINKFLAGS))#;' -e 's#@LIBS@#$(strip $(LIBS_NOVERIFIC) $(PLUGIN_LIBS))#;' \
-e 's#@BINDIR@#$(strip $(BINDIR))#;' -e 's#@DATDIR@#$(strip $(DATDIR))#;' < $< > $(PROGRAM_PREFIX)yosys-config
$(Q) chmod +x $(PROGRAM_PREFIX)yosys-config
diff --git a/tests/various/plugin.sh b/tests/various/plugin.sh
index 2880c8c06..a32f11a13 100644
--- a/tests/various/plugin.sh
+++ b/tests/various/plugin.sh
@@ -3,6 +3,6 @@ rm -f plugin.so
CXXFLAGS=$(../../yosys-config --cxxflags)
DATDIR=$(../../yosys-config --datdir)
DATDIR=${DATDIR//\//\\\/}
-CXXFLAGS=${CXXFLAGS//$DATDIR/..\/..\/share}
+CXXFLAGS=${CXXFLAGS//\/usr\/include\/yosys/..\/..\/share\/include}
../../yosys-config --exec --cxx ${CXXFLAGS} --ldflags -shared -o plugin.so plugin.cc
../../yosys -m ./plugin.so -p "test" | grep -q "Plugin test passed!"
--
2.48.1

View file

@ -0,0 +1,72 @@
From 2ee84d4b9a691ab9b8d249f3348bd2bc0ca33fe3 Mon Sep 17 00:00:00 2001
From: Gabriel Somlo <gsomlo@gmail.com>
Date: Thu, 5 Sep 2024 20:56:02 -0400
Subject: [PATCH 2/3] fedora yosys-mancfginc patch
Fedora-specific patch:
When invoking yosys-config for examples in "make docs", need to use
relative path for includes, as they're not installed in build host
filesystem.
---
docs/source/code_examples/extensions/Makefile | 2 +-
docs/source/code_examples/extensions/my_cmd.cc | 4 ++--
docs/source/code_examples/stubnets/Makefile | 2 +-
docs/source/code_examples/stubnets/stubnets.cc | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/docs/source/code_examples/extensions/Makefile b/docs/source/code_examples/extensions/Makefile
index 74b547a20..91e1e7b28 100644
--- a/docs/source/code_examples/extensions/Makefile
+++ b/docs/source/code_examples/extensions/Makefile
@@ -11,7 +11,7 @@ CXXFLAGS=$(shell $(YOSYS)-config --cxxflags)
DATDIR=$(shell $(YOSYS)-config --datdir)
my_cmd.so: my_cmd.cc
- $(YOSYS)-config --exec --cxx $(subst $(DATDIR),../../../../share,$(CXXFLAGS)) --ldflags -o my_cmd.so -shared my_cmd.cc --ldlibs
+ $(YOSYS)-config --exec --cxx $(subst $(DATDIR),../../../../share,$(CXXFLAGS)) -I../../../../ --ldflags -o my_cmd.so -shared my_cmd.cc --ldlibs
test0.log: my_cmd.so
$(YOSYS) -QTl test0.log_new -m ./my_cmd.so -p 'my_cmd foo bar' -f verilog absval_ref.v
diff --git a/docs/source/code_examples/extensions/my_cmd.cc b/docs/source/code_examples/extensions/my_cmd.cc
index 36ddbe175..2ff77f6a1 100644
--- a/docs/source/code_examples/extensions/my_cmd.cc
+++ b/docs/source/code_examples/extensions/my_cmd.cc
@@ -1,5 +1,5 @@
-#include "kernel/yosys.h"
-#include "kernel/sigtools.h"
+#include <kernel/yosys.h>
+#include <kernel/sigtools.h>
USING_YOSYS_NAMESPACE
PRIVATE_NAMESPACE_BEGIN
diff --git a/docs/source/code_examples/stubnets/Makefile b/docs/source/code_examples/stubnets/Makefile
index 17f700c88..a15eb3005 100644
--- a/docs/source/code_examples/stubnets/Makefile
+++ b/docs/source/code_examples/stubnets/Makefile
@@ -11,7 +11,7 @@ test: stubnets.so
tail test1.log test2.log test3.log
stubnets.so: stubnets.cc
- yosys-config --exec --cxx --cxxflags --ldflags -o $@ -shared $^ --ldlibs
+ yosys-config --exec --cxx --cxxflags -I../../../../ --ldflags -o $@ -shared $^ --ldlibs
.PHONY: clean
clean:
diff --git a/docs/source/code_examples/stubnets/stubnets.cc b/docs/source/code_examples/stubnets/stubnets.cc
index 566d24b18..b09bc567c 100644
--- a/docs/source/code_examples/stubnets/stubnets.cc
+++ b/docs/source/code_examples/stubnets/stubnets.cc
@@ -5,8 +5,8 @@
// binary, for any purpose, commercial or non-commercial, and by any
// means.
-#include "kernel/yosys.h"
-#include "kernel/sigtools.h"
+#include <kernel/yosys.h>
+#include <kernel/sigtools.h>
#include <string>
#include <map>
--
2.48.1

View file

@ -0,0 +1,28 @@
From 45c80e8a2bd42cb7d2c52c2f80ed806047a65308 Mon Sep 17 00:00:00 2001
From: Gabriel Somlo <gsomlo@gmail.com>
Date: Sat, 11 Jan 2025 17:39:16 -0500
Subject: [PATCH 3/3] fedora yosys-cxxopts patch
Fedora-specific patch:
Use relative path (instead of assuming a bundled submodule) when
referencing the cxxopts.hpp include file.
---
kernel/driver.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/driver.cc b/kernel/driver.cc
index a3d85bd90..9a67bc24e 100644
--- a/kernel/driver.cc
+++ b/kernel/driver.cc
@@ -20,7 +20,7 @@
#include "kernel/yosys.h"
#include "kernel/hashlib.h"
#include "libs/sha1/sha1.h"
-#include "libs/cxxopts/include/cxxopts.hpp"
+#include <cxxopts.hpp>
#include <iostream>
#ifdef YOSYS_ENABLE_READLINE
--
2.48.1

View file

@ -0,0 +1,25 @@
diff --git a/passes/memory/memory_libmap.cc b/passes/memory/memory_libmap.cc
index b0d0498ea..b62375e7e 100644
--- a/passes/memory/memory_libmap.cc
+++ b/passes/memory/memory_libmap.cc
@@ -2232,10 +2232,10 @@ struct MemoryLibMapPass : public Pass {
if (module->has_processes_warn())
continue;
- MapWorker worker(module);
auto mems = Mem::get_selected_memories(module);
for (auto &mem : mems)
{
+ MapWorker worker(module);
MemMapping map(worker, mem, lib, opts);
int idx = -1;
int best = map.logic_cost;
@@ -2258,8 +2258,6 @@ struct MemoryLibMapPass : public Pass {
log("using FF mapping for memory %s.%s\n", log_id(module->name), log_id(mem.memid));
} else {
map.emit(map.cfgs[idx]);
- // Rebuild indices after modifying module
- worker = MapWorker(module);
}
}
}

View file

@ -1,2 +1,2 @@
SHA512 (yosys-22c15a7.tar.gz) = 2fbc300e1532e770e6988f19e162fe8cafc2d086418d9b77cf0ba1524679fb305a0e642f95fe57b809fa4b16b74b471e26fdeac2828a43bc2d11ce2c06b21da1
SHA512 (yosys_0.65-1.debian.tar.xz) = a0a68a8229b42d48f87618d3c4e40acf3576e8d18188b83ef3d83c277a17c09ea783fab45dfc3c52cc0fcee220af1a00b7d012a258dc3b124a44d65696d490ba
SHA512 (yosys-fee39a3.tar.gz) = 250a7489644ca6f5bc0f61897a8430c8d02e63edba58851626b0567409125ad343cf6d26bc080e941375afbd6abb37ce9d9041deb1b1d91e11aeb8b755127fb7
SHA512 (yosys_0.52-1.debian.tar.xz) = 99b85decec679f16707d76cb5233b081951016a83dd308163f0d88c8d84df32a130313cea2e608162b07846df8b8efbbd05c351c3f5a61cc03c240a0987d6466

View file

@ -1,11 +1,11 @@
%global commit0 22c15a7ecd53437f18f67c72572bd693f78357ca
%global commit0 fee39a3284c90249e1d9684cf6944ffbbcbb8f90
%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7})
%global snapdate 20260713
%global snapdate 20250411
Name: yosys
Version: 0.67
Release: 3.%{snapdate}git%{shortcommit0}%{?dist}
Version: 0.52
Release: 1.%{snapdate}git%{shortcommit0}%{?dist}
Summary: Yosys Open SYnthesis Suite, including Verilog synthesizer
License: ISC and MIT
URL: http://www.clifford.at/yosys/
@ -14,30 +14,40 @@ Source0: https://github.com/YosysHQ/%{name}/archive/%{commit0}/%{name}-%{
Source1: https://github.com/mdaines/viz.js/releases/download/0.0.3/viz.js
# man pages written for Debian:
Source2: http://http.debian.net/debian/pool/main/y/yosys/yosys_0.65-1.debian.tar.xz
Source2: http://http.debian.net/debian/pool/main/y/yosys/yosys_0.52-1.debian.tar.xz
# requested that upstream include those man pages:
# https://github.com/YosysHQ/yosys/issues/278
# Fedora-specific patch: # unbundle cxxopts dependency
Patch1: 0001-fedora-unbundle-cxxopts.patch
# Fedora-specific patch:
# Change the substitution done when making yosys-config so that it outputs
# CXXFLAGS with -I/usr/include/yosys
Patch1: 0001-fedora-yosys-cfginc-patch.patch
# Fedora-specific patch:
# When invoking yosys-config for examples in "make docs", need to use
# relative path for includes, as they're not installed in build host
# filesystem.
Patch2: 0002-fedora-yosys-mancfginc-patch.patch
BuildRequires: cmake
# Fedora-specific patch:
# Use relative path (instead of assuming a bundled submodule) when
# referencing the cxxopts.hpp include file.
Patch3: 0003-fedora-yosys-cxxopts-patch.patch
# fix upstream regression (https://github.com/YosysHQ/yosys/issues/4964)
Patch4: 0004-fix-upstream-regression.patch
BuildRequires: make
BuildRequires: gcc-c++
BuildRequires: cxxopts-devel
BuildRequires: bison flex readline-devel pkgconfig
BuildRequires: tcl-devel libffi-devel
BuildRequires: editline-devel
BuildRequires: yosyshq-abc >= 0.67
BuildRequires: yosyshq-abc >= 0.52
BuildRequires: iverilog >= 12.0
BuildRequires: fmt-devel
BuildRequires: tomlplusplus-devel
BuildRequires: python%{python3_pkgversion}
BuildRequires: python3-devel
BuildRequires: txt2man
BuildRequires: gtkwave
BuildRequires: gtest-devel
BuildRequires: gmock-devel
# required for documentation:
BuildRequires: graphviz
@ -48,7 +58,6 @@ BuildRequires: python3-click
BuildRequires: python3-furo
BuildRequires: python3-sphinx-latex
BuildRequires: python3-sphinxcontrib-bibtex
BuildRequires: python3-sphinx-inline-tabs
BuildRequires: texlive-comment
BuildRequires: texlive-pgfplots
BuildRequires: texlive-standalone
@ -56,7 +65,7 @@ BuildRequires: rsync
Requires: %{name}-share = %{version}-%{release}
Requires: graphviz python-click python-xdot
Requires: yosyshq-abc >= 0.67
Requires: yosyshq-abc >= 0.51
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval :
ExcludeArch: %{ix86}
@ -111,23 +120,17 @@ do
done
%build
# turning off newly-added sv-slang frontend support, for now;
# FIXME: decide on packaging slang dependency vs. enabling bundled subrepo!
%cmake -DYOSYS_ABC_EXECUTABLE=%{_bindir}/abc \
-DYOSYS_WITHOUT_SLANG=ON
%cmake_build
make config-gcc
%make_build PREFIX="%{_prefix}" ABCEXTERNAL=%{_bindir}/abc PRETTY=0 all
#manual
# For some reason, `yosys-sbtbmc` & `yosys-witness` python scripts
# end up not being executable (which causes building the manual to fail):
chmod +x %{__cmake_builddir}/%{name}*
%cmake_build -t docs-latexpdf
make ABCEXTERNAL=%{_bindir}/abc DOC_TARGET=latexpdf SPHINXOPTS='' docs
date=$(stat -c %y debian/man/yosys-smtbmc.txt | cut -d' ' -f1)
txt2man -d $date -t YOSYS-SMTBMC debian/man/yosys-smtbmc.txt >yosys-smtbmc.1
%install
%cmake_install
%make_install PREFIX="%{_prefix}" ABCEXTERNAL=%{_bindir}/abc STRIP=/bin/true
# move include files to includedir
install -d -m0755 %{buildroot}%{_includedir}
@ -144,7 +147,7 @@ install -m 0644 docs/build/latex/yosyshqyosys.pdf %{buildroot}%{_docdir}/%{name}
%py_byte_compile %{python3} %{buildroot}%{_datadir}/yosys/python3
%check
%cmake_build -t test
make test ABCEXTERNAL=%{_bindir}/abc SEED=314159265359
%files
@ -173,66 +176,6 @@ install -m 0644 docs/build/latex/yosyshqyosys.pdf %{buildroot}%{_docdir}/%{name}
%changelog
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.67-3.20260713git22c15a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Mon Jul 13 2026 Gabriel Somlo <gsomlo@gmail.com> - 0.67.2.20260713git22c15a7
- update to newer 0.67 snapshot
- simplify downstream (un-bundling) patch since some upstream support added
* Thu Jul 09 2026 Gabriel Somlo <gsomlo@gmail.com> - 0.67.1.20260709gitb88b73a
- update to 0.67 snapshot
- switch build to cmake
* Mon Jun 01 2026 Gabriel Somlo <gsomlo@gmail.com> - 0.66.1.20260601git86f2dde
- update to 0.66 snapshot
* Tue May 12 2026 Gabriel Somlo <gsomlo@gmail.com> - 0.65.1.20260512git90c26fe
- update to 0.65 snapshot
* Wed Mar 04 2026 Gabriel Somlo <gsomlo@gmail.com> - 0.63.1.20260304git3bc26ff
- update to 0.63 snapshot
* Thu Feb 05 2026 Gabriel Somlo <gsomlo@gmail.com> - 0.62.1.20260205git1717fa0
- update to 0.62 snapshot
* Thu Jan 15 2026 Gabriel Somlo <gsomlo@gmail.com> - 0.61.1.20260115git967b47d
- update to 0.61 snapshot
* Fri Dec 05 2025 Gabriel Somlo <gsomlo@gmail.com> - 0.60.1.20251205git0e31e38
- update to 0.60 snapshot
* Tue Nov 11 2025 Gabriel Somlo <gsomlo@gmail.com> - 0.59.1.20251111git529886f
- update to 0.59 snapshot
* Fri Oct 10 2025 Gabriel Somlo <gsomlo@gmail.com> - 0.58.1.20251010git9a12d92
- update to 0.58 snapshot
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 0.57-2.20250904gitcec48c6
- Rebuilt for Python 3.14.0rc3 bytecode
* Thu Sep 04 2025 Gabriel Somlo <gsomlo@gmail.com> - 0.57.1.20250904gitcec48c6
- update to 0.57 snapshot
- update man pages from Debian
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 0.56-2.20250810git8c71226
- Rebuilt for Python 3.14.0rc2 bytecode
* Sun Aug 10 2025 Gabriel Somlo <gsomlo@gmail.com> - 0.56.1.20250810git8c71226
- update to 0.56 snapshot
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.55-2.20250707git60f126c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Jul 07 2025 Gabriel Somlo <gsomlo@gmail.com> - 0.55.1.20250707git60f126c
- update to 0.55 snapshot
* Tue Jun 10 2025 Gabriel Somlo <gsomlo@gmail.com> - 0.54.1.20250610gite0747b7
- update to 0.54 snapshot
* Tue May 06 2025 Gabriel Somlo <gsomlo@gmail.com> - 0.53.1.20250506git53c22ab
- update to 0.53 snapshot
* Fri Apr 11 2025 Gabriel Somlo <gsomlo@gmail.com> - 0.52.1.20250411gitfee39a3
- update to 0.52 snapshot
- update man pages from Debian