Commit Graph

321 Commits

Author SHA1 Message Date
Naohiko Shimizu 0660cab009 cygwin compile#51 2023-03-14 18:40:28 +09:00
Jean-Paul Chaput 9cfa104836 Build against Qt5 by default. Uses --qt4 to force uses of Qt4.
* Change: In bootstrap, FindBootstrap.cmake, ccb (builder) & socInstaller,
    suppress the "--qt5" argument as it the default now. Create a "--qt4"
    to force building against the old one.
2023-03-13 17:37:19 +01:00
Jean-Paul Chaput 03c424f1a1 Add bop detection on allianceInstaller.sh. 2023-03-10 22:20:09 +01:00
Jean-Paul Chaput b4fe1a3686 Add a fallback when the "ps" command fail in coriolisEnv.py. 2023-03-09 19:07:22 +01:00
Jean-Paul Chaput 7a644c65fb Add support for the Python benchs (doit) in socInstaller.py. 2023-03-09 15:35:44 +01:00
Jean-Paul Chaput 881e97bbd3 Fix missing libraries problems (seen on Cygwin).
* Change: In bootstrap/cmake_modules/FindBootstrap.cmake, add a
    "-Wl,--no-undefined" to the C++/ld flags to force checking of
    undefined symbol at link time.
2023-03-07 17:29:40 +01:00
Jean-Paul Chaput 461b81bb75 Reverse commit #c7608998 (LD_LIBRARY_PATH), was not the problem. 2023-03-06 14:49:30 +01:00
Jean-Paul Chaput c7608998ce Comprehensive LD_LIBRARY_PATH init in coriolisEnv.py.
* In bootstrap/coriolisEnv.py, under WSL it seems that setting up the
    LD_LIBRARY_PATH makes the linker to ignore /etc/ld.so.conf.
    To avoid that, use ldconfig to import all the known paths into
    LD_LIBRARY_PATH.
2023-03-03 15:39:38 +01:00
Jean-Paul Chaput 57b5cca27f Downgrade CMake requirements to 3.16. Detects correctly Python 3.
Fix courtesy of N. Shimizu.
2023-03-03 15:36:40 +01:00
Jean-Paul Chaput 5546c2d89f Fix nightly build path finding in crlenv.py. 2023-03-01 11:42:50 +01:00
Jean-Paul Chaput 1557d613ae Comprehensive reorganisation of the Python part of Coriolis.
* Move all Python stuff under a common Python namespace "coriolis".
* Instead of having a series subtrees for each tool, integrate
  everything in one common tree. So now, all components can be
  located either with an absolute path from "coriolis" or, inside
  cross-reference themselves through relatives imports.
* As a consequence, we only need to add ".../site-packages/coriolis/"
  to the PYTHONPATH, and not a whole bunch of subdirectories.
  And nothing, if installed in-system.
* The tree of free technologies configuration files is also moved
  below "coriolis/technos" instead of "/etc".
* Supressed "cumulus" level for the plugins.
* All python modules are rewritten using relative imports except
  for the configuration files that uses absolute import as they
  can be cloned outside of the tree to serve as templates.

* Change: In boostrap/FindPythonSitePackages, include "/coriolis" in
    Python_CORIOLISARCH and Python_CORIOLISLIB.
      Provide a Python_SITELIB *without* "/coriolis" appended.
* Change: In cumulus/plugins/__init__.loadPlugins(), must prefix modules
    read in the plugins directory by "coriolis.plugins.". No longer need
    to add their path to sys.path.
* Change: In crlcore/python/technos/nodeX/*/devices.py, the scripts of
    the layouts generators must be prefixed by "coriolis.oroshi.".
* Change: In CRL::System CTOR, no longer add the pathes of the various
    plugins to sys.path. Only "site-packages/coriolis/".
* New: In Utilities::Path::toPyModePath(), new method to convert a
    filesystem path into a python module path.
      Examples:
        "coriolis/plugins/block"    --> "coriolis.plugins.block".
        "coriolis/plugins/rsave.py" --> "coriolis.plugins.rsave".
* Change: In katanaEngine::_runKatanaEngine(), rename the hook script
    initHook.py. No longer need to modify sys.path.
* Change: In BoraEngine::_runBoraEngine(), rename the hook script
    initHook.py. No longer need to modify sys.path.
* Change: In UnicornGui::_runUnicornInit(), rename the hook script
    initHook.py. No longer need to modify sys.path.
* Change: In cumulus.plugins.chip.constants, put the constants
    outside __init__.py to avoid a loop at initialization.
2023-02-27 22:14:32 +01:00
Jean-Paul Chaput 3d9e86303e Final deprecation of Katabatic, Knick & Kite. 2023-02-21 17:04:38 +01:00
Robert Taylor 32a6aaf61f Ignore missing symbols harder when linking python 2023-02-21 16:10:55 +01:00
Robert Taylor a02c88a893 Don't link libpython, it isn't there in manylinux 2023-02-21 16:10:55 +01:00
Robert Taylor eb26bb1f87 fix to build on manylinux 2023-02-21 16:10:55 +01:00
Robert Taylor 974473aff7 fix rpaths - really didn't need quoting 2023-02-21 16:10:55 +01:00
Robert Taylor ebabf1e988 install helpers at top level 2023-02-21 16:10:55 +01:00
Robert Taylor 5a669c4641 Fix Python linking issues 2023-02-21 16:10:55 +01:00
Robert Taylor f8afd5bded Move to packaging requiring no changes to CMake 2023-02-21 16:10:54 +01:00
Jean-Paul Chaput d9ebeb4b96 Search path reordering in crlenv.py so the debug version can be found. 2023-01-07 12:53:11 +01:00
Jean-Paul Chaput da56189d2e allianceInstaller.sh also must support nightly builds. 2023-01-02 12:24:19 +01:00
Jean-Paul Chaput db54e685f7 Correct again for nightly build. 2023-01-02 12:06:03 +01:00
Jean-Paul Chaput 100342e640 Support for nightly build in booststrap/crlenv.py. 2023-01-02 11:47:45 +01:00
Jean-Paul Chaput e590400ebb Add DoIt base design flow support. In full replacement of Makefiles. 2022-12-31 15:01:37 +01:00
Jean-Paul Chaput fefa47b2dc Remove submodule error that was painful under emacs. 2022-08-05 15:36:10 +02:00
Jean-Paul Chaput 084eee3b39 Added support for RHEL9. 2021-12-31 16:35:38 +01:00
Jean-Paul Chaput 10bd5510da Fix library linking problem for gcc 9 and above (Ubuntu 20/Debian 11).
* Bug: In all CMakeLists.txt, it seems I was doing a worng use of
    target_link_library(). No longer add dependencies to the C++ base
    library but instead either to the Python associated module or
    to the final binaries. This was inderectly causing the linking
    problem related to Python (which was a misdirection).
* Bug: Typo in FindLibexecinfo.cmake, do not use FindLib[E]xecinfo.
* Change: In CRL/ccore/CMakeLists.txt, activate SKIP_AUTOMOC on
    bison/flex generated files.
* Bug: In viewer/PyHApplication, do not delete the C++ object in
    the Python destroy method.
2021-11-22 00:05:48 +01:00
Jean-Paul Chaput 66e7fd648d In ccb.py, update the organization name to "Sorbonne Université". 2021-11-21 19:36:35 +01:00
Las Safin af95f9f671 nix: Use Python 3 2021-10-26 21:10:13 +00:00
Las Safin 6e5c03434a Adapt Nix code to Python 3 switch.
This commit also reduces the diff by not removing
some (unnecessary) error handling.
2021-10-26 20:10:59 +00:00
Myrtle Shah 2d24efdb6c Bump minimum CMake version
The CMake version set was so old that obsolete policies were being
enabled and breaking FindPython. 2.8 should still be old enough not to
cause problems for any current users.

Signed-off-by: Myrtle Shah <gatecat@chipflow.io>
2021-10-15 13:38:38 +01:00
Jean-Paul Chaput b9a1395b4b Improve Coriolis root directory search in coriolisEnv.py.
* Change: In bootstrap/coriolisEnv.py, when all tries to locate the
    installation root in predefined locations, try the directory the
    script is installed in.
      This allows for a user to use an installation made in another
    user's account.
2021-10-09 22:39:06 +02:00
Jean-Paul Chaput b1befe5626 Added "--shell=<SHELL>" option to coriolisEnv.py. 2021-10-02 14:02:03 +02:00
Jean-Paul Chaput 7e9153f6f9 Update CMakeLists.txt to newer policies. 2021-10-01 18:31:53 +02:00
Jean-Paul Chaput c28fe3402b Take account of more Python site-packages.
* Change: In bootstrap/coriolisEnv.py, the script was looking to
    pythonX.Y (like "python2.7" or "python3.6") only. Now added
    "major" only directories like "python2" or "python3".
2021-10-01 00:30:10 +02:00
Jean-Paul Chaput 3bd0dbfd24 Forgot to encode bytes read from file into string. 2021-09-19 23:35:51 +02:00
Jean-Paul Chaput 02777e127e Migration towards Python3, first stage: still based on C-Macros.
* New: Python/C++ API level:
  * Write a new C++/template wrapper to get rid of boost::python
  * The int & long Python type are now merged. So a C/C++ level,
    it became "PyLong_X" (remove "PyInt_X") and at Python code
    level, it became "int" (remove "long").
* Change: VLSISAPD finally defunct.
  * Configuration is now integrated as a Hurricane component,
    makes use of the new C++/template wrapper.
  * vlsisapd is now defunct. Keep it in the source for now as
    some remaining non essential code may have to be ported in
    the future.
* Note: Python code (copy of the migration howto):
  * New print function syntax print().
  * Changed "dict.has_key(k)" for "k" in dict.
  * Changed "except Exception, e" for "except Exception as e".
  * The division "/" is now the floating point division, even if
    both operand are integers. So 3/2 now gives 1.5 and no longer 1.
    The integer division is now "//" : 1 = 3//2. So have to carefully
    review the code to update. Most of the time we want to use "//".
    We must never change to float for long that, in fact, represents
    DbU (exposed as Python int type).
  * execfile() must be replaced by exec(open("file").read()).
  * iter().__next__() becomes iter(x).__next__().
  * __getslice__() has been removed, integrated to __getitem__().
  * The formating used for str(type(o)) has changed, so In Stratus,
    have to update them ("<class 'MyClass'>" instead of "MyClass").
  * the "types" module no longer supply values for default types
    like str (types.StringType) or list (types.StringType).
    Must use "isinstance()" where they were occuring.
  * Remove the 'L' to indicate "long integer" (like "12L"), now
    all Python integer are long.
* Change in bootstrap:
  * Ported Coriolis builder (ccb) to Python3.
  * Ported Coriolis socInstaller.py to Python3.
  * Note: In PyQt4+Python3, QVariant no longer exists. Use None or
    directly convert using the python syntax: bool(x), int(x), ...
    By default, it is a string (str).
* Note: PyQt4 bindings & Python3 under SL7.
  * In order to compile user's must upgrade to my own rebuild of
    PyQt 4 & 5 bindings 4.19.21-1.el7.soc.
* Bug: In cumulus/plugins.block.htree.HTree.splitNet(), set the root
    buffer of the H-Tree to the original signal (mainly: top clock).
      Strangely, it was only done when working in full chip mode.
2021-09-19 19:41:24 +02:00
Las Safin e1975b45ea
Fix linking with boost python 2021-08-29 15:31:41 +00:00
Las Safin 5a536b93b4
Got it working? 2021-08-16 19:50:39 +00:00
Jean-Paul Chaput f1668cec5f Disable BFD support by default.
* Change: In <tool>/CMakeLists.txt, add an USE_LIBBFD option to
    enable the link against the BFD library. Latest versions seems
    to have changed their API.
* Change: In bootstrap/ccp.by & builder/Builder.py, add an option
    "--bfd" (and self._bfd) to enable BFD support.
2021-07-17 13:01:19 +02:00
Jean-Paul Chaput ebe8ea64c6 Freeze version of RapidJSON to build under SL7.
* Change: In bootstrap/socInstaller.py, freeze the version of RapidJSON
    to commmit #b1a4d91 as later ones have problems building their doc
    under SL7.
2021-06-11 11:47:35 +02:00
Jean-Paul Chaput db26e14358 Add -fsanitize=address to the DEBUG flags. 2021-06-02 14:14:11 +02:00
Jean-Paul Chaput 37f311ac7d Don't remembers what thoses do, but don't want to loose them either. 2021-04-21 17:00:48 +02:00
Jean-Paul Chaput b91fbbbda2 Added utlity script bootstrap/resetDoc.sh to revert the generated doc. 2020-11-14 18:54:23 +01:00
Jean-Paul Chaput 3495536268 Third variant for HFNS, trunks mades with Steiner tree (FLUTE).
Note: Keep the various hfnsX.py as toolboxes for future experiments.
* New: cumulus/plugins/block/hfns3.py, build the trunk of the
    net as a RMST. First with the "Iterative One Steiner Point"
    (terribly slow above 100 points) then with FLUTE.
      For the global routing trunk, must be very cautious to
    check that the cluster "graph point" is the one of the
    it's buffer RoutingPad so both end up in the same GCell.
* New: cumulus/plugins/block/timing.py, stub for basic
    timing computation and conversion between sink and
    capacitance. Currently based on the fake 350nm given as
    example in SxLib ("man sxlib"...).
2020-09-30 11:59:51 +02:00
Jean-Paul Chaput 18405599e8 Added Python for FLUTE (for fast RSMT in HFNS).
* New: In flute, added a Python binding. Contains two methods: "readLUT()",
    to load the POWV9.dat and POST9.dat and "flute()" to build a RSMT.
    "flute()" takes a tuple of positions (themselves 2-uple) like:
        ( (x0,y0), (x1,y1,), ... (xN,yM) )
    and returns a tuple of 3-uple of branches:
        ( (n0,x0,y0), (n1,x1,y1), ... )
    In "flute.h", set the distance type (DTYPE) to int64_t to always
    accomodate DbU::Unit.
      As it now uses the Hurricane Python interface and the path utilities
    from CRL Core, move it's compilation *after* them (see build.conf in
    bootstrap).
2020-09-30 11:52:22 +02:00
Jean-Paul Chaput 2b4ee3abea Update docker config for Debian-10 / LibreSOC. 2020-04-27 14:11:44 +02:00
Jean-Paul Chaput a50b6ce317 More PEP8 compliant Python code. Start rewrite Python/C++ wrappers.
* Change: In CRL/helpers, cumulus/plugins, oroshi & karakaze,
    Move towards more Python PEP8 compliance:
      * All indentations sets to 4 spaces (in progress).
      * In plugins, remove messages about software collections
        and RHEL (too many case could wrongly lead to that).
	Instead systematically uses "helpers.io.catch()".
      * Put in lowercases all modules names. Note that C++ exported
        modules *keep* their Capitalized names (to preserve the
	identity with the C++ namespace).
      * When making import, use full path.
      * Rename the run function from "ScriptMain()" to "scriptMain()".
* Cleanup: In CRL/etc, remove obsoleted configuration files,
    the one ending in ".conf". Keep those who have not been ported
    to the new style yet.
* New: In Hurricane/src/configuration, first trial at replacing the
    C preprocessor macros by C++ templates. Applied first to configuration
    from VLSISAPD.
      This is unfinished business, just a limited demonstrator for now.
      It is installed as a separate Python library "Cfg2" which do not
    interact with the rest of Coriiolis.
      The end goal is to fully remove boost and merge VLSISAPD useful
    components directly inside Hurricane.
2020-04-08 11:24:42 +02:00
Jean-Paul Chaput 654ae5b8a4 Added compile script for Yosys in docker (for Debian 10). 2020-03-20 15:07:41 +01:00
Jean-Paul Chaput 2af531991e Correct drive of the Pin in AP driver.
* Bug: In CRL::ApDriver::DumpSegments(), when saving RoutingPads build
    on Pin *not* at the top level (that is, Pin from an instance),
    use the pin's orientation to choose the segment type.
      * NORTH/SOUTH becomes a Vertical.
      * EAST/WEST becomes an Horizontal.
      Formerly, the segment direction was guessed only for the bounding
    box, leading to segments in incorrect directions leading to DRC
    errors (in nmigen/ALU16, net "b(10)").
* Bug: In CRL/symbolic/cmos/technology.py, forgotten import for
    WarningMessage.
2020-03-20 12:05:12 +01:00