Merge branch 'pr' into 'devel'

Add Nix code

See merge request vlsi-eda/coriolis!8
This commit is contained in:
Jean-Paul Chaput 2021-10-29 15:30:05 +00:00
commit 1bb5a0ae15
75 changed files with 1107 additions and 72 deletions

1
.gitignore vendored
View File

@ -40,3 +40,4 @@ documentation/RDS/RDS.toc
cumulus/src/plugins/CoreToChip_c35b4.py
cumulus/src/plugins/core2chip/c35b4.py
/result*

View File

@ -6,7 +6,7 @@
# ANABATIC_LIBRARIES - The path to where the Coriolis library files are.
SET(ANABATIC_INCLUDE_PATH_DESCRIPTION "directory containing the Katabatic include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
SET(ANABATIC_INCLUDE_PATH_DESCRIPTION "directory containing the Katabatic include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
SET(ANABATIC_DIR_MESSAGE "Set the ANABATIC_INCLUDE_DIR cmake cache entry to the ${ANABATIC_INCLUDE_PATH_DESCRIPTION}")
@ -18,7 +18,7 @@ IF(UNIX)
FIND_PATH(ANABATIC_INCLUDE_PATH NAMES anabatic/AnabaticEngine.h PATHS
# Look in other places.
${CORIOLIS_DIR_SEARCH}
PATH_SUFFIXES include/coriolis
PATH_SUFFIXES include/coriolis2
# Help the user find it if we cannot.
DOC "The ${ANABATIC_INCLUDE_PATH_DESCRIPTION}"
)

View File

@ -6,6 +6,7 @@ endif ( CHECK_DETERMINISM )
include_directories( ${ANABATIC_SOURCE_DIR}/src
${CORIOLIS_INCLUDE_DIR}
${ETESIAN_INCLUDE_DIR}
${HURRICANE_INCLUDE_DIR}
${CONFIGURATION_INCLUDE_DIR}
${FLUTE_INCLUDE_DIR}

View File

@ -39,15 +39,6 @@
message("-- Distribution is ${DISTRIBUTION}")
endmacro(check_distribution)
#
# Specific setup for MacOS X.
#
if(WITH_MACPORTS)
set(Boost_PYVER "27")
else()
set(Boost_PYVER "")
endif()
#
# Get the svn revision version and configure a svn.h.in file based on this version
# The include directory name is passed as argument
@ -196,9 +187,10 @@
else(ARGC LESS 1)
foreach(component ${ARGV})
if(${component} STREQUAL "python")
set(component ${component}${Boost_PYVER})
set(components ${components} ${component}39)
else()
set(components ${components} ${component})
endif()
set(components ${components} ${component})
endforeach()
find_package(Boost 1.35.0 COMPONENTS ${components} system)

View File

@ -1,6 +1,8 @@
# -*- explicit-buffer-name: "CMakeLists.txt<bora/src>" -*-
include_directories( ${BORA_SOURCE_DIR}/src
${ANABATIC_INCLUDE_DIR}
${KATANA_INCLUDE_DIR}
${CORIOLIS_INCLUDE_DIR}
${HURRICANE_INCLUDE_DIR}
${CONFIGURATION_INCLUDE_DIR}

View File

@ -6,7 +6,7 @@
# COLOQUINTE_LIBRARIES - The path to where the Coriolis library files are.
SET(COLOQUINTE_INCLUDE_PATH_DESCRIPTION "directory containing the Coloquinte include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
SET(COLOQUINTE_INCLUDE_PATH_DESCRIPTION "directory containing the Coloquinte include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
SET(COLOQUINTE_DIR_MESSAGE "Set the COLOQUINTE_INCLUDE_DIR cmake cache entry to the ${COLOQUINTE_INCLUDE_PATH_DESCRIPTION}")

4
compat.nix Normal file
View File

@ -0,0 +1,4 @@
import (builtins.fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/12c64ca55c1014cdc1b16ed5a804aa8576601ff2.tar.gz";
sha256 = "0jm6nzb83wa6ai17ly9fzpqc40wg1viib8klq8lby54agpl213w5";
})

View File

@ -5,7 +5,7 @@
# CRLCORE_INCLUDE_DIR - the path to where the Coriolis include files are.
# CRLCORE_LIBRARIES - The path to where the Coriolis library files are.
SET(CORIOLIS_INCLUDE_PATH_DESCRIPTION "directory containing the Coriolis include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
SET(CORIOLIS_INCLUDE_PATH_DESCRIPTION "directory containing the Coriolis include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
SET(CORIOLIS_DIR_MESSAGE "Set the CORIOLIS_INCLUDE_DIR cmake cache entry to the ${CORIOLIS_INCLUDE_PATH_DESCRIPTION}")
# don't even bother under WIN32
@ -63,3 +63,5 @@ IF(UNIX)
HURRICANE_CHECK_LIBRARIES(CORIOLIS_PYTHON ${CORIOLIS_FIND_REQUIRED})
ENDIF(UNIX)
SET(CORIOLIS_INCLUDE_DIR "${CRLCORE_INCLUDE_PATH}")

View File

@ -43,6 +43,7 @@ import Hurricane
import Viewer
import CRL
import helpers.io
from helpers.io import ErrorMessage
def irange ( value ):

1
default.nix Normal file
View File

@ -0,0 +1 @@
(import ./compat.nix { src = ./.; }).defaultNix

View File

@ -6,7 +6,7 @@
# SMURF_LIBRARIES - The path to where the Coriolis library files are.
SET(SMURF_INCLUDE_PATH_DESCRIPTION "directory containing the Smurf include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
SET(SMURF_INCLUDE_PATH_DESCRIPTION "directory containing the Smurf include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
SET(SMURF_DIR_MESSAGE "Set the SMURF_INCLUDE_DIR cmake cache entry to the ${SMURF_INCLUDE_PATH_DESCRIPTION}")
@ -18,7 +18,7 @@ IF(UNIX)
FIND_PATH(SMURF_INCLUDE_PATH NAMES smurf/SmurfEngine.h PATHS
# Look in other places.
${CORIOLIS_DIR_SEARCH}
PATH_SUFFIXES include/coriolis
PATH_SUFFIXES include/coriolis2
# Help the user find it if we cannot.
DOC "The ${SMURF_INCLUDE_PATH_DESCRIPTION}"
)

View File

@ -6,7 +6,7 @@
# EQUINOX_LIBRARIES - The path to where the Coriolis library files are.
SET(EQUINOX_INCLUDE_PATH_DESCRIPTION "directory containing the Equinox include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
SET(EQUINOX_INCLUDE_PATH_DESCRIPTION "directory containing the Equinox include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
SET(EQUINOX_DIR_MESSAGE "Set the EQUINOX_INCLUDE_DIR cmake cache entry to the ${EQUINOX_INCLUDE_PATH_DESCRIPTION}")
@ -18,7 +18,7 @@ IF(UNIX)
FIND_PATH(EQUINOX_INCLUDE_PATH NAMES equinox/Equi.h PATHS
# Look in other places.
${CORIOLIS_DIR_SEARCH}
PATH_SUFFIXES include/coriolis
PATH_SUFFIXES include/coriolis2
# Help the user find it if we cannot.
DOC "The ${EQUINOX_INCLUDE_PATH_DESCRIPTION}"
)
@ -39,8 +39,8 @@ IF(UNIX)
DOC "The ${EQUINOX_INCLUDE_PATH_DESCRIPTION}"
)
SET_LIBRARIES_PATH(EQUINOX EQUINOX)
SET_LIBRARIES_PATH(EQUINOX INTERVALTREE)
SET_LIBRARIES_PATH(EQUINOX EQUINOX)
HURRICANE_CHECK_LIBRARIES(EQUINOX)
ENDIF(UNIX)

View File

@ -5,8 +5,9 @@
# ETESIAN_INCLUDE_DIR - the path to where the Coriolis include files are.
# ETESIAN_LIBRARIES - The path to where the Coriolis library files are.
find_package(COLOQUINTE REQUIRED)
SET(ETESIAN_INCLUDE_PATH_DESCRIPTION "directory containing the Etesian include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
SET(ETESIAN_INCLUDE_PATH_DESCRIPTION "directory containing the Etesian include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
SET(ETESIAN_DIR_MESSAGE "Set the ETESIAN_INCLUDE_DIR cmake cache entry to the ${ETESIAN_INCLUDE_PATH_DESCRIPTION}")
@ -24,6 +25,8 @@ IF(UNIX)
# Help the user find it if we cannot.
DOC "The ${ETESIAN_INCLUDE_PATH_DESCRIPTION}"
)
SET(ETESIAN_INCLUDE_PATH "${ETESIAN_INCLUDE_PATH};${COLOQUINTE_INCLUDE_DIR}")
MESSAGE("djaa${ETESIAN_INCLUDE_PATH};${COLOQUINTE_INCLUDE_DIR}djau")
FIND_LIBRARY(ETESIAN_LIBRARY_PATH
NAMES etesian

77
flake.lock Normal file
View File

@ -0,0 +1,77 @@
{
"nodes": {
"alliance-check-toolkit": {
"flake": false,
"locked": {
"lastModified": 1635073274,
"narHash": "sha256-pK0dV1ZY52TB/ZMBxXd2ekkspxSYt4h258js/I0NBWA=",
"ref": "master",
"rev": "0e5744fd98acadee44bc5cfc4949146f1d30506f",
"revCount": 291,
"type": "git",
"url": "https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git"
},
"original": {
"type": "git",
"url": "https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1635279144,
"narHash": "sha256-YnTZ/BgZukF8wt2dFhl446H6NfOYTDfz7w3BzcW1V3k=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6fd9e0cec6118df8557407c66d8a880a2c6d0675",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"pinmux": {
"flake": false,
"locked": {
"lastModified": 1623433602,
"narHash": "sha256-+YHxekMG3rC4FYRmreVjJ7AFPbB5vVPG+99votPEzl4=",
"ref": "master",
"rev": "d96f737c0a53dde983060522816bbef016b449ce",
"revCount": 837,
"type": "git",
"url": "https://git.libre-soc.org/git/pinmux.git"
},
"original": {
"type": "git",
"url": "https://git.libre-soc.org/git/pinmux.git"
}
},
"root": {
"inputs": {
"alliance-check-toolkit": "alliance-check-toolkit",
"nixpkgs": "nixpkgs",
"pinmux": "pinmux",
"soclayout": "soclayout"
}
},
"soclayout": {
"flake": false,
"locked": {
"lastModified": 1634647854,
"narHash": "sha256-hNLjvVDlGzTvpSGfNkZtqXUtlfObqI5ORyWLJ7qfxHU=",
"ref": "master",
"rev": "6316f6a48c6a6167603f01733b5df8300dae435c",
"revCount": 512,
"type": "git",
"url": "https://git.libre-soc.org/git/soclayout.git"
},
"original": {
"type": "git",
"url": "https://git.libre-soc.org/git/soclayout.git"
}
}
},
"root": "root",
"version": 7
}

129
flake.nix Normal file
View File

@ -0,0 +1,129 @@
# The license for this file is included in the `nix` directory next to this file.
{
description = "Coriolis is a free database, placement tool and routing tool for VLSI design.";
# Nixpkgs / NixOS version to use.
inputs.nixpkgs.url = "github:NixOS/nixpkgs"; # for alliance
inputs.alliance-check-toolkit.url = "git+https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git";
inputs.alliance-check-toolkit.flake = false;
inputs.soclayout.url = "git+https://git.libre-soc.org/git/soclayout.git";
inputs.soclayout.flake = false;
inputs.pinmux.url = "git+https://git.libre-soc.org/git/pinmux.git";
inputs.pinmux.flake = false;
outputs = { self, nixpkgs, alliance-check-toolkit, soclayout, pinmux }:
let
# Generate a user-friendly version numer.
version = builtins.substring 0 8 self.lastModifiedDate;
# System types to support.
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
meta = with nixpkgs.lib; {
description = "Coriolis is a free database, placement tool and routing tool for VLSI design.";
homepage = "http://coriolis.lip6.fr/";
platforms = platforms.all;
};
pythonOverlay = self: super: {
python3Packages = super.python3Packages.override {
overrides = pself: psuper: {
pyqt4 = psuper.pyqt4.overridePythonAttrs (o: rec {
version = "4.12.1";
src = super.fetchurl {
url = "mirror://sourceforge/pyqt/PyQt4_gpl_x11-${version}.tar.gz";
sha256 = "RdckRhrliwGbm+lQdsoH4hLrcwhK7JEluyVIJcOgU4M=";
};
pythonImportsCheck = (o.pythonImportsCheck or []) ++ [ "PyQt4.QtCore" "PyQt4.QtGui" ];
});
};
};
};
# Nixpkgs instantiated for supported system types.
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ pythonOverlay self.overlay ]; });
override = drv:
drv.overrideAttrs (o: {
preConfigure = ''
cmakeFlagsArray+=(-DCMAKE_MODULE_PATH="$(sed -e 's|:|/share/cmake/Modules;|g' <<< "$CMAKE_PREFIX_PATH:")")
'' + (o.preConfigure or "");
cmakeFlags = [ "-DBUILD_DOC=ON" ] ++ (o.cmakeFlags or []);
});
generic = import ./nix/generic.nix { inherit version meta; };
pythonComponents = [
"hurricane" "crlcore" "flute" "etesian"
"anabatic" "katana" "bora" "katabatic" "kite"
"tutorial" "unicorn" "oroshi" "cumulus"
];
components = pythonComponents ++ [
"lefdef" "bootstrap" "coloquinte"
"equinox" "knik" "ispd" "karakaze" "nimbus"
"metis" "mauka" "solstice" "stratus1"
"documentation" "combined"
];
commonArgs = { inherit version meta generic; };
in
rec {
overlay = final: prev:
builtins.foldl'
(acc: elem: acc // {
"coriolis-${elem}" = override (final.callPackage (
let f = import (./nix + "/${elem}.nix"); in
f (builtins.intersectAttrs (builtins.functionArgs f) commonArgs)
) {});
}) {} components;
packages = forAllSystems (system:
let pkgs = nixpkgsFor.${system}; in
builtins.foldl' (acc: elem: acc // {
${elem} = pkgs.${"coriolis-${elem}"};
}) {} components
);
checks = forAllSystems (system: {
alliance-check-toolkit = nixpkgsFor.${system}.callPackage (
import ./nix/alliance-check-toolkit.nix { inherit alliance-check-toolkit; }
) {};
libresoc = nixpkgsFor.${system}.callPackage (
import ./nix/libresoc.nix { inherit alliance-check-toolkit soclayout pinmux; }
) {};
unittests = override (nixpkgsFor.${system}.callPackage (
import ./nix/unittests.nix { inherit version meta; }
) {});
});
# CORIOLIS_TOP must be set before execution
# example: `env CORIOLIS_TOP="$(mktemp -d)" ./result/bin/cgt`
defaultPackage = forAllSystems (system: self.packages.${system}.unicorn);
devShell = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
env = pkgs.python3.buildEnv.override {
extraLibs = builtins.map (x: pkgs.${"coriolis-${x}"}) pythonComponents;
};
in pkgs.mkShell {
buildInputs = [ env ];
}
);
hydraJobs.combined = forAllSystems (system: self.packages.${system}.combined);
hydraJobs.alliance-check-toolkit = forAllSystems (system: self.checks.${system}.alliance-check-toolkit);
hydraJobs.unittests = forAllSystems (system: self.checks.${system}.unittests);
hydraJobs.libresoc = forAllSystems (system: self.checks.${system}.libresoc);
};
}

View File

@ -6,7 +6,7 @@
# FLUTE_LIBRARIES - The path to where the Coriolis library files are.
set( FLUTE_INCLUDE_PATH_DESCRIPTION "The directory containing the FLUTE include files. E.g /usr/local/include/coriolis/flute/3.1 or /soc/coriolis2/include/coriolis/flute/3.1" )
set( FLUTE_INCLUDE_PATH_DESCRIPTION "The directory containing the FLUTE include files. E.g /usr/local/include/coriolis2/flute/3.1 or /soc/coriolis2/include/coriolis2/flute/3.1" )
set( FLUTE_DIR_MESSAGE "Set the FLUTE_INCLUDE_DIR cmake cache entry to the ${FLUTE_INCLUDE_PATH_DESCRIPTION}" )
if( UNIX )

View File

@ -1,7 +1,7 @@
# -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt<flute/src/3.1>" -*-
include_directories( ${FLUTE_SOURCE_DIR}/src/3.1
${CORIOLIS_LIBRARIES}
${CRLCORE_INCLUDE_PATH}
${HURRICANE_INCLUDE_DIR}
${CONFIGURATION_INCLUDE_DIR}
${Python_INCLUDE_DIRS}

View File

@ -24,7 +24,7 @@
find_package(CORIOLIS REQUIRED)
find_package(KNIK REQUIRED)
find_package(LEFDEF REQUIRED)
#find_package(KATABATIC REQUIRED)
find_package(KATABATIC REQUIRED)
#find_package(KITE REQUIRED)
#find_package(EQUINOX REQUIRED)
#find_package(SOLSTICE REQUIRED)

View File

@ -1,6 +1,8 @@
include ( ${QT_USE_FILE} )
include_directories ( ${Boost_INCLUDE_DIRS}
${KNIK_INCLUDE_DIR}
${KATABATIC_INCLUDE_DIR}
${HURRICANE_INCLUDE_DIR}
${CORIOLIS_INCLUDE_DIR}
)

View File

@ -15,11 +15,13 @@
check_distribution()
setup_sysconfdir("${CMAKE_INSTALL_PREFIX}")
setup_qt()
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development)
find_package(PythonSitePackages REQUIRED)
find_package(HURRICANE REQUIRED)
find_package(CORIOLIS REQUIRED)
find_package(KATANA REQUIRED)
find_package(ANABATIC REQUIRED)
#find_package(BORA REQUIRED) # FIXME
#add_subdirectory(src)
add_subdirectory(python)

View File

@ -6,7 +6,7 @@
# KATABATIC_LIBRARIES - The path to where the Coriolis library files are.
SET(KATABATIC_INCLUDE_PATH_DESCRIPTION "directory containing the Katabatic include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
SET(KATABATIC_INCLUDE_PATH_DESCRIPTION "directory containing the Katabatic include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
SET(KATABATIC_DIR_MESSAGE "Set the KATABATIC_INCLUDE_DIR cmake cache entry to the ${KATABATIC_INCLUDE_PATH_DESCRIPTION}")
@ -18,7 +18,7 @@ IF(UNIX)
FIND_PATH(KATABATIC_INCLUDE_PATH NAMES katabatic/KatabaticEngine.h PATHS
# Look in other places.
${CORIOLIS_DIR_SEARCH}
PATH_SUFFIXES include/coriolis
PATH_SUFFIXES include/coriolis2
# Help the user find it if we cannot.
DOC "The ${KATABATIC_INCLUDE_PATH_DESCRIPTION}"
)

View File

@ -8,6 +8,7 @@ endif ( CHECK_DETERMINISM )
include_directories( ${KATABATIC_SOURCE_DIR}/src
${CORIOLIS_INCLUDE_DIR}
${HURRICANE_INCLUDE_DIR}
${KNIK_INCLUDE_DIR}
${CONFIGURATION_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${QtX_INCLUDE_DIR}

View File

@ -6,7 +6,7 @@
# KATANA_LIBRARIES - The path to where the Coriolis library files are.
SET(KATANA_INCLUDE_PATH_DESCRIPTION "directory containing the Katana include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
SET(KATANA_INCLUDE_PATH_DESCRIPTION "directory containing the Katana include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
SET(KATANA_DIR_MESSAGE "Set the KATANA_INCLUDE_DIR cmake cache entry to the ${KATANA_INCLUDE_PATH_DESCRIPTION}")
@ -18,7 +18,7 @@ IF(UNIX)
FIND_PATH(KATANA_INCLUDE_PATH NAMES katana/KatanaEngine.h PATHS
# Look in other places.
${CORIOLIS_DIR_SEARCH}
PATH_SUFFIXES include/coriolis
PATH_SUFFIXES include/coriolis2
# Help the user find it if we cannot.
DOC "The ${KATANA_INCLUDE_PATH_DESCRIPTION}"
)

View File

@ -2,6 +2,8 @@
# include( ${QT_USE_FILE} )
include_directories( ${KATANA_SOURCE_DIR}/src
${ANABATIC_INCLUDE_DIR}
${ETESIAN_INCLUDE_DIR}
${CORIOLIS_INCLUDE_DIR}
${HURRICANE_INCLUDE_DIR}
${CONFIGURATION_INCLUDE_DIR}

View File

@ -6,7 +6,7 @@
# KITE_LIBRARIES - The path to where the Coriolis library files are.
SET(KITE_INCLUDE_PATH_DESCRIPTION "directory containing the Kite include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
SET(KITE_INCLUDE_PATH_DESCRIPTION "directory containing the Kite include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
SET(KITE_DIR_MESSAGE "Set the KITE_INCLUDE_DIR cmake cache entry to the ${KITE_INCLUDE_PATH_DESCRIPTION}")
@ -18,7 +18,7 @@ IF(UNIX)
FIND_PATH(KITE_INCLUDE_PATH NAMES kite/KiteEngine.h PATHS
# Look in other places.
${CORIOLIS_DIR_SEARCH}
PATH_SUFFIXES include/coriolis
PATH_SUFFIXES include/coriolis2
# Help the user find it if we cannot.
DOC "The ${KITE_INCLUDE_PATH_DESCRIPTION}"
)

View File

@ -3,6 +3,8 @@
# include( ${QT_USE_FILE} )
include_directories( ${KITE_SOURCE_DIR}/src
${CORIOLIS_INCLUDE_DIR}
${KNIK_INCLUDE_DIR}
${KATABATIC_INCLUDE_DIR}
${HURRICANE_INCLUDE_DIR}
${CONFIGURATION_INCLUDE_DIR}
${FLUTE_INCLUDE_DIR}

View File

@ -6,7 +6,7 @@
# KNIK_LIBRARIES - The path to where the Coriolis library files are.
SET(KNIK_INCLUDE_PATH_DESCRIPTION "directory containing the Knik/flute include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
SET(KNIK_INCLUDE_PATH_DESCRIPTION "directory containing the Knik/flute include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
SET(KNIK_DIR_MESSAGE "Set the KNIK_INCLUDE_DIR cmake cache entry to the ${KNIK_INCLUDE_PATH_DESCRIPTION}")
@ -18,7 +18,7 @@ IF(UNIX)
FIND_PATH(KNIK_INCLUDE_PATH NAMES knik/KnikEngine.h PATHS
# Look in other places.
${CORIOLIS_DIR_SEARCH}
PATH_SUFFIXES include/coriolis
PATH_SUFFIXES include/coriolis2
# Help the user find it if we cannot.
DOC "The ${KNIK_INCLUDE_PATH_DESCRIPTION}"
)

View File

@ -81,8 +81,7 @@
add_custom_command ( OUTPUT def.tab.cpp
DEPENDS ${DefParserGrammar}
COMMAND ${BISON_EXECUTABLE} -v -p defyy -d ${DefParserGrammar} -o def.tab.cpp
COMMAND cp def.tab.hpp ${LEFDEF_SOURCE_DIR}/def.tab.hpp
COMMAND cp def.tab.hpp ${LEFDEF_SOURCE_DIR}/def.tab.h
COMMAND cp def.tab.hpp ${LEFDEF_SOURCE_DIR}/src/def/def/def.tab.h
#COMMAND mv def.tab.cpp ${LEFDEF_SOURCE_DIR}/src/def/def/def.tab.cpp
COMMENT "Generating DEF parser (bison)"
)

View File

@ -61,7 +61,6 @@
add_custom_command ( OUTPUT lef.tab.cpp
DEPENDS ${LefParserGrammar}
COMMAND ${BISON_EXECUTABLE} -v -p lefyy -d ${LefParserGrammar} -o lef.tab.cpp
COMMAND cp lef.tab.hpp ${LEFDEF_SOURCE_DIR}/src/lef/lef/lef.tab.hpp
COMMAND cp lef.tab.hpp ${LEFDEF_SOURCE_DIR}/src/lef/lef/lef.tab.h
COMMENT "Generating LEF parser (bison)"
)

View File

@ -6,7 +6,7 @@
# MAUKA_LIBRARIES - The path to where the Coriolis library files are.
SET(MAUKA_INCLUDE_PATH_DESCRIPTION "directory containing the Mauka/flute include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
SET(MAUKA_INCLUDE_PATH_DESCRIPTION "directory containing the Mauka/flute include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
SET(MAUKA_DIR_MESSAGE "Set the MAUKA_INCLUDE_DIR cmake cache entry to the ${MAUKA_INCLUDE_PATH_DESCRIPTION}")

View File

@ -6,7 +6,7 @@
# METIS_LIBRARIES - The path to where the Coriolis library files are.
SET(METIS_INCLUDE_PATH_DESCRIPTION "directory containing the Metis/hmetis include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
SET(METIS_INCLUDE_PATH_DESCRIPTION "directory containing the Metis/hmetis include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
SET(METIS_DIR_MESSAGE "Set the METIS_INCLUDE_DIR cmake cache entry to the ${METIS_INCLUDE_PATH_DESCRIPTION}")

View File

@ -6,7 +6,7 @@
# NIMBUS_LIBRARIES - The path to where the Coriolis library files are.
SET(NIMBUS_INCLUDE_PATH_DESCRIPTION "directory containing the Nimbus include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
SET(NIMBUS_INCLUDE_PATH_DESCRIPTION "directory containing the Nimbus include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
SET(NIMBUS_DIR_MESSAGE "Set the NIMBUS_INCLUDE_DIR cmake cache entry to the ${NIMBUS_INCLUDE_PATH_DESCRIPTION}")

19
nix/LICENSE Normal file
View File

@ -0,0 +1,19 @@
Copyright (c) 2021 Las Safin
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,28 @@
{ alliance-check-toolkit }:
{ stdenv, coriolis-combined, coriolis-unicorn, coriolis-cumulus
, python3Packages, alliance, yosys }:
stdenv.mkDerivation {
pname = "alliance-check-toolkit";
version = builtins.substring 0 8 alliance-check-toolkit.lastModifiedDate;
src = alliance-check-toolkit;
nativeBuildInputs = [ alliance coriolis-unicorn coriolis-cumulus yosys ];
YOSYS_TOP = "${yosys}";
ALLIANCE_TOP = "${alliance}";
CORIOLIS_TOP = "${coriolis-combined}";
# The user configuration for verhaegs is empty,
# which is why we use it.
USER = "verhaegs";
postPatch = "patchShebangs .";
configurePhase = "export CHECK_TOOLKIT=\"$PWD\"";
buildPhase = ''
cd benchs
../bin/go.sh
'';
installPhase = "touch $out";
fixupPhase = "true";
}

18
nix/anabatic.nix Normal file
View File

@ -0,0 +1,18 @@
{ generic, ... }:
let pkg =
{ doxygen, qt4, lib, coriolis-coloquinte
, coriolis-hurricane, coriolis-crlcore
, coriolis-flute, coriolis-etesian }:
{
name = "anabatic";
src = ../anabatic;
buildInputs = [
qt4 coriolis-coloquinte
coriolis-hurricane coriolis-crlcore
coriolis-flute coriolis-etesian
];
nativeBuildInputs = [ doxygen ];
pythonImportsCheck = [ "Anabatic" ];
meta.license = lib.licenses.gpl2Plus;
};
in generic pkg

16
nix/bootstrap.nix Normal file
View File

@ -0,0 +1,16 @@
{ version, meta }:
{ lib, stdenv, python3, cmake, ninja }:
stdenv.mkDerivation {
pname = "coriolis-bootstrap";
src = ../bootstrap;
buildInputs = [ python3 ];
nativeBuildInputs = [ cmake ninja ];
inherit version;
meta = meta // { license = lib.licenses.gpl2Plus; };
}

20
nix/bora.nix Normal file
View File

@ -0,0 +1,20 @@
{ generic, ... }:
let pkg =
{ lib, coriolis-hurricane
, coriolis-crlcore, qt4, coriolis-katana
, coriolis-flute, coriolis-anabatic
, coriolis-lefdef, qwt6_qt4, doxygen }:
{
name = "bora";
src = ../bora;
buildInputs = [
coriolis-hurricane coriolis-crlcore
coriolis-katana qt4 coriolis-flute coriolis-anabatic
coriolis-lefdef qwt6_qt4
];
nativeBuildInputs = [ doxygen ];
pythonImportsCheck = "Bora";
meta.license = lib.licenses.gpl2Plus;
};
in generic pkg

20
nix/coloquinte.nix Normal file
View File

@ -0,0 +1,20 @@
{ version, meta }:
{ lib, stdenv, python3, cmake, boost, qt4, ninja, coriolis-bootstrap, doxygen }:
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
stdenv.mkDerivation {
pname = "coriolis-coloquinte";
src = ../coloquinte;
buildInputs = [ boostWithPython coriolis-bootstrap qt4 ];
nativeBuildInputs = [ cmake ninja doxygen ];
cmakeFlags = [ "-DWITH_OPENMP:STRING=TRUE" ];
inherit version;
meta = meta // { license = lib.licenses.gpl2Plus; };
}

27
nix/combined.nix Normal file
View File

@ -0,0 +1,27 @@
{ version, meta, ... }:
{ buildEnv
, coriolis-hurricane, coriolis-crlcore
, coriolis-anabatic, coriolis-katana, coriolis-bora
, coriolis-katabatic, coriolis-kite, coriolis-tutorial
, coriolis-unicorn, coriolis-oroshi, coriolis-cumulus
, coriolis-lefdef, coriolis-coloquinte, coriolis-flute
, coriolis-equinox, coriolis-knik, coriolis-karakaze
, coriolis-solstice, coriolis-stratus1, coriolis-etesian
}:
buildEnv {
name = "coriolis-combined-${version}";
paths = [
coriolis-hurricane coriolis-crlcore coriolis-flute
coriolis-etesian coriolis-anabatic coriolis-katana
coriolis-bora coriolis-katabatic coriolis-kite
coriolis-tutorial coriolis-unicorn coriolis-oroshi
coriolis-cumulus coriolis-lefdef
coriolis-coloquinte coriolis-equinox coriolis-knik
coriolis-karakaze coriolis-solstice coriolis-stratus1
];
inherit meta;
}

24
nix/crlcore.nix Normal file
View File

@ -0,0 +1,24 @@
{ generic, ... }:
let pkg =
{ lib, libxml2, qt4, bison, flex, doxygen
, coriolis-lefdef, coriolis-hurricane, python3Packages }:
rec {
name = "crlcore";
src = ../crlcore;
propagatedBuildInputs = [ libxml2 qt4 coriolis-lefdef coriolis-hurricane python3Packages.pyqt4 ];
nativeBuildInputs = [ bison flex doxygen python3Packages.pyqt4 ];
postInstall = ''
ln -s crlcore/helpers $out/${python3Packages.python.sitePackages}/helpers
ln -s -t $out/${python3Packages.python.sitePackages} $out/etc/coriolis2/*
# for import check
mkdir -p /build/coriolistop/etc/coriolis2
export CORIOLIS_TOP=/build/coriolistop
'';
pythonImportsCheck = [
"CRL" "Constant" "helpers.io" "helpers.technology"
"helpers.utils" "helpers.analogtechno" "helpers" "helpers.overlay"
];
meta.license = lib.licenses.gpl2Plus;
};
in generic pkg

29
nix/cumulus.nix Normal file
View File

@ -0,0 +1,29 @@
{ generic, ... }:
let pkg =
{ lib, coriolis-hurricane, coriolis-crlcore
, coriolis-etesian, coriolis-anabatic, coriolis-katana
, coriolis-unicorn, python3Packages }:
{
name = "cumulus";
src = ../cumulus;
postInstall = ''
ln -s -t $out/${python3Packages.python.sitePackages} $out/${python3Packages.python.sitePackages}/cumulus/*
# for import check
mkdir -p /build/coriolistop/etc/coriolis2
export CORIOLIS_TOP=/build/coriolistop
'';
propagatedBuildInputs = [
coriolis-hurricane coriolis-crlcore
coriolis-etesian coriolis-anabatic coriolis-katana
coriolis-unicorn
];
pythonImportsCheck = [ "plugins" ];
meta.license = lib.licenses.gpl2Plus;
};
in generic pkg

18
nix/documentation.nix Normal file
View File

@ -0,0 +1,18 @@
{ version, meta }:
{ lib, stdenv, cmake, ninja, coriolis-bootstrap, python3Packages }:
stdenv.mkDerivation {
pname = "coriolis-documentation";
src = ../documentation;
cmakeFlags = [ "-DBUILD_DOC=ON" ];
buildInputs = [];
nativeBuildInputs = [ cmake ninja coriolis-bootstrap python3Packages.pelican ];
inherit version;
meta = meta // { broken = true; license = lib.licenses.cc-by-nc-sa-40; };
}

24
nix/equinox.nix Normal file
View File

@ -0,0 +1,24 @@
{ version, meta, ... }:
{ lib, stdenv, cmake, ninja, python3, boost
, coriolis-bootstrap, coriolis-hurricane
, coriolis-crlcore, qt4 }:
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
stdenv.mkDerivation {
pname = "coriolis-equinox";
src = ../equinox;
buildInputs = [
python3 boostWithPython coriolis-bootstrap
coriolis-hurricane coriolis-crlcore
qt4
];
nativeBuildInputs = [ cmake ninja ];
inherit version;
meta = meta // { license = lib.licenses.gpl2Plus; };
}

19
nix/etesian.nix Normal file
View File

@ -0,0 +1,19 @@
{ generic, ... }:
let pkg =
{ doxygen, qt4, coriolis-coloquinte, coriolis-hurricane
, lib, coriolis-crlcore }:
{
name = "etesian";
src = ../etesian;
buildInputs = [
qt4 coriolis-coloquinte
coriolis-hurricane coriolis-crlcore
];
propagatedBuildInputs = [
coriolis-coloquinte
];
nativeBuildInputs = [ doxygen ];
pythonImportsCheck = [ "Etesian" ];
meta.license = lib.licenses.gpl2Plus;
};
in generic pkg

12
nix/flute.nix Normal file
View File

@ -0,0 +1,12 @@
{ generic, ... }:
let pkg =
{ lib, coriolis-hurricane, coriolis-crlcore }:
{
name = "flute";
src = ../flute;
buildInputs = [ coriolis-hurricane coriolis-crlcore ];
nativeBuildInputs = [ ];
pythonImportsCheck = [ "Flute" ];
meta.license = lib.licenses.gpl2Plus;
};
in generic pkg

47
nix/generic.nix Normal file
View File

@ -0,0 +1,47 @@
{ version, meta }:
let
meta' = meta;
f =
{ lib, stdenv, cmake, ninja, boost
, coriolis-bootstrap, python3Packages }:
let self =
{ name
, buildInputs ? []
, nativeBuildInputs ? []
, meta ? {}
, pythonImportsCheck
, continuation ? (x: x)
, postInstall ? ""
, ...
}@args':
let
args = builtins.removeAttrs args' (builtins.attrNames (builtins.functionArgs self));
boostWithPython = boost.override { enablePython = true; inherit (python3Packages) python; };
drv = stdenv.mkDerivation ({
pname = "coriolis-${name}";
buildInputs = [ python3Packages.python boostWithPython ] ++ buildInputs;
nativeBuildInputs = [
coriolis-bootstrap cmake ninja
python3Packages.pythonImportsCheckHook
] ++ nativeBuildInputs;
postInstall = postInstall + ''
export PYTHONPATH="$out/${python3Packages.python.sitePackages}:$PYTHONPATH"
'';
meta = meta' // meta;
# FIXME: inherit pythonImportsCheck;
inherit version;
} // args);
in continuation (python3Packages.toPythonModule drv);
in self;
in
pkg:
{
__functionArgs = builtins.functionArgs f // builtins.functionArgs pkg;
__functor = self: args: f (builtins.intersectAttrs (builtins.functionArgs f) args) (pkg (builtins.intersectAttrs (builtins.functionArgs pkg) args));
}

13
nix/hurricane.nix Normal file
View File

@ -0,0 +1,13 @@
{ version, meta, generic, ... }:
let pkg =
{ lib, libxml2, bzip2, rapidjson, qt4, bison, flex, doxygen }:
{
name = "hurricane";
src = ../hurricane;
buildInputs = [ libxml2 qt4 bzip2 rapidjson ];
nativeBuildInputs = [ bison flex doxygen ];
pythonImportsCheck = [ "Viewer" "Hurricane" "Cfg" "Analog" ];
meta.license = lib.licenses.lgpl3Plus;
};
in generic pkg

26
nix/ispd.nix Normal file
View File

@ -0,0 +1,26 @@
{ version, meta }:
{ lib, stdenv, cmake, ninja, python3, boost
, coriolis-bootstrap, coriolis-hurricane
, coriolis-crlcore, coriolis-flute, coriolis-knik
, coriolis-lefdef, coriolis-katabatic, libxml2, qt4 }:
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
stdenv.mkDerivation {
pname = "coriolis-ispd";
src = ../ispd;
buildInputs = [
python3 boostWithPython coriolis-bootstrap libxml2
coriolis-hurricane coriolis-crlcore
coriolis-flute coriolis-knik coriolis-lefdef
coriolis-katabatic qt4
];
nativeBuildInputs = [ cmake ninja ];
inherit version;
meta = meta // { broken = true; license = lib.licenses.gpl2Plus; };
}

23
nix/karakaze.nix Normal file
View File

@ -0,0 +1,23 @@
{ generic, ... }:
let pkg =
{ lib, coriolis-crlcore, coriolis-bora, coriolis-katana, coriolis-anabatic
, coriolis-hurricane }:
{
name = "coriolis-karakaze";
src = ../karakaze;
propagatedBuildInputs = [
coriolis-crlcore coriolis-hurricane coriolis-katana
coriolis-bora coriolis-anabatic
];
postInstall = ''
# for import check
mkdir -p /build/coriolistop/etc/coriolis2
export CORIOLIS_TOP=/build/coriolistop
'';
pythonImportsCheck = [ "karakaze" "karakaze.analogdesign" ];
meta.license = lib.licenses.gpl2Plus;
};
in generic pkg

19
nix/katabatic.nix Normal file
View File

@ -0,0 +1,19 @@
{ generic, ... }:
let pkg =
{ lib, coriolis-hurricane
, coriolis-crlcore, coriolis-flute, coriolis-knik
, qt4, doxygen }:
{
name = "katabatic";
src = ../katabatic;
buildInputs = [
coriolis-hurricane coriolis-crlcore
coriolis-flute coriolis-knik qt4
];
nativeBuildInputs = [ doxygen ];
pythonImportsCheck = [ "Katabatic" ];
meta.license = lib.licenses.gpl2Plus;
};
in generic pkg

20
nix/katana.nix Normal file
View File

@ -0,0 +1,20 @@
{ generic, ... }:
let pkg =
{ doxygen, qt4, lib, coriolis-coloquinte
, coriolis-hurricane, coriolis-crlcore, libxml2
, coriolis-flute, coriolis-etesian, coriolis-lefdef
, coriolis-anabatic }:
{
name = "katana";
src = ../katana;
buildInputs = [
qt4 coriolis-coloquinte
coriolis-hurricane coriolis-crlcore
coriolis-flute coriolis-etesian libxml2
coriolis-lefdef coriolis-anabatic
];
nativeBuildInputs = [ doxygen ];
pythonImportsCheck = [ "Katana" ];
meta.license = lib.licenses.gpl2Plus;
};
in generic pkg

19
nix/kite.nix Normal file
View File

@ -0,0 +1,19 @@
{ generic, ... }:
let pkg =
{ lib, coriolis-lefdef, coriolis-knik, coriolis-katabatic
, coriolis-hurricane
, coriolis-crlcore, qt4, coriolis-flute, libxml2, doxygen }:
{
name = "kite";
src = ../kite;
buildInputs = [
coriolis-hurricane coriolis-crlcore
coriolis-katabatic qt4 coriolis-flute coriolis-knik libxml2
coriolis-lefdef
];
nativeBuildInputs = [ doxygen ];
pythonImportsCheck = [ "Kite" ];
meta.license = lib.licenses.gpl2Plus;
};
in generic pkg

24
nix/knik.nix Normal file
View File

@ -0,0 +1,24 @@
{ version, meta }:
{ lib, stdenv, cmake, ninja, python3, boost
, coriolis-bootstrap, coriolis-hurricane
, coriolis-crlcore, coriolis-flute, qt4 }:
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
stdenv.mkDerivation {
pname = "coriolis-knik";
src = ../knik;
buildInputs = [
python3 boostWithPython coriolis-bootstrap
coriolis-hurricane coriolis-crlcore
coriolis-flute qt4
];
nativeBuildInputs = [ cmake ninja ];
inherit version;
meta = meta // { license = lib.licenses.gpl2Plus; };
}

21
nix/lefdef.nix Normal file
View File

@ -0,0 +1,21 @@
{ version, meta }:
{ lib, stdenv, python3, cmake, boost, bison, flex
, libxml2, zlib, ninja, coriolis-bootstrap }:
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
stdenv.mkDerivation {
pname = "coriolis-lefdef";
src = ../lefdef;
hardeningDisable = [ "format" ];
buildInputs = [ python3 boostWithPython coriolis-bootstrap bison flex zlib ];
nativeBuildInputs = [ cmake ninja ];
inherit version;
meta = meta // { license = lib.licenses.apsl20; };
}

85
nix/libresoc.nix Normal file
View File

@ -0,0 +1,85 @@
{ alliance-check-toolkit, soclayout, pinmux, ... }:
{ stdenv, coriolis-combined, coriolis-unicorn, coriolis-cumulus, fetchurl
, python3Packages, alliance, yosys, writeShellScriptBin, fetchFromGitHub }:
let
C4MLogo = fetchurl {
url = "https://ftp.libre-soc.org/C4MLogo.gds";
sha256 = "0s1a2l4rh6vc1xg94jq87lsdkiqv68b0zi2rnv6wwcl9i2smacbf";
};
lip6 = fetchurl {
url = "https://ftp.libre-soc.org/lip6.gds";
sha256 = "0jj4z2d0is1vr3fziaqva39s7d85j0xqmmib0mdqnf2bg9iv91s4";
};
sorbonne_logo = fetchurl {
url = "https://ftp.libre-soc.org/sorbonne_logo.gds";
sha256 = "1p3plmb90kqljwsba2fahqzsy18iapmw2zvgkjh745c87lynn3dq";
};
libresoc_logo = fetchurl {
url = "https://ftp.libre-soc.org/libresoc_logo.gds";
sha256 = "1wbc5qrjlyrykaixdgp5d7brv5imlx71909y49xss907mil76bwh";
};
fakegit = writeShellScriptBin "git" "exit 0";
fakewget = writeShellScriptBin "wget" "exit 0";
yosys' = yosys.overrideAttrs (_: {
version = "0.9+4008";
src = fetchFromGitHub {
owner = "YosysHQ";
repo = "yosys";
rev = "049e3abf9baf795e69b9ecb9c4f19de6131f8418";
sha256 = "0h3w91jr5yws4wxk3n45h1pdq65jhj957d5pzy2799gzwkba5adh";
};
});
in
let yosys = yosys'; in
stdenv.mkDerivation rec {
name = "libresoc-check";
src = soclayout;
YOSYS_TOP = "${yosys}";
ALLIANCE_TOP = "${alliance}";
CORIOLIS_TOP = "${coriolis-combined}";
# The user configuration for verhaegs is empty,
# which is why we use it.
USER = "verhaegs";
nativeBuildInputs = [ fakewget fakegit alliance coriolis-unicorn coriolis-cumulus yosys ];
prePatch = ''
rmdir pinmux
cp -r ${pinmux} -T pinmux
cp -r ${alliance-check-toolkit} -T alliance-check-toolkit
chmod a+w -R alliance-check-toolkit pinmux
export ALLIANCE_TOOLKIT="$PWD/alliance-check-toolkit"
export CHECK_TOOLKIT="$ALLIANCE_TOOLKIT"
'';
postPatch = "patchShebangs .";
buildPhase = ''
runHook preBuild
cd experiments9
ln -s ${C4MLogo} C4MLogo.gds
ln -s ${lip6} lip6.gds
ln -s ${sorbonne_logo} sorbonne_logo.gds
ln -s ${libresoc_logo} libresoc_logo.gds
./mksym.sh
./build_full_4ksram.sh
runHook postBuild
'';
installPhase = ''
runHook preInstall
mv -T "$PWD" "$out"
runHook postInstall
'';
fixupPhase = "true";
}

24
nix/mauka.nix Normal file
View File

@ -0,0 +1,24 @@
{ version, meta }:
{ lib, stdenv, cmake, ninja, python3, qt4, coriolis-crlcore
, coriolis-bootstrap, coriolis-hurricane
, coriolis-nimbus, coriolis-metis, doxygen, boost }:
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
stdenv.mkDerivation {
pname = "coriolis-mauka";
src = ../mauka;
buildInputs = [
python3 coriolis-bootstrap coriolis-nimbus
coriolis-crlcore coriolis-hurricane qt4 boostWithPython
coriolis-metis
];
nativeBuildInputs = [ cmake ninja doxygen ];
inherit version;
meta = meta // { broken = true; license = lib.licenses.gpl2Plus; };
}

23
nix/metis.nix Normal file
View File

@ -0,0 +1,23 @@
{ version, meta }:
{ lib, stdenv, cmake, ninja, python3, qt4, coriolis-crlcore
, coriolis-bootstrap, coriolis-hurricane
, coriolis-nimbus, doxygen, boost }:
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
stdenv.mkDerivation {
pname = "coriolis-metis";
src = ../metis;
buildInputs = [
python3 coriolis-bootstrap coriolis-nimbus
coriolis-crlcore coriolis-hurricane qt4 boostWithPython
];
nativeBuildInputs = [ cmake ninja doxygen ];
inherit version;
meta = meta // { broken = true; license = lib.licenses.gpl2Plus; };
}

23
nix/nimbus.nix Normal file
View File

@ -0,0 +1,23 @@
{ version, meta }:
{ lib, stdenv, cmake, ninja, python3, qt4, coriolis-crlcore
, coriolis-bootstrap, coriolis-hurricane
, doxygen, boost }:
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
stdenv.mkDerivation {
pname = "coriolis-nimbus";
src = ../nimbus;
buildInputs = [
python3 coriolis-bootstrap
coriolis-crlcore coriolis-hurricane qt4 boostWithPython
];
nativeBuildInputs = [ cmake ninja doxygen ];
inherit version;
meta = meta // { broken = true; license = lib.licenses.gpl2Plus; };
}

43
nix/oroshi.nix Normal file
View File

@ -0,0 +1,43 @@
{ generic, ... }:
let pkg =
{ qt4, coriolis-crlcore, doxygen, lib, python3Packages
, coriolis-hurricane }:
{
name = "oroshi";
src = ../oroshi;
propagatedBuildInputs = [
qt4 python3Packages.pyqt4
coriolis-crlcore coriolis-hurricane qt4
python3Packages.numpy
];
nativeBuildInputs = [ doxygen ];
postInstall = ''
# for import check
mkdir -p /build/coriolistop/etc/coriolis2
export CORIOLIS_TOP=/build/coriolistop
'';
pythonImportsCheck = [
"oroshi.wip_transistor"
"oroshi.wip_dp"
"oroshi.wip_csp"
"oroshi.stack"
"oroshi.resistorsnake"
"oroshi.resistor"
"oroshi.paramsmatrix"
"oroshi.nonunitcapacitor"
"oroshi.multicapacitor"
"oroshi.dtr"
"oroshi.capacitorvrtracks"
"oroshi.capacitorunit"
"oroshi.capacitorroutedsingle"
"oroshi.capacitorrouted"
"oroshi.capacitormatrix"
"oroshi"
];
meta.license = lib.licenses.gpl2Plus;
};
in generic pkg

24
nix/solstice.nix Normal file
View File

@ -0,0 +1,24 @@
{ version, meta }:
{ lib, stdenv, cmake, ninja, python3, qt4, coriolis-crlcore
, coriolis-bootstrap, coriolis-hurricane
, coriolis-equinox, boost }:
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
stdenv.mkDerivation {
pname = "coriolis-solstice";
src = ../solstice;
buildInputs = [
python3 coriolis-bootstrap
coriolis-crlcore coriolis-hurricane qt4 boostWithPython
coriolis-equinox
];
nativeBuildInputs = [ cmake ninja ];
inherit version;
meta = meta // { license = lib.licenses.gpl2Plus; };
}

21
nix/stratus1.nix Normal file
View File

@ -0,0 +1,21 @@
{ generic, ... }:
let pkg =
{ lib, coriolis-crlcore, coriolis-hurricane
, python3Packages, coriolis-cumulus }:
{
name = "coriolis-stratus1";
src = ../stratus1;
propagatedBuildInputs = [
coriolis-crlcore coriolis-hurricane coriolis-cumulus
];
postInstall = ''
ln -s -t $out/${python3Packages.python.sitePackages} \
$out/${python3Packages.python.sitePackages}/stratus/*
'';
pythonImportsCheck = [ "stratus" "patterns" "patread" "synopsys" "utils" "util" ];
meta.license = lib.licenses.gpl2;
};
in generic pkg

19
nix/tutorial.nix Normal file
View File

@ -0,0 +1,19 @@
{ generic, ... }:
let pkg =
{ lib, coriolis-hurricane
, coriolis-crlcore, qt4, coriolis-lefdef, libxml2
, doxygen }:
{
name = "tutorial";
src = ../tutorial;
buildInputs = [
coriolis-hurricane coriolis-crlcore
coriolis-lefdef libxml2 qt4
];
nativeBuildInputs = [ doxygen ];
pythonImportsCheck = [ "Tutorial" ];
meta.license = lib.licenses.gpl2Plus;
};
in generic pkg

30
nix/unicorn.nix Normal file
View File

@ -0,0 +1,30 @@
{ generic, ... }:
let pkg =
{ lib, coriolis-hurricane, coriolis-tutorial
, coriolis-crlcore, qt4, coriolis-katana, coriolis-bora
, coriolis-flute, coriolis-anabatic, coriolis-coloquinte
, coriolis-lefdef, coriolis-knik, coriolis-kite
, coriolis-katabatic, coriolis-etesian, coriolis-equinox
, coriolis-solstice, libxml2, doxygen, python3Packages }:
{
name = "unicorn";
src = ../unicorn;
propagatedBuildInputs = [
coriolis-hurricane coriolis-crlcore
coriolis-katana qt4 coriolis-flute coriolis-anabatic
coriolis-lefdef libxml2 coriolis-knik coriolis-kite
coriolis-katabatic coriolis-etesian coriolis-equinox
coriolis-solstice coriolis-bora coriolis-tutorial
];
nativeBuildInputs = [ doxygen python3Packages.wrapPython ];
pythonImportsCheck = [ "Unicorn" ];
postFixup = ''
wrapPythonPrograms
'';
meta.license = lib.licenses.gpl2Plus;
};
in generic pkg

34
nix/unittests.nix Normal file
View File

@ -0,0 +1,34 @@
{ version, meta }:
{ lib, stdenv, cmake, ninja, python3, boost
, coriolis-bootstrap, coriolis-hurricane
, coriolis-crlcore, coriolis-lefdef, qt4 }:
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
stdenv.mkDerivation {
pname = "coriolis-unittests";
src = ../unittests;
buildInputs = [
python3 boostWithPython coriolis-bootstrap qt4
coriolis-hurricane coriolis-crlcore
coriolis-lefdef
];
nativeBuildInputs = [ cmake ninja ];
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/unittests
$out/bin/unittests --rb-tree
$out/bin/unittests --intv-tree
runHook postInstallCheck
'';
inherit version;
meta = meta // { license = lib.licenses.gpl2Plus; };
}

14
nix/vlsisapd.nix Normal file
View File

@ -0,0 +1,14 @@
{ generic, ... }:
let pkg =
{ lib, libxml2, qt4, bison, flex, doxygen }:
{
name = "vlsisapd";
src = ../vlsisapd;
buildInputs = [ libxml2 qt4 ];
nativeBuildInputs = [ bison flex doxygen ];
pythonImportsCheck = [ "SPICE" "LIBERTY" "DTR" "Cfg" "CIF" "AGDS" ];
meta.license = lib.licenses.gpl2Plus;
meta.broken = true;
};
in generic pkg

View File

@ -3,6 +3,7 @@ from Hurricane import DbU
from Hurricane import DataBase
import oroshi.dtr
if not DataBase.getDB(): DataBase.create()
rules = None

1
shell.nix Normal file
View File

@ -0,0 +1 @@
(import ./compat.nix { src = ./.; }).shellNix

View File

@ -19,6 +19,7 @@
find_package(HURRICANE REQUIRED)
find_package(CORIOLIS REQUIRED)
find_package(EQUINOX REQUIRED)
add_subdirectory(src)
add_subdirectory(cmake_modules)

View File

@ -6,7 +6,7 @@
# SOLSTICE_LIBRARIES - The path to where the Coriolis library files are.
SET(SOLSTICE_INCLUDE_PATH_DESCRIPTION "directory containing the Solstice include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
SET(SOLSTICE_INCLUDE_PATH_DESCRIPTION "directory containing the Solstice include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
SET(SOLSTICE_DIR_MESSAGE "Set the SOLSTICE_INCLUDE_DIR cmake cache entry to the ${SOLSTICE_INCLUDE_PATH_DESCRIPTION}")
@ -15,10 +15,10 @@ IF(UNIX)
#
# Look for an installation.
#
FIND_PATH(SOLSTICE_INCLUDE_PATH NAMES solstice/Equi.h PATHS
FIND_PATH(SOLSTICE_INCLUDE_PATH NAMES solstice/Brick.h PATHS
# Look in other places.
${CORIOLIS_DIR_SEARCH}
PATH_SUFFIXES include/coriolis
PATH_SUFFIXES include/coriolis2
# Help the user find it if we cannot.
DOC "The ${SOLSTICE_INCLUDE_PATH_DESCRIPTION}"
)

View File

@ -3,6 +3,7 @@
include_directories ( ${SOLSTICE_SOURCE_DIR}/src
${HURRICANE_INCLUDE_DIR}
${EQUINOX_INCLUDE_DIR}
${CORIOLIS_INCLUDE_DIR}
${UTILITIES_INCLUDE_DIR}
${QtX_INCLUDE_DIR}

View File

@ -33,12 +33,14 @@
find_package(CORIOLIS REQUIRED)
find_package(ANABATIC REQUIRED)
find_package(KATANA REQUIRED)
#find_package(BORA REQUIRED) # FIXME: make FindBORA.cmake
find_package(ETESIAN REQUIRED)
find_package(KNIK REQUIRED)
find_package(KATABATIC REQUIRED)
find_package(KITE REQUIRED)
#find_package(EQUINOX REQUIRED)
#find_package(SOLSTICE REQUIRED)
find_package(EQUINOX REQUIRED)
find_package(SOLSTICE REQUIRED)
#find_package(TUTORIAL REQUIRED) # FIXME: make FindTUTORIAL.cmake
find_package(Doxygen)
if(WITH_OPENMP)

View File

@ -6,7 +6,7 @@
# UNICORN_LIBRARIES - The path to where the Coriolis library files are.
SET(UNICORN_INCLUDE_PATH_DESCRIPTION "directory containing the Unicorn include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
SET(UNICORN_INCLUDE_PATH_DESCRIPTION "directory containing the Unicorn include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
SET(UNICORN_DIR_MESSAGE "Set the UNICORN_INCLUDE_DIR cmake cache entry to the ${UNICORN_INCLUDE_PATH_DESCRIPTION}")

View File

@ -3,6 +3,14 @@
# include( ${QT_USE_FILE} )
include_directories( ${UNICORN_SOURCE_DIR}/src
${HURRICANE_INCLUDE_DIR}
${KNIK_INCLUDE_DIR}
${KATABATIC_INCLUDE_DIR}
${SOLSTICE_INCLUDE_DIR}
${EQUINOX_INCLUDE_DIR}
${KITE_INCLUDE_DIR}
${ETESIAN_INCLUDE_DIR}
${ANABATIC_INCLUDE_DIR}
${KATANA_INCLUDE_DIR}
${CORIOLIS_INCLUDE_DIR}
${BOOKSHELF_INCLUDE_DIR}
${CONFIGURATION_INCLUDE_DIR}

View File

@ -13,7 +13,6 @@
# | Python : "./src/cgt.py" |
# +-----------------------------------------------------------------+
try:
import sys
import os.path

View File

@ -5,10 +5,9 @@
# VLSISAPD_INCLUDE_DIR - the VLSISAPD include directory
# VLSISAPD_LIBRARIES - The libraries needed to use VLSISAPD
set(VLSISAPD_FOUND FALSE)
set(VLSISAPD_FOUND TRUE)
setup_search_dir(CORIOLIS)
if(CORIOLIS_DIR_SEARCH)
#MESSAGE("-- CORIOLIS_DIR_SEARCH: ${CORIOLIS_DIR_SEARCH}")
# Utilities
@ -58,27 +57,4 @@
FIND_LIBRARY(CONFIGURATION_LIBRARY NAMES configuration PATHS ${CORIOLIS_DIR_SEARCH} PATH_SUFFIXES lib64 lib)
SET_FOUND (CONFIGURATION)
MESSAGE("-- Configuration: ${CONFIGURATION_LIBRARY}")
IF(AGDS_FOUND OR CIF_FOUND OR OPENCHAMS_FOUND OR DTR_FOUND OR SPICE_FOUND)
SET(VLSISAPD_FOUND TRUE)
ELSE(AGDS_FOUND OR CIF_FOUND OR OPENCHAMS_FOUND OR DTR_FOUND OR SPICE_FOUND)
SET(VLSISAPD_FOUND FALSE)
ENDIF(AGDS_FOUND OR CIF_FOUND OR OPENCHAMS_FOUND OR DTR_FOUND OR SPICE_FOUND)
ELSE(CORIOLIS_DIR_SEARCH)
MESSAGE("-- Cannot find VLSISAPD_LIBRARIES since CORIOLIS_DIR_SEARCH is not defined.")
ENDIF(CORIOLIS_DIR_SEARCH)
IF (NOT VLSISAPD_FOUND)
SET(VLSISAPD_MESSAGE
"VLSISAPD libraries were not found. Make sure CORIOLIS_TOP env variable is set.")
IF (NOT VLSISAPD_FIND_QUIETLY)
MESSAGE(STATUS "${VLSISAPD_MESSAGE}")
ELSE(NOT VLSISAPD_FIND_QUIETLY)
IF(VLSISAPD_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "${VLSISAPD_MESSAGE}")
ENDIF(VLSISAPD_FIND_REQUIRED)
ENDIF(NOT VLSISAPD_FIND_QUIETLY)
ELSE (NOT VLSISAPD_FOUND)
MESSAGE(STATUS "VLSISAPD library was found in ${CORIOLIS_DIR_SEARCH}")
ENDIF (NOT VLSISAPD_FOUND)