diff --git a/pkgs/default.nix b/pkgs/default.nix index fb3b2e9..b828554 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -13,7 +13,7 @@ python_ot = pkgs.callPackage ./python_ot {inherit inputs;}; bazel_ot = pkgs.callPackage ./bazel_ot {}; llvm_cheriot = pkgs.callPackage ./llvm_cheriot.nix {}; - ibex-cosim = pkgs.callPackage ./ibex-cosim.nix {}; + spike_ibex_cosim = pkgs.callPackage ./spike.nix {}; } // pkgs.lib.optionalAttrs (pkgs.system == "x86_64-linux") { lowrisc-toolchain-gcc-rv32imcb = pkgs.callPackage ./lowrisc-toolchain-gcc-rv32imcb.nix {}; diff --git a/pkgs/ibex-cosim.nix b/pkgs/ibex-cosim.nix deleted file mode 100644 index 06ce11f..0000000 --- a/pkgs/ibex-cosim.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - fetchFromGitHub, - stdenv, - dtc, -}: -stdenv.mkDerivation rec { - pname = "ibex-cosim"; - version = "15fbd56"; - - src = fetchFromGitHub { - owner = "lowRISC"; - repo = "riscv-isa-sim"; - # branch ibex_cosim - rev = "15fbd5680e44da699f828c67db15345822a47ef6"; - hash = "sha256-LK/IXmRHrGxaMRudcUYmeZV5eXU8eH7ruIw7kliumdY="; - }; - - nativeBuildInputs = [ - dtc - ]; - - configureFlags = [ - "--enable-commitlog" - "--enable-misaligned" - ]; - - enableParallelBuilding = true; -} diff --git a/pkgs/spike.nix b/pkgs/spike.nix new file mode 100644 index 0000000..b8660f2 --- /dev/null +++ b/pkgs/spike.nix @@ -0,0 +1,16 @@ +{ + fetchFromGitHub, + spike, +}: +# The lowRISC Ibex processor (https://github.com/lowRISC/ibex) uses a fork of +# spike as an Instruction Set Simulator (ISS) for a cosimulation testbench in +# its Design Verification (DV) environment. +spike.overrideAttrs (_: prev: { + src = fetchFromGitHub { + owner = "lowRISC"; + repo = "riscv-isa-sim"; + rev = "ibex-cosim-v0.5"; + sha256 = "sha256-LK/IXmRHrGxaMRudcUYmeZV5eXU8eH7ruIw7kliumdY="; + }; + configureFlags = (prev.configureFlags or []) ++ ["--enable-commitlog" "--enable-misaligned"]; +})