Allow the formal engine to perform a same-cycle result in the ALU
[soc.git] / nix / ls180.nix
1 { version }:
2
3 { stdenv, python3Packages, yosys, libresoc-verilog, libresoc-pinmux, pkgsCross }:
4
5 stdenv.mkDerivation {
6 pname = "libresoc-ls1804k";
7 inherit version;
8
9 src = ../src/soc/litex/florent;
10
11 nativeBuildInputs =
12 (with python3Packages; [
13 python libresoc-soc litex litedram liteeth liteiclink litescope litesdcard
14 ])
15 ++ [ pkgsCross.powernv.buildPackages.gcc ];
16
17 postPatch = ''
18 patchShebangs --build .
19 '';
20
21 configurePhase = "true";
22
23 buildPhase = ''
24 runHook preBuild
25 export PINMUX="$(mktemp -d)"
26 ln -s ${libresoc-pinmux} "$PINMUX/ls180"
27 cp ${libresoc-verilog} libresoc/libresoc.v
28 ./ls180soc.py --build --platform=ls180sram4k --num-srams=2 --srams4k
29 runHook postBuild
30 '';
31
32 installPhase = ''
33 runHook preInstall
34 mkdir $out
35 mv build/ls180sram4k/gateware/ls180sram4k.v $out/ls180.v
36 mv build/ls180sram4k/gateware/mem.init $out
37 mv build/ls180sram4k/gateware/mem_1.init $out
38 mv libresoc/libresoc.v $out
39 mv libresoc/SPBlock_512W64B8W.v $out
40 runHook postInstall
41 '';
42
43 fixupPhase = "true";
44 }