Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
/ hdx Public archive

nextpnr-xilinx. #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 31 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
url = git+https://github.com/YosysHQ/prjtrellis?rev=e830a28077e1a789d32e75841312120ae624c8d6&submodules=1;
flake = false;
};
nextpnr-xilinx = {
url = git+https://github.com/gatecat/nextpnr-xilinx?submodules=1;
flake = false;
};
symbiyosys = {
url = github:YosysHQ/sby?rev=cf0a761a3a0ba2e38258ff72f93505c85834dd16;
flake = false;
Expand Down
2 changes: 2 additions & 0 deletions hdx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ inputs @ {
enable = true;
archs = ["generic" "ice40" "ecp5"];
};
nextpnr-xilinx.enable = true;
symbiyosys = {
enable = true;
solvers = ["yices" "z3"];
Expand Down Expand Up @@ -85,6 +86,7 @@ inputs @ {
}
// optionalAttrs (hdx-config.yosys.enable) {yosys = callPackage ./pkgs/yosys.nix {};}
// optionalAttrs (hdx-config.nextpnr.enable) ({nextpnr = callPackage ./pkgs/nextpnr.nix {inherit nextpnrArchs;};} // nextpnrArchs)
// optionalAttrs (hdx-config.nextpnr-xilinx.enable) {nextpnr-xilinx = callPackage ./pkgs/nextpnr-xilinx.nix {};}
// optionalAttrs (hdx-config.symbiyosys.enable) (
{symbiyosys = callPackage ./pkgs/symbiyosys.nix {};}
// optionalAttrs (elem "z3" hdx-config.symbiyosys.solvers) {z3 = callPackage ./pkgs/z3.nix {};}
Expand Down
29 changes: 29 additions & 0 deletions pkgs/nextpnr-xilinx.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
pkgs,
lib,
stdenv,
hdx-config,
hdx-inputs,
python,
boost,
}: let
src = hdx-inputs.nextpnr-xilinx;
version = "0.6dev1+g${lib.substring 0 7 src.rev}";
in
stdenv.mkDerivation {
pname = "nextpnr-xilinx";
inherit version src;

nativeBuildInputs = [pkgs.cmake];

buildInputs = builtins.attrValues {
inherit
python
boost
;
inherit (pkgs) eigen;
inherit (python.pkgs) apycula;
};

cmakeFlags = ["-DARCH=xilinx"];
}