yosys: 2020.02.25 -> 2020.03.16

- Bump `abc-verifier` (2020.03.05)
  - Install `yosys-abc` symlink for tool compatbility
  - Various `yosys` expression cleanups

Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
Austin Seipp 2020-03-17 05:26:27 -05:00
parent e86ec10426
commit 9b43cf3a00
No known key found for this signature in database
GPG Key ID: 25D2038DEB08021D
2 changed files with 39 additions and 41 deletions

View File

@ -1,35 +1,32 @@
{ fetchFromGitHub, stdenv, readline, cmake }: { stdenv, fetchFromGitHub
, readline, cmake
}:
let stdenv.mkDerivation rec {
rev = "71f2b40320127561175ad60f6f2428f3438e5243"; pname = "abc-verifier";
in stdenv.mkDerivation { version = "2020.03.05";
pname = "abc-verifier";
version = "2020-01-11";
src = fetchFromGitHub { src = fetchFromGitHub {
inherit rev; owner = "berkeley-abc";
owner = "berkeley-abc"; repo = "abc";
repo = "abc"; rev = "ed90ce20df9c7c4d6e1db5d3f786f9b52e06bab1";
sha256 = "15sn146ajxql7l1h8rsag5lhn4spwvgjhwzqawfr78snzadw8by3"; sha256 = "01sw67pkrb6wzflkxbkxzwsnli3nvp0yxwp3j1ngb3c0j86ri437";
}; };
passthru.rev = rev;
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
buildInputs = [ readline ]; buildInputs = [ readline ];
enableParallelBuilding = true; enableParallelBuilding = true;
installPhase = "mkdir -p $out/bin && mv abc $out/bin";
installPhase = '' # needed by yosys
mkdir -p $out/bin passthru.rev = src.rev;
mv abc $out/bin
'';
meta = { meta = with stdenv.lib; {
description = "A tool for squential logic synthesis and formal verification"; description = "A tool for squential logic synthesis and formal verification";
homepage = https://people.eecs.berkeley.edu/~alanmi/abc; homepage = "https://people.eecs.berkeley.edu/~alanmi/abc";
license = stdenv.lib.licenses.mit; license = licenses.mit;
platforms = stdenv.lib.platforms.unix; platforms = platforms.unix;
maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; maintainers = with maintainers; [ thoughtpolice ];
}; };
} }

View File

@ -14,14 +14,14 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "yosys"; pname = "yosys";
version = "2020.02.25"; version = "2020.03.16";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "YosysHQ"; owner = "YosysHQ";
repo = "yosys"; repo = "yosys";
rev = "6edca05793197a846bbfb0329e836c87fa5aabb6"; rev = "ed4fa19ba2812c286562baf26bbbcb49afad83bc";
sha256 = "1cwps3nsld80bh2b66l8fx3fa2zsx174mw72kqxyihpfdm0m0z1s"; sha256 = "1sza5ng0q8dy6p4hks9b2db129xjcid9n6l8aglf2cj5ks82k5nv";
}; };
enableParallelBuilding = true; enableParallelBuilding = true;
@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
# we have to do this ourselves for some reason... # we have to do this ourselves for some reason...
(cd misc && ${protobuf}/bin/protoc --cpp_out ../backends/protobuf/ ./yosys.proto) (cd misc && ${protobuf}/bin/protoc --cpp_out ../backends/protobuf/ ./yosys.proto)
if ! grep -q "ABCREV = ${shortAbcRev}" Makefile;then if ! grep -q "ABCREV = ${shortAbcRev}" Makefile; then
echo "yosys isn't compatible with the provided abc (${shortAbcRev}), failing." echo "yosys isn't compatible with the provided abc (${shortAbcRev}), failing."
exit 1 exit 1
fi fi
@ -60,20 +60,21 @@ stdenv.mkDerivation rec {
doCheck = true; doCheck = true;
checkInputs = [ verilog ]; checkInputs = [ verilog ];
meta = { # Internally, yosys knows to use the specified hardcoded ABCEXTERNAL binary.
description = "Framework for RTL synthesis tools"; # But other tools (like mcy or symbiyosys) can't know how yosys was built, so
longDescription = '' # they just assume that 'yosys-abc' is available -- but it's not installed
Yosys is a framework for RTL synthesis tools. It currently has # when using ABCEXTERNAL
extensive Verilog-2005 support and provides a basic set of #
synthesis algorithms for various application domains. # add a symlink to fake things so that both variants work the same way.
Yosys can be adapted to perform any synthesis job by combining postInstall = ''
the existing passes (algorithms) using synthesis scripts and ln -sfv ${abc-verifier}/bin/abc $out/bin/yosys-abc
adding additional passes as needed by extending the yosys C++ '';
code base.
''; meta = with stdenv.lib; {
homepage = http://www.clifford.at/yosys/; description = "Open RTL synthesis framework and tools";
license = stdenv.lib.licenses.isc; homepage = "http://www.clifford.at/yosys/";
maintainers = with stdenv.lib.maintainers; [ shell thoughtpolice emily ]; license = licenses.isc;
platforms = stdenv.lib.platforms.all; platforms = platforms.all;
maintainers = with maintainers; [ shell thoughtpolice emily ];
}; };
} }