Compare commits

...
Sign in to create a new pull request.

9 commits

Author SHA1 Message Date
Gabriel Somlo
8964fa6ca3 update to 0.52 snapshot 2025-04-13 10:28:38 -04:00
Gabriel Somlo
ac6f6a13aa pick earliest 0.51 snapshot, buy time to fix subsequent upstream regression 2025-03-26 07:49:27 -04:00
Gabriel Somlo
f99553174f update to 0.51 snapshot 2025-03-14 10:06:39 -04:00
Gabriel Somlo
9c5a79fb15 update to 0.50 snapshot 2025-02-11 20:19:12 -05:00
Gabriel Somlo
0567523997 update to 0.49 snapshot 2025-01-26 19:31:22 -05:00
Gabriel Somlo
7d9bfcc738 update to 0.48 snapshot 2024-12-13 07:50:53 -05:00
Gabriel Somlo
c652c4b43c update to 0.47 snapshot 2024-11-13 07:49:32 -05:00
Gabriel Somlo
784d75bd26 update to 0.46 snapshot 2024-10-12 10:13:05 -04:00
Gabriel Somlo
c84d9b35f7 update to 0.45 snapshot 2024-09-11 18:54:37 -04:00
7 changed files with 157 additions and 54 deletions

11
.gitignore vendored
View file

@ -43,3 +43,14 @@
/yosys-960d8e3.tar.gz
/yosys-49f5477.tar.gz
/yosys-77b2ae2.tar.gz
/yosys-e8951ab.tar.gz
/yosys-a00137c.tar.gz
/yosys-f20f913.tar.gz
/yosys-e91e95f.tar.gz
/yosys-e456f2e.tar.gz
/yosys-6f9c515.tar.gz
/yosys-e44d1d4.tar.gz
/yosys_0.33-6.debian.tar.xz
/yosys-c4b5190.tar.gz
/yosys-fee39a3.tar.gz
/yosys_0.52-1.debian.tar.xz

View file

@ -1,18 +1,21 @@
From 169119bd99c7cf2b91d86790667d9ae4496ef67c Mon Sep 17 00:00:00 2001
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/2] fedora yosys-cfging patch
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 66e6c91ae..df006d8e1 100644
index 15ff178ad..ab4d5c95f 100644
--- a/Makefile
+++ b/Makefile
@@ -764,7 +764,7 @@ LIBS_NOVERIFIC = $(LIBS)
@@ -778,7 +778,7 @@ LIBS_NOVERIFIC = $(LIBS)
endif
$(PROGRAM_PREFIX)yosys-config: misc/yosys-config.in $(YOSYS_SRC)/Makefile
@ -34,5 +37,5 @@ index 2880c8c06..a32f11a13 100644
../../yosys-config --exec --cxx ${CXXFLAGS} --ldflags -shared -o plugin.so plugin.cc
../../yosys -m ./plugin.so -p "test" | grep -q "Plugin test passed!"
--
2.45.2
2.48.1

View file

@ -1,34 +1,24 @@
From b13dd58f6c925c6b5ab46bc3cc535675e8a8779d Mon Sep 17 00:00:00 2001
From 2ee84d4b9a691ab9b8d249f3348bd2bc0ca33fe3 Mon Sep 17 00:00:00 2001
From: Gabriel Somlo <gsomlo@gmail.com>
Date: Tue, 16 Jul 2024 15:21:51 -0400
Subject: [PATCH 2/2] fedora yosys-mancfginc patch
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.
---
Makefile | 2 +-
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 ++--
5 files changed, 7 insertions(+), 7 deletions(-)
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index df006d8e1..d913bb55c 100644
--- a/Makefile
+++ b/Makefile
@@ -996,7 +996,7 @@ docs/reqs:
$(Q) $(MAKE) -C docs reqs
DOC_TARGET ?= html
-docs: docs/source/cmd/abc.rst docs/gen_examples docs/gen_images docs/guidelines docs/usage docs/reqs
+docs: docs/source/cmd/abc.rst docs/gen_examples docs/gen_images docs/guidelines docs/usage
$(Q) $(MAKE) -C docs $(DOC_TARGET)
clean:
diff --git a/docs/source/code_examples/extensions/Makefile b/docs/source/code_examples/extensions/Makefile
index 8b5fa106a..d3850dacc 100644
index 74b547a20..91e1e7b28 100644
--- a/docs/source/code_examples/extensions/Makefile
+++ b/docs/source/code_examples/extensions/Makefile
@@ -10,7 +10,7 @@ CXXFLAGS=$(shell $(YOSYS)-config --cxxflags)
@@ -11,7 +11,7 @@ CXXFLAGS=$(shell $(YOSYS)-config --cxxflags)
DATDIR=$(shell $(YOSYS)-config --datdir)
my_cmd.so: my_cmd.cc
@ -50,10 +40,10 @@ index 36ddbe175..2ff77f6a1 100644
USING_YOSYS_NAMESPACE
PRIVATE_NAMESPACE_BEGIN
diff --git a/docs/source/code_examples/stubnets/Makefile b/docs/source/code_examples/stubnets/Makefile
index ec501f006..1051a78ad 100644
index 17f700c88..a15eb3005 100644
--- a/docs/source/code_examples/stubnets/Makefile
+++ b/docs/source/code_examples/stubnets/Makefile
@@ -10,7 +10,7 @@ test: stubnets.so
@@ -11,7 +11,7 @@ test: stubnets.so
tail test1.log test2.log test3.log
stubnets.so: stubnets.cc
@ -78,5 +68,5 @@ index 566d24b18..b09bc567c 100644
#include <string>
#include <map>
--
2.45.2
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-77b2ae2.tar.gz) = 0c510af03d2c98a6a8b3c0d3b6eb949a03525311dd632644bfd657be145dd6177fc35e04a7809f1679b57aebf2a51b2d06603a53c82e4e72773d908373ba05d7
SHA512 (yosys_0.33-5.debian.tar.xz) = fddf17cd93f2dbe0e8dc0cce6bebbe9ceb3145b3c0aa339b60de7039c576c1d3366b7238801028136f9d7f07b8d9d60085cea7dc94a0fa36392f0f4207319ae4
SHA512 (yosys-fee39a3.tar.gz) = 250a7489644ca6f5bc0f61897a8430c8d02e63edba58851626b0567409125ad343cf6d26bc080e941375afbd6abb37ce9d9041deb1b1d91e11aeb8b755127fb7
SHA512 (yosys_0.52-1.debian.tar.xz) = 99b85decec679f16707d76cb5233b081951016a83dd308163f0d88c8d84df32a130313cea2e608162b07846df8b8efbbd05c351c3f5a61cc03c240a0987d6466

View file

@ -1,12 +1,10 @@
%global commit0 77b2ae2e3906c2aa5a14fbc4e2239ac3ddd08bfc
%global commit0 fee39a3284c90249e1d9684cf6944ffbbcbb8f90
%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7})
%global snapdate 20240808
%global __python %{__python3}
%global snapdate 20250411
Name: yosys
Version: 0.44
Version: 0.52
Release: 1.%{snapdate}git%{shortcommit0}%{?dist}
Summary: Yosys Open SYnthesis Suite, including Verilog synthesizer
License: ISC and MIT
@ -16,29 +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.33-5.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:
# Change the substitution done when making yosys-config so that it outputs
# CXXFLAGS with -I/usr/include/yosys
Patch1: yosys-cfginc.patch
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: yosys-mancfginc.patch
Patch2: 0002-fedora-yosys-mancfginc-patch.patch
# 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: yosyshq-abc >= 0.44
BuildRequires: yosyshq-abc >= 0.52
BuildRequires: iverilog >= 12.0
BuildRequires: python%{python3_pkgversion}
BuildRequires: python3-devel
BuildRequires: txt2man
BuildRequires: gtkwave
# required for documentation:
BuildRequires: graphviz
@ -52,10 +61,11 @@ BuildRequires: python3-sphinxcontrib-bibtex
BuildRequires: texlive-comment
BuildRequires: texlive-pgfplots
BuildRequires: texlive-standalone
BuildRequires: rsync
Requires: %{name}-share = %{version}-%{release}
Requires: graphviz python-click python-xdot
Requires: yosyshq-abc >= 0.44
Requires: yosyshq-abc >= 0.51
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval :
ExcludeArch: %{ix86}
@ -93,10 +103,7 @@ Development files to build Yosys synthesizer plugins.
%prep
%setup -q -n %{name}-%{commit0}
%patch 1 -p1 -b .cfginc
%patch 2 -p1 -b .mancfginc
%autosetup -p1 -n %{name}-%{commit0}
# Ensure that Makefile doesn't wget viz.js
cp %{SOURCE1} .
@ -112,19 +119,14 @@ do
mv $f.new $f
done
make config-gcc
%build
# disable LTO to allow building for f33 rawhide (BZ 1865657):
%define _lto_cflags %{nil}
%set_build_flags
make %{?_smp_mflags} PREFIX="%{_prefix}" ABCEXTERNAL=%{_bindir}/abc PRETTY=0 all
make config-gcc
%make_build PREFIX="%{_prefix}" ABCEXTERNAL=%{_bindir}/abc PRETTY=0 all
#manual
make ABCEXTERNAL=%{_bindir}/abc DOC_TARGET=latexpdf docs
make ABCEXTERNAL=%{_bindir}/abc DOC_TARGET=latexpdf SPHINXOPTS='' docs
%global man_date "`stat -c %y debian/man/yosys-smtbmc.txt | awk '{ print $1 }'`"
txt2man -d %{man_date} -t YOSYS-SMTBMC debian/man/yosys-smtbmc.txt >yosys-smtbmc.1
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
@ -142,6 +144,7 @@ install -m 0644 yosys-smtbmc.1 debian/yosys{,-config,-filterlib}.1 %{buildroot}%
install -d -m0755 %{buildroot}%{_docdir}/%{name}
install -m 0644 docs/build/latex/yosyshqyosys.pdf %{buildroot}%{_docdir}/%{name}
%py_byte_compile %{python3} %{buildroot}%{_datadir}/yosys/python3
%check
make test ABCEXTERNAL=%{_bindir}/abc SEED=314159265359
@ -173,6 +176,49 @@ make test ABCEXTERNAL=%{_bindir}/abc SEED=314159265359
%changelog
* Fri Apr 11 2025 Gabriel Somlo <gsomlo@gmail.com> - 0.52.1.20250411gitfee39a3
- update to 0.52 snapshot
- update man pages from Debian
* Wed Mar 26 2025 Gabriel Somlo <gsomlo@gmail.com> - 0.51.2.20250313gitc4b5190
- pick earliest 0.51 snapshot, buy time to fix subsequent upstream regression
* Thu Mar 13 2025 Gabriel Somlo <gsomlo@gmail.com> - 0.51.1.20250313gite44d1d4
- update to 0.51 snapshot
* Tue Feb 11 2025 Gabriel Somlo <gsomlo@gmail.com> - 0.50.1.20250211git6f9c515
- update to 0.50 snapshot
* Tue Jan 21 2025 Gabriel Somlo <gsomlo@gmail.com> - 0.49.1.20250121gite456f2e
- update to 0.49 snapshot (incl. fix for tcl 9.0, see BZ 2337817)
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.48- 0.20241211gite91e95f.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Dec 11 2024 Gabriel Somlo <gsomlo@gmail.com> - 0.48.0.20241211gite91e95f
- remove doc-offline patch (solved by setting SPHINXOPTS='' instead)
- update to 0.48 snapshot
* Sun Nov 10 2024 Gabriel Somlo <gsomlo@gmail.com> - 0.47.1.20241110gitf20f913
- switch primary source & patches to autosetup
- update to 0.47 snapshot
* Thu Oct 24 2024 Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl> - 0.46-4.20241011gita00137c
- Call %%py_byte_compile and apply patch to fix build reproducibility
* Wed Oct 23 2024 Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl> - 0.46-3.20241011gita00137c
- Rebuild for rust-add-determinism-0.4.3-1.fc42
* Mon Oct 14 2024 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.46-2.20241011gita00137c
- Rebuild for rust-add-determinism-0.4.0-2.fc42
* Fri Oct 11 2024 Gabriel Somlo <gsomlo@gmail.com> - 0.46.1.20241011gita00137c
- update to 0.46 snapshot
* Thu Sep 05 2024 Gabriel Somlo <gsomlo@gmail.com> - 0.45.1.20240905gite8951ab
- update to 0.45 snapshot
- add patch to remove badge image network download during doc build
* Thu Aug 08 2024 Gabriel Somlo <gsomlo@gmail.com> - 0.44.1.20240808git77b2ae2
- update to 0.44 snapshot