yosys-symbiflow: 2023.02.08 -> 1.20230425
The plugin now has a tagged version that is based on the date. Previously, we had to use a random commit and manually choose the relevant date. Now, we use the official tag as a version here and to fetch from git. While at it: fix the tests - somewhere over the course of the lasts year, the tests stopped being run. Fixed now.
This commit is contained in:
parent
e3032b1d78
commit
123b92da6c
2 changed files with 27 additions and 37 deletions
|
@ -1,15 +0,0 @@
|
|||
diff --git a/yql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile
|
||||
index 2819055c9fe..0e391581012 100644
|
||||
--- a/ql-qlf-plugin/Makefile
|
||||
+++ b/ql-qlf-plugin/Makefile
|
||||
@@ -55,10 +55,6 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \
|
||||
$(PP3_DIR)/mult_sim.v \
|
||||
$(PP3_DIR)/qlal3_sim.v \
|
||||
|
||||
-retrieve-pmgen:=$(shell mkdir -p pmgen && wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py)
|
||||
-
|
||||
-pre-build:=$(shell python3 pmgen/pmgen.py -o pmgen/ql-dsp-pm.h -p ql_dsp ql_dsp.pmg)
|
||||
-
|
||||
install_modules: $(VERILOG_MODULES)
|
||||
$(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(f);)
|
||||
|
|
@ -8,18 +8,21 @@
|
|||
, zlib
|
||||
, yosys-symbiflow
|
||||
, uhdm
|
||||
, capnproto
|
||||
, surelog
|
||||
, antlr4
|
||||
, flatbuffers
|
||||
, pkg-config
|
||||
}: let
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "chipsalliance";
|
||||
repo = "yosys-f4pga-plugins";
|
||||
rev = "08430ec4f53d1cf9d6a2091211d6c5ce501d5486";
|
||||
hash = "sha256-xCFi8OrNfsKt7bVSYJ/yuBify/pyCU1rI16gaCBgil8=";
|
||||
};
|
||||
version = "1.20230425";
|
||||
|
||||
version = "2023.02.08";
|
||||
src = fetchFromGitHub {
|
||||
owner = "chipsalliance";
|
||||
repo = "yosys-f4pga-plugins";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-KNkmhvpKTby85P88+DqCOOGxIKpzbw5KF9ymqy40pfw=";
|
||||
};
|
||||
|
||||
# Supported symbiflow plugins.
|
||||
#
|
||||
|
@ -38,7 +41,7 @@
|
|||
"systemverilog"
|
||||
];
|
||||
|
||||
static_gtest = gtest.dev.overrideAttrs (old: {
|
||||
static_gtest = gtest.overrideAttrs (old: {
|
||||
dontDisableStatic = true;
|
||||
disableHardening = [ "pie" ];
|
||||
cmakeFlags = old.cmakeFlags ++ ["-DBUILD_SHARED_LIBS=OFF"];
|
||||
|
@ -49,23 +52,26 @@ in lib.genAttrs plugins (plugin: stdenv.mkDerivation (rec {
|
|||
inherit src version plugin;
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [ python3 ];
|
||||
buildInputs = [ yosys readline zlib uhdm surelog ];
|
||||
nativeBuildInputs = [ python3 pkg-config ];
|
||||
buildInputs = [
|
||||
yosys
|
||||
readline
|
||||
zlib
|
||||
uhdm
|
||||
surelog
|
||||
capnproto
|
||||
antlr4.runtime.cpp
|
||||
];
|
||||
|
||||
# xdc has an incorrect path to a test which has yet to be patched
|
||||
doCheck = plugin != "xdc";
|
||||
nativeCheckInputs = [ static_gtest ];
|
||||
|
||||
# ql-qlf tries to fetch a yosys script from github
|
||||
# Run the script in preBuild instead.
|
||||
patches = lib.optional ( plugin == "ql-qlf" ) ./symbiflow-pmgen.patch;
|
||||
|
||||
# A Makefile rule tries to wget-fetch a yosys script from github.
|
||||
# Link the script from our yosys sources in preBuild instead, so that
|
||||
# the Makefile rule is a no-op.
|
||||
preBuild = ''
|
||||
export LDFLAGS="-L${flatbuffers}/lib"
|
||||
mkdir -p ql-qlf-plugin/pmgen
|
||||
''
|
||||
+ lib.optionalString ( plugin == "ql-qlf" ) ''
|
||||
python3 ${yosys.src}/passes/pmgen/pmgen.py -o ql-qlf-plugin/pmgen/ql-dsp-pm.h -p ql_dsp ql-qlf-plugin/ql_dsp.pmg
|
||||
ln -s ${yosys.src}/passes/pmgen/pmgen.py pmgen.py
|
||||
'';
|
||||
|
||||
# Providing a symlink avoids the need for patching the test makefile
|
||||
|
@ -83,10 +89,9 @@ in lib.genAttrs plugins (plugin: stdenv.mkDerivation (rec {
|
|||
"YOSYS_DATA_DIR=\${out}/share/yosys/"
|
||||
];
|
||||
|
||||
checkTarget = "test";
|
||||
checkFlags = [
|
||||
"YOSYS_PLUGINS_DIR=\${NIX_BUILD_TOP}/source/${plugin}-plugin"
|
||||
"YOSYS_DATA_DIR=\${NIX_BUILD_TOP}/source/${plugin}-plugin"
|
||||
( "NIX_YOSYS_PLUGIN_DIRS=\${NIX_BUILD_TOP}/source/${plugin}-plugin"
|
||||
( "NIX_YOSYS_PLUGIN_DIRS=\${NIX_BUILD_TOP}/source/${plugin}-plugin/build"
|
||||
# sdc and xdc plugins use design introspection for their tests
|
||||
+ (lib.optionalString ( plugin == "sdc" || plugin == "xdc" )
|
||||
":${yosys-symbiflow.design_introspection}/share/yosys/plugins/")
|
||||
|
|
Loading…
Reference in a new issue