reorganize
This commit is contained in:
parent
63664ab959
commit
a203307108
30
default.nix
30
default.nix
|
@ -1,8 +1,28 @@
|
||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
let
|
rec {
|
||||||
hx = import ./derivations.nix { inherit pkgs; };
|
drvs = rec {
|
||||||
in
|
yosys = pkgs.callPackage ./eda/yosys.nix {};
|
||||||
hx // {
|
symbiyosys = pkgs.symbiyosys.override { inherit yosys; };
|
||||||
symbiflow = import ./eda/symbiflow.nix { inherit pkgs; yosys = hx.yosys; };
|
nmigen = pkgs.callPackage ./eda/nmigen.nix { inherit yosys; };
|
||||||
|
scala-spinalhdl = pkgs.callPackage ./eda/scala-spinalhdl.nix {};
|
||||||
|
|
||||||
|
jtagtap = pkgs.callPackage ./cores/jtagtap.nix { inherit nmigen; };
|
||||||
|
minerva = pkgs.callPackage ./cores/minerva.nix { inherit nmigen; inherit jtagtap; };
|
||||||
|
vexriscv-small = pkgs.callPackage ./cores/vexriscv.nix {
|
||||||
|
inherit scala-spinalhdl;
|
||||||
|
name = "vexriscv-small";
|
||||||
|
scalaToRun = "vexriscv.demo.GenSmallAndProductive";
|
||||||
|
};
|
||||||
|
|
||||||
|
heavycomps = pkgs.callPackage ./heavycomps.nix { inherit nmigen; };
|
||||||
|
|
||||||
|
binutils-riscv = pkgs.callPackage ./compilers/binutils.nix { platform = "riscv32"; };
|
||||||
|
rust-riscv32imc-crates = pkgs.callPackage ./compilers/rust-riscv32imc-crates.nix { };
|
||||||
|
|
||||||
|
helloworld = pkgs.callPackage ./firmware { inherit rust-riscv32imc-crates binutils-riscv; };
|
||||||
|
};
|
||||||
|
lib = {
|
||||||
|
symbiflow = import ./eda/symbiflow.nix { inherit pkgs; inherit (drvs) yosys; };
|
||||||
vivado = import ./eda/vivado.nix { inherit pkgs; };
|
vivado = import ./eda/vivado.nix { inherit pkgs; };
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
{ pkgs }:
|
|
||||||
rec {
|
|
||||||
yosys = pkgs.callPackage ./eda/yosys.nix {};
|
|
||||||
symbiyosys = pkgs.symbiyosys.override { inherit yosys; };
|
|
||||||
nmigen = pkgs.callPackage ./eda/nmigen.nix { inherit yosys; };
|
|
||||||
scala-spinalhdl = pkgs.callPackage ./eda/scala-spinalhdl.nix {};
|
|
||||||
|
|
||||||
jtagtap = pkgs.callPackage ./cores/jtagtap.nix { inherit nmigen; };
|
|
||||||
minerva = pkgs.callPackage ./cores/minerva.nix { inherit nmigen; inherit jtagtap; };
|
|
||||||
vexriscv-small = pkgs.callPackage ./cores/vexriscv.nix {
|
|
||||||
inherit scala-spinalhdl;
|
|
||||||
name = "vexriscv-small";
|
|
||||||
scalaToRun = "vexriscv.demo.GenSmallAndProductive";
|
|
||||||
};
|
|
||||||
|
|
||||||
heavycomps = pkgs.callPackage ./heavycomps.nix { inherit nmigen; };
|
|
||||||
|
|
||||||
binutils-riscv = pkgs.callPackage ./compilers/binutils.nix { platform = "riscv32"; };
|
|
||||||
rust-riscv32imc-crates = pkgs.callPackage ./compilers/rust-riscv32imc-crates.nix { };
|
|
||||||
|
|
||||||
helloworld = pkgs.callPackage ./firmware { inherit rust-riscv32imc-crates binutils-riscv; };
|
|
||||||
}
|
|
|
@ -1,9 +1,8 @@
|
||||||
{ pkgs ? import <nixpkgs> {}
|
{ pkgs, hx }:
|
||||||
, hx ? import ../default.nix { inherit pkgs; }}:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
symbiflowInput = pkgs.runCommand "helloworld-symbiflow-input" {
|
symbiflowInput = pkgs.runCommand "helloworld-symbiflow-input" {
|
||||||
buildInputs = [ (pkgs.python3.withPackages(ps: [hx.nmigen hx.heavycomps])) hx.yosys ];
|
buildInputs = [ (pkgs.python3.withPackages(ps: [hx.drvs.nmigen hx.drvs.heavycomps])) hx.drvs.yosys ];
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
@ -20,7 +19,7 @@ let
|
||||||
echo -n "--um-45k --speed 8 --package CABGA381" > $out/device
|
echo -n "--um-45k --speed 8 --package CABGA381" > $out/device
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
hx.symbiflow.buildBitstream {
|
hx.lib.symbiflow.buildBitstream {
|
||||||
name = "helloworld-bitstream";
|
name = "helloworld-bitstream";
|
||||||
src = symbiflowInput;
|
src = symbiflowInput;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
{ pkgs ? import <nixpkgs> {}
|
{ pkgs, hx }:
|
||||||
, hx ? import ../default.nix { inherit pkgs; }}:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
vivadoInput = pkgs.runCommand "helloworld-vivado-input" {
|
vivadoInput = pkgs.runCommand "helloworld-vivado-input" {
|
||||||
buildInputs = [ (pkgs.python3.withPackages(ps: [hx.nmigen hx.heavycomps])) hx.yosys ];
|
buildInputs = [ (pkgs.python3.withPackages(ps: [hx.drvs.nmigen hx.drvs.heavycomps])) hx.drvs.yosys ];
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
@ -42,7 +41,7 @@ let
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
hx.vivado.buildBitstream {
|
hx.lib.vivado.buildBitstream {
|
||||||
name = "helloworld-bitstream";
|
name = "helloworld-bitstream";
|
||||||
src = vivadoInput;
|
src = vivadoInput;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
{ pkgs ? import <nixpkgs> {}
|
{ pkgs, hx }:
|
||||||
, hx ? import ../default.nix { inherit pkgs; }}:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
symbiflowInput = pkgs.runCommand "simplesoc-symbiflow-input" {
|
symbiflowInput = pkgs.runCommand "simplesoc-symbiflow-input" {
|
||||||
buildInputs = [ (pkgs.python3.withPackages(ps: [hx.nmigen hx.heavycomps hx.minerva])) hx.yosys ];
|
buildInputs = [ (pkgs.python3.withPackages(ps: [hx.drvs.nmigen hx.drvs.heavycomps hx.drvs.minerva])) hx.drvs.yosys ];
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
@ -20,7 +19,7 @@ let
|
||||||
echo -n "--um-45k --speed 8 --package CABGA381" > $out/device
|
echo -n "--um-45k --speed 8 --package CABGA381" > $out/device
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
hx.symbiflow.buildBitstream {
|
hx.lib.symbiflow.buildBitstream {
|
||||||
name = "simplesoc-bitstream";
|
name = "simplesoc-bitstream";
|
||||||
src = symbiflowInput;
|
src = symbiflowInput;
|
||||||
}
|
}
|
||||||
|
|
10
release.nix
10
release.nix
|
@ -1,13 +1,13 @@
|
||||||
{ }:
|
{ }:
|
||||||
let
|
let
|
||||||
pkgs = import <nixpkgs> { overlays = [ (import ./overlay.nix) ]; };
|
pkgs = import <nixpkgs> { overlays = [ (import ./overlay.nix) ]; };
|
||||||
derivations = import ./derivations.nix { inherit pkgs; };
|
hx = import ./default.nix { inherit pkgs; };
|
||||||
jobs = derivations // {
|
jobs = hx.drvs // {
|
||||||
inherit (pkgs) llvm_7 rustc cargo cargo-vendor;
|
inherit (pkgs) llvm_7 rustc cargo cargo-vendor;
|
||||||
|
|
||||||
helloworld_ecp5 = import ./examples/helloworld_ecp5.nix { inherit pkgs; };
|
helloworld_ecp5 = import ./examples/helloworld_ecp5.nix { inherit pkgs hx; };
|
||||||
helloworld_kintex7 = import ./examples/helloworld_kintex7.nix { inherit pkgs; };
|
helloworld_kintex7 = import ./examples/helloworld_kintex7.nix { inherit pkgs hx; };
|
||||||
simplesoc_ecp5 = import ./examples/simplesoc_ecp5.nix { inherit pkgs; };
|
simplesoc_ecp5 = import ./examples/simplesoc_ecp5.nix { inherit pkgs hx; };
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
builtins.mapAttrs (name: value: pkgs.lib.hydraJob value) jobs
|
builtins.mapAttrs (name: value: pkgs.lib.hydraJob value) jobs
|
||||||
|
|
Loading…
Reference in New Issue