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