Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105709 from CajuM/symbiflow
Add Symbiflow + prjxray for OSS Xilinx FPGA development
- Loading branch information
Showing
14 changed files
with
429 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ stdenv | ||
, fetchFromGitHub | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "prjxray-db"; | ||
version = "0.0-0232-g303a61d"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "SymbiFlow"; | ||
repo = "prjxray-db"; | ||
rev = "303a61d8bc552f7a533b91b17448c59e908aa391"; | ||
sha256 = "0r75xig16dbgh3nfygggir0a160x52y766h7hd9xcib9m88jixb2"; | ||
}; | ||
|
||
enableParallelBuilding = true; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
DBDIR="$out/share/symbiflow/prjxray-db/" | ||
DB_CONFIG="$out/bin/prjxray-config" | ||
mkdir -p $DBDIR $out/bin | ||
for device in artix7 kintex7 zynq7; do | ||
cp -r $src/$device $DBDIR | ||
done | ||
echo -e "#!/bin/sh\n\necho $DBDIR" > $DB_CONFIG | ||
chmod +x $DB_CONFIG | ||
runHook postInstall | ||
''; | ||
|
||
meta = with stdenv.lib; { | ||
description = "Project X-Ray - Xilinx Series 7 Bitstream Documentation"; | ||
homepage = "https://github.com/SymbiFlow/prjxray-db"; | ||
license = licenses.cc0; | ||
maintainers = with maintainers; [ mcaju ]; | ||
platforms = platforms.all; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ stdenv | ||
, fetchurl | ||
, autoPatchelfHook | ||
, python3Packages | ||
, archs ? [ "xc7a100t" "xc7a50t" "xc7z010" "xc7z020" ] | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "symbiflow-arch-defs"; | ||
version = "20200914-111752-g05d68df0"; | ||
|
||
src = fetchurl { | ||
url = "https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/66/20200914-111752/symbiflow-arch-defs-install-05d68df0.tar.xz"; | ||
sha256 = "1gmynybh8n33ag521w17c2kd16n834hqc6d8hi2pfs5kg1jl1a74"; | ||
}; | ||
|
||
sourceRoot = "."; | ||
|
||
propagatedBuildInputs = [ | ||
python3Packages.lxml | ||
python3Packages.python-constraint | ||
]; | ||
|
||
installPhase = '' | ||
mkdir -p $out/bin | ||
cp -r bin/{symbiflow_*,vpr_common,python} $out/bin | ||
for script in $out/bin/symbiflow_*; do | ||
substituteInPlace $script --replace '/env' '/symbiflow_env' | ||
done | ||
cp bin/env $out/bin/symbiflow_env | ||
mkdir -p $out/share/symbiflow/arch | ||
cp -r share/symbiflow/{scripts,techmaps} $out/share/symbiflow/ | ||
for arch in ${builtins.concatStringsSep " " archs}; do | ||
cp -r share/symbiflow/arch/"$arch"_test* $out/share/symbiflow/arch/ | ||
done | ||
''; | ||
|
||
meta = with stdenv.lib; { | ||
description = "Project X-Ray - Xilinx Series 7 Bitstream Documentation"; | ||
homepage = "https://github.com/SymbiFlow/symbiflow-arch-defs"; | ||
hydraPlatforms = []; | ||
license = licenses.isc; | ||
platforms = platforms.all; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ stdenv | ||
, fetchFromGitHub | ||
, cmake | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "prjxray-tools"; | ||
version = "0.1-2676-gac8d30e3"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "SymbiFlow"; | ||
repo = "prjxray"; | ||
fetchSubmodules = true; | ||
rev = "ac8d30e3fe2029122408888d2313844b3e0c265b"; | ||
sha256 = "1ag7dk12hdhip821crwinncp8vgyzs0r85l1h2vbgn61lnxc7f4h"; | ||
}; | ||
|
||
nativeBuildInputs = [ cmake ]; | ||
|
||
doCheck = true; | ||
|
||
meta = with stdenv.lib; { | ||
description = "Documenting the Xilinx 7-series bit-stream format"; | ||
homepage = "https://github.com/SymbiFlow/prjxray"; | ||
license = licenses.isc; | ||
platforms = platforms.all; | ||
maintainers = with maintainers; [ mcaju ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ stdenv | ||
, fetchFromGitHub | ||
, bison | ||
, cmake | ||
, flex | ||
, pkg-config | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "symbiflow-vtr"; | ||
version = "8.0.0.rc2-4003-g8980e4621"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "SymbiFlow"; | ||
repo = "vtr-verilog-to-routing"; | ||
rev = "8980e46218542888fac879961b13aa7b0fba8432"; | ||
sha256 = "1sq7f1f3dzfm48a9vq5nvp0zllby0nasm3pvqab70f4jaq0m1aaa"; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
bison | ||
cmake | ||
flex | ||
pkg-config | ||
]; | ||
|
||
cmakeFlags = [ | ||
"-DWITH_ODIN=OFF" | ||
"-DWITH_ABC=OFF" | ||
]; | ||
|
||
doCheck = true; | ||
|
||
meta = with stdenv.lib; { | ||
description = "SymbiFlow WIP changes for Verilog to Routing (VTR)"; | ||
homepage = "https://github.com/SymbiFlow/vtr-verilog-to-routing"; | ||
platforms = platforms.all; | ||
maintainers = with maintainers; [ mcaju ]; | ||
}; | ||
} |
37 changes: 37 additions & 0 deletions
37
pkgs/development/compilers/symbiflow-yosys-plugins/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ stdenv | ||
, fetchFromGitHub | ||
, symbiflow-yosys | ||
, zlib | ||
, readline | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "symbiflow-yosys-plugins"; | ||
version = "1.0.0.7-0060-g7454cd6b"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "SymbiFlow"; | ||
repo = "yosys-symbiflow-plugins"; | ||
rev = "7454cd6b5e4fd22854e2ada219a5e3c3a06e0717"; | ||
sha256 = "0r9r31p7fy4ylfrwvwlbivq5a03xrph34blxbxzx2c8bc02mbv0s"; | ||
}; | ||
|
||
enableParallelBuilding = true; | ||
|
||
nativeBuildInputs = [ symbiflow-yosys ]; | ||
|
||
buildInputs = [ | ||
readline | ||
zlib | ||
]; | ||
|
||
makeFlags = [ "PLUGINS_DIR=${placeholder "out"}/share/yosys/plugins" ]; | ||
|
||
meta = with stdenv.lib; { | ||
description = "Yosys SymbiFlow Plugins"; | ||
homepage = "https://github.com/SymbiFlow/yosys-symbiflow-plugins"; | ||
license = licenses.isc; | ||
platforms = platforms.all; | ||
maintainers = with maintainers; [ mcaju ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ stdenv | ||
, abc-verifier | ||
, fetchFromGitHub | ||
, yosys | ||
, plugins ? [] | ||
}: | ||
|
||
let | ||
localAbc-verifier = abc-verifier.overrideAttrs (_: rec { | ||
pname = "abc-verifier"; | ||
version = "2020.06.22"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "YosysHQ"; | ||
repo = "abc"; | ||
rev = "341db25668f3054c87aa3372c794e180f629af5d"; | ||
sha256 = "14cgv34vz5ljkcms6nrv19vqws2hs8bgjgffk5q03cbxnm2jxv5s"; | ||
}; | ||
|
||
passthru.rev = src.rev; | ||
}); | ||
in | ||
|
||
(yosys.overrideAttrs (oldAttrs: rec { | ||
pname = "symbiflow-yosys"; | ||
version = "0.9+2406"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "SymbiFlow"; | ||
repo = "yosys"; | ||
rev = "d8b2d1a2b1a93057678cf49bb8f0329f191faba1"; | ||
sha256 = "1w8jnqzabvzixjllhb6ak2n2gmjvsn6qd996i7z70bsq5rgdkq9g"; | ||
}; | ||
})).override { | ||
abc-verifier = localAbc-verifier; | ||
plugins = plugins; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
pkgs/development/python-modules/python-prjxray/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ stdenv | ||
, fetchFromGitHub | ||
, pkgs | ||
, buildPythonPackage | ||
, intervaltree | ||
, numpy | ||
, openpyxl | ||
, parse | ||
, progressbar | ||
, pyjson5 | ||
, pyyaml | ||
, simplejson | ||
, symbiflow-fasm | ||
, textx | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "python-prjxray"; | ||
version = pkgs.prjxray-tools.version; | ||
|
||
src = pkgs.prjxray-tools.src; | ||
|
||
propagatedBuildInputs = [ | ||
intervaltree | ||
numpy | ||
openpyxl | ||
parse | ||
progressbar | ||
pyjson5 | ||
pyyaml | ||
simplejson | ||
symbiflow-fasm | ||
textx | ||
]; | ||
|
||
doCheck = false; | ||
|
||
meta = with stdenv.lib; { | ||
description = "Documenting the Xilinx 7-series bit-stream format"; | ||
homepage = "https://github.com/SymbiFlow/prjxray"; | ||
license = licenses.isc; | ||
maintainers = with maintainers; [ mcaju ]; | ||
}; | ||
} |
Oops, something went wrong.