outputs = { self, nixpkgs, c4m-jtag, nmigen, nmigen-soc }:
let
+ getv = x: builtins.substring 0 8 x.lastModifiedDate;
+
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
overrides = pfinal: pprev: {
libresoc-ieee754fpu = pfinal.callPackage ./nix/ieee754fpu.nix {};
libresoc-openpower-isa = pfinal.callPackage ./nix/openpower-isa.nix {};
- c4m-jtag = pfinal.callPackage (import ./nix/c4m-jtag.nix { src = c4m-jtag; version = c4m-jtag.lastModifiedDate; }) {};
+ c4m-jtag = pfinal.callPackage (import ./nix/c4m-jtag.nix { src = c4m-jtag; version = getv c4m-jtag; }) {};
bigfloat = pfinal.callPackage ./nix/bigfloat.nix {};
modgrammar = pfinal.callPackage ./nix/modgrammar.nix {};
libresoc-nmutil = pfinal.callPackage ./nix/nmutil.nix {};
};
};
- libresoc-verilog = final.callPackage (import ./nix/verilog.nix { version = self.lastModifiedDate; }) {};
+ libresoc-verilog = final.callPackage (import ./nix/verilog.nix { version = getv self; }) {};
+ libresoc-ilang = final.callPackage (import ./nix/ilang.nix { version = getv self; }) {};
};
packages = forAllSystems (system: {
verilog = nixpkgsFor.${system}.libresoc-verilog;
+ ilang = nixpkgsFor.${system}.libresoc-ilang;
openpower-isa = nixpkgsFor.${system}.python3Packages.libresoc-openpower-isa;
});
buildPythonPackage {
pname = "c4m-jtag";
- inherit src;
- version = "2.17";
+ inherit src version;
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ nmigen-soc nmigen modgrammar ];
pythonImportsCheck = [ "c4m.nmigen.jtag.tap" ];
prePatch = ''
- sed -i -e 's/use_scm_version=scm_version..,//g' setup.py
+ export SETUPTOOLS_SCM_PRETEND_VERSION=${version}
'';
+ # sed -i -e 's/use_scm_version=scm_version..,//g' setup.py
meta = with lib; {
homepage = "https://pypi.org/project/libresoc-openpower-isa/";
--- /dev/null
+{ version }:
+
+{ stdenv, python3Packages, yosys, libresoc-verilog }:
+
+stdenv.mkDerivation {
+ pname = "libresoc.il";
+ inherit version;
+
+ src = ../src/soc/litex/florent;
+
+ strictDeps = true;
+
+ nativeBuildInputs = (with python3Packages; [
+ c4m-jtag nmigen-soc python libresoc-ieee754fpu libresoc-openpower-isa
+ ]) ++ [ yosys ];
+
+ postPatch = ''
+ patchShebangs --build .
+ '';
+
+ configurePhase = "true";
+
+ buildPhase = ''
+ runHook preBuild
+ cp ${libresoc-verilog} libresoc/libresoc.v
+ stat ls180soc.py
+ ./ls180soc.py --build --platform=ls180sram4k --num-srams=2 --srams4k
+ echo IKJIJIJIJI
+ #make ls1804k
+ runHook postBuild
+ '';
+
+ installPhase = ''
+ runHook preInstall
+ mkdir $out
+ mv ls180.il ls180_cvt.il libresoc_cvt.il -t $out
+ runHook postInstall
+ '';
+
+ fixupPhase = "true";
+}