diff options
author | Nathan Ringo <nathan@remexre.com> | 2024-09-23 21:46:34 -0500 |
---|---|---|
committer | Nathan Ringo <nathan@remexre.com> | 2024-09-23 21:46:34 -0500 |
commit | fc1959bd9887ecc4d4ceb62a53e87abc6f49ef00 (patch) | |
tree | 801fad484692ca226eb2dfdf792338cabe218c72 /fpga/default.nix | |
parent | 777da6874bdbda1c83108024eb37dc901e04838e (diff) |
Adds README, moves fpga stuff to a subdirectory.
Diffstat (limited to 'fpga/default.nix')
-rw-r--r-- | fpga/default.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/fpga/default.nix b/fpga/default.nix new file mode 100644 index 0000000..ad4d4b4 --- /dev/null +++ b/fpga/default.nix @@ -0,0 +1,35 @@ +{ + bluespec, + icestorm, + nextpnr, + yosys, + stdenv, +}: + +stdenv.mkDerivation { + pname = "numini-fpga"; + version = "0.1.0"; + src = ./.; + nativeBuildInputs = [ + bluespec + icestorm + nextpnr + yosys + ]; + configurePhase = '' + runHook preConfigure + export BSC=${bluespec} + runHook postConfigure + ''; + buildFlags = [ + "tmp/mkTop.bin" + "tmp/mkTopSim.exe" + ]; + installPhase = '' + runHook preInstall + install -DTm600 tmp/mkTop.bin $out/numini.bin + install -DTm700 tmp/mkTopSim.exe $out/numini-bluesim + install -DTm700 tmp/mkTopSim.exe.so $out/numini-bluesim.so + runHook postInstall + ''; +} |