From 5bc15764d691ca9f42c0e9833f4708941dab4b82 Mon Sep 17 00:00:00 2001 From: Las Safin Date: Wed, 6 Oct 2021 09:17:51 +0000 Subject: [PATCH] flake.nix: Clean up --- flake.nix | 6 +++--- nix/ecp5-program.nix | 3 +-- nix/ecp5.nix | 6 +++--- nix/ls180.nix | 4 ++-- nix/{pre-litex.nix => verilog.nix} | 2 +- 5 files changed, 10 insertions(+), 11 deletions(-) rename nix/{pre-litex.nix => verilog.nix} (91%) diff --git a/flake.nix b/flake.nix index 2027d9bf..c45eeb3d 100644 --- a/flake.nix +++ b/flake.nix @@ -69,7 +69,7 @@ src = yosys; }); - libresoc-pre-litex = final.callPackage (import ./nix/pre-litex.nix { version = getv self; }) { python3Packages = final.python37Packages; }; + libresoc-verilog = final.callPackage (import ./nix/verilog.nix { version = getv self; }) { python3Packages = final.python37Packages; }; libresoc-ls180 = final.callPackage (import ./nix/ls180.nix { version = getv self; }) { python3Packages = final.python37Packages; }; libresoc-ecp5 = final.callPackage (import ./nix/ecp5.nix { version = getv self; }) { python3Packages = final.python37Packages; }; libresoc-ecp5-program = final.callPackage (import ./nix/ecp5-program.nix { version = getv self; }) { python3Packages = final.python37Packages; }; @@ -86,7 +86,7 @@ packages = forAllSystems (system: { soc = nixpkgsFor.${system}.python37Packages.libresoc-soc; - pre-litex = nixpkgsFor.${system}.libresoc-pre-litex; + verilog = nixpkgsFor.${system}.libresoc-verilog; pinmux = nixpkgsFor.${system}.libresoc-pinmux; ls180 = nixpkgsFor.${system}.libresoc-ls180; ecp5 = nixpkgsFor.${system}.libresoc-ecp5; @@ -95,6 +95,6 @@ debugNixpkgs = nixpkgsFor.${system}; }); - defaultPackage = forAllSystems (system: self.packages.${system}.pre-litex); + defaultPackage = forAllSystems (system: self.packages.${system}.verilog); }; } diff --git a/nix/ecp5-program.nix b/nix/ecp5-program.nix index 09ce2194..4d696b22 100644 --- a/nix/ecp5-program.nix +++ b/nix/ecp5-program.nix @@ -1,7 +1,6 @@ { version }: -{ writeShellScript, openocd, python3Packages, libresoc-ecp5, yosys, libresoc-pre-litex, libresoc-pinmux, pkgsCross -, nextpnr, trellis }: +{ writeShellScript, openocd, python3Packages, libresoc-ecp5, nextpnr, trellis }: let pythonWithEnv = python3Packages.python.withPackages (ps: with ps; [ diff --git a/nix/ecp5.nix b/nix/ecp5.nix index 025799b0..1c82ee4b 100644 --- a/nix/ecp5.nix +++ b/nix/ecp5.nix @@ -1,10 +1,10 @@ { version }: -{ stdenv, python3Packages, yosys, libresoc-pre-litex, libresoc-pinmux, pkgsCross +{ stdenv, python3Packages, yosys, libresoc-verilog, libresoc-pinmux, pkgsCross , nextpnr, trellis }: stdenv.mkDerivation { - pname = "libresoc-versa-ecp5"; + pname = "libresoc-versa-ecp5.v"; inherit version; src = ../src/soc/litex/florent; @@ -25,7 +25,7 @@ stdenv.mkDerivation { runHook preBuild export PINMUX="$(mktemp -d)" ln -s ${libresoc-pinmux} "$PINMUX/ls180" - cp ${libresoc-pre-litex} libresoc/libresoc.v + cp ${libresoc-verilog} libresoc/libresoc.v ./versa_ecp5.py --sys-clk-freq=55e6 --build runHook postBuild ''; diff --git a/nix/ls180.nix b/nix/ls180.nix index 37b97506..028fbcb0 100644 --- a/nix/ls180.nix +++ b/nix/ls180.nix @@ -1,6 +1,6 @@ { version }: -{ stdenv, python3Packages, yosys, libresoc-pre-litex, libresoc-pinmux, pkgsCross }: +{ stdenv, python3Packages, yosys, libresoc-verilog, libresoc-pinmux, pkgsCross }: stdenv.mkDerivation { pname = "libresoc-ls1804k"; @@ -24,7 +24,7 @@ stdenv.mkDerivation { runHook preBuild export PINMUX="$(mktemp -d)" ln -s ${libresoc-pinmux} "$PINMUX/ls180" - cp ${libresoc-pre-litex} libresoc/libresoc.v + cp ${libresoc-verilog} libresoc/libresoc.v ./ls180soc.py --build --platform=ls180sram4k --num-srams=2 --srams4k runHook postBuild ''; diff --git a/nix/pre-litex.nix b/nix/verilog.nix similarity index 91% rename from nix/pre-litex.nix rename to nix/verilog.nix index cf405e1a..600b6939 100644 --- a/nix/pre-litex.nix +++ b/nix/verilog.nix @@ -11,7 +11,7 @@ let script = '' --enable-xics --enable-sram4x4kblock --disable-svp64 \ $out ''; in -runCommand "libresoc-ls1804k-pre-litex.v" { +runCommand "libresoc.v" { inherit version; nativeBuildInputs = (with python3Packages; [ -- 2.30.2