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

Commit

Permalink
nextpnr-xilinx: add.
Browse files Browse the repository at this point in the history
  • Loading branch information
charlottia committed Oct 10, 2023
1 parent 4c186bb commit 6ac077a
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 12 deletions.
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"];
}

0 comments on commit 6ac077a

Please sign in to comment.