Skip to content

Commit

Permalink
Add PODEM build
Browse files Browse the repository at this point in the history
  • Loading branch information
donn committed Jul 16, 2024
1 parent 3182267 commit 889733d
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 92 deletions.
2 changes: 1 addition & 1 deletion Sources/Fault/TVGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ class PODEM: ExternalTestVectorGenerator {
}

let output = "\(folderName)/\(module).out"
let podem = "atpg -output \(output) \(file) > /dev/null 2>&1".sh()
let podem = "atpg-podem -output \(output) \(file) > /dev/null 2>&1".sh()

if podem != EX_OK {
exit(podem)
Expand Down
91 changes: 0 additions & 91 deletions atalanta_podem_build.swift

This file was deleted.

1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
outputs = {self, nix-eda, quaigh, ...}: {
packages = nix-eda.forAllSystems { current = self; withInputs = [nix-eda quaigh]; } (util: with util; rec{
atalanta = callPackage ./nix/atalanta.nix {};
podem = callPackage ./nix/podem.nix {};
fault = callPackage ./default.nix {};
default = fault;
});
Expand Down
37 changes: 37 additions & 0 deletions nix/podem.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
lib,
gccStdenv,
fetchFromGitHub,
}:
gccStdenv.mkDerivation {
name = "nctu-ee-podem";
version = "0.1.0";

src = fetchFromGitHub {
owner = "donn";
repo = "VLSI-Testing";
rev = "ff82db776521b294d79d54acc00b7b6eaaa5846d";
sha256 = "sha256-Nj8hQb9XlRjIIrfht8VNEfORmwtb+WWrP6UVlWgo81A=";
};

postPatch = ''
sed -i 's/^LIBS.*/LIBS = /' podem/Makefile
'';

buildPhase = ''
make -C podem
'';

installPhase = ''
mkdir -p $out/bin
cp podem/atpg $out/bin/atpg-podem
'';

meta = with lib; {
description = "A C++ implementation of PODEM used in the testing course of the NCTU EE program";
homepage = "https://github.com/cylinbao/VLSI-Testing";
license = licenses.unfree;
mainProgram = "atpg-podem";
platforms = platforms.linux ++ platforms.darwin;
};
}

0 comments on commit 889733d

Please sign in to comment.