Merge pull request #43 from RCoeurjoly/ypcb-chipdb-overlay
Add patch for PrjxrayDb
This commit is contained in:
commit
4a51b96713
|
|
@ -54,6 +54,10 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": [
|
||||||
|
"toolchain-nix",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
"toolchain-nix": "toolchain-nix"
|
"toolchain-nix": "toolchain-nix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
46
flake.nix
46
flake.nix
|
|
@ -4,10 +4,50 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
toolchain-nix.url = "github:openXC7/toolchain-nix";
|
toolchain-nix.url = "github:openXC7/toolchain-nix";
|
||||||
|
nixpkgs.follows = "toolchain-nix/nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { flake-utils, toolchain-nix, ... }:
|
outputs = { flake-utils, nixpkgs, toolchain-nix, ... }:
|
||||||
flake-utils.lib.eachDefaultSystem (system: {
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
devShells.default = toolchain-nix.devShell.${system};
|
let
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
openXc7Shell = toolchain-nix.devShell.${system};
|
||||||
|
nextpnrXilinx = toolchain-nix.packages.${system}.nextpnr-xilinx;
|
||||||
|
originalPrjxrayDb = "${nextpnrXilinx}/share/nextpnr/external/prjxray-db";
|
||||||
|
patchedPrjxrayDb = pkgs.runCommand "prjxray-db-kintex7-lioi3-tbytesrc-oclkm-overlay" { } ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -a ${originalPrjxrayDb}/kintex7 $out/kintex7
|
||||||
|
|
||||||
|
for db_file in \
|
||||||
|
$out/kintex7/segbits_lioi3_tbytesrc.db \
|
||||||
|
$out/kintex7/segbits_lioi3_tbytesrc.origin_info.db
|
||||||
|
do
|
||||||
|
chmod u+w "$db_file"
|
||||||
|
done
|
||||||
|
|
||||||
|
if ! grep -q "^LIOI3_TBYTESRC.IOI_OCLKM_0.IOI_IMUX31_1 " \
|
||||||
|
$out/kintex7/segbits_lioi3_tbytesrc.db
|
||||||
|
then
|
||||||
|
cat >> $out/kintex7/segbits_lioi3_tbytesrc.db <<EOF
|
||||||
|
LIOI3_TBYTESRC.IOI_OCLKM_0.IOI_IMUX31_1 30_94 31_83 31_93
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! grep -q "^LIOI3_TBYTESRC.IOI_OCLKM_0.IOI_IMUX31_1 " \
|
||||||
|
$out/kintex7/segbits_lioi3_tbytesrc.origin_info.db
|
||||||
|
then
|
||||||
|
cat >> $out/kintex7/segbits_lioi3_tbytesrc.origin_info.db <<EOF
|
||||||
|
LIOI3_TBYTESRC.IOI_OCLKM_0.IOI_IMUX31_1 origin:037-iob-pips 30_94 31_83 31_93
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
inputsFrom = [ openXc7Shell ];
|
||||||
|
shellHook = ''
|
||||||
|
${openXc7Shell.shellHook or ""}
|
||||||
|
export PRJXRAY_DB_DIR="${patchedPrjxrayDb}"
|
||||||
|
'';
|
||||||
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue