Fix linking/compile problems in the meson configuration.
* The Hurricane python module was not compiled at all. The name of Python module wrappers is a bit inconsistent: isobar --> Hurricane crlcore --> CRL anabatic --> Anabatic katana --> Katana * Use "py_mod_deps" and not only "py_deps" so the __PYTHON_MODULE__ flag is used for py.extension_module(). * In cumulus, the "cumulus" directory is not used for the installation in site-packages/coriolis/. * In designflow/pnr.py, temporarily disable Tramontana & Tutorial, until they are ported to meson.
This commit is contained in:
parent
1c657c958d
commit
1693241302
|
@ -1,3 +1,9 @@
|
|||
|
||||
anabatic_py = files([
|
||||
'PyStyleFlags.cpp',
|
||||
'PyAnabatic.cpp'
|
||||
])
|
||||
|
||||
anabatic = shared_library(
|
||||
'anabatic',
|
||||
'Constants.cpp',
|
||||
|
@ -30,18 +36,17 @@ anabatic = shared_library(
|
|||
'AntennaProtect.cpp',
|
||||
'PreRouteds.cpp',
|
||||
'AnabaticEngine.cpp',
|
||||
anabatic_py,
|
||||
|
||||
dependencies: [Etesian],
|
||||
install: true,
|
||||
)
|
||||
|
||||
py.extension_module(
|
||||
'pyanabatic',
|
||||
'PyStyleFlags.cpp',
|
||||
'PyAnabatic.cpp',
|
||||
|
||||
'Anabatic',
|
||||
anabatic_py,
|
||||
link_with: [anabatic],
|
||||
dependencies: [Etesian],
|
||||
dependencies: [Etesian, py_mod_deps],
|
||||
install: true,
|
||||
subdir: 'coriolis'
|
||||
)
|
||||
|
|
|
@ -61,7 +61,7 @@ py.extension_module(
|
|||
bora_py,
|
||||
|
||||
link_with: [bora],
|
||||
dependencies: [Katana, qwt],
|
||||
dependencies: [Katana, qwt, py_mod_deps],
|
||||
install: true,
|
||||
subdir: 'coriolis'
|
||||
)
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <boost/program_options.hpp>
|
||||
#include <boost/process.hpp>
|
||||
namespace boptions = boost::program_options;
|
||||
namespace bprocess = boost::process;
|
||||
|
||||
#include "hurricane/utilities/Path.h"
|
||||
#include "hurricane/configuration/Configuration.h"
|
||||
|
@ -256,26 +257,25 @@ namespace CRL {
|
|||
if (coriolis_top_env) {
|
||||
coriolis_top = coriolis_top_env;
|
||||
} else {
|
||||
//We're running as a binary and PyCRL hasn't been instantiated
|
||||
// use python to find our where we should look
|
||||
using namespace boost::process;
|
||||
std::error_code ec;
|
||||
ipstream out;
|
||||
//TODO: will need fixing for windoews
|
||||
system("python3 -c 'from coriolis import CRL; import os; print(os.path.abspath(os.path.dirname(CRL.__file__)))'", std_out > out, ec);
|
||||
if (ec) {
|
||||
cerr << "Unable to find coriolis python package. Please set CORIOLIS_TOP environment variable\n";
|
||||
exit ( 1 );
|
||||
std::error_code rvalue;
|
||||
bprocess::ipstream pipeout;
|
||||
string command = "python3 -c 'from coriolis import CRL;"
|
||||
"import os;"
|
||||
"print( os.path.abspath(os.path.dirname( CRL.__file__ )))'";
|
||||
bprocess::system( command, bprocess::std_out > pipeout, rvalue );
|
||||
if (rvalue) {
|
||||
cerr << "[ERROR] Unable to find coriolis python package.\n"
|
||||
<< " Please set CORIOLIS_TOP environment variable." << endl;
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
out >> coriolis_top;
|
||||
pipeout >> coriolis_top;
|
||||
}
|
||||
|
||||
// Environment variables reading.
|
||||
boptions::options_description options ("Environment Variables");
|
||||
options.add_options()
|
||||
( "coriolis_top", boptions::value<string>()->default_value(coriolis_top)
|
||||
, "Location of Corilois module." )
|
||||
, "Location of Coriolis module." )
|
||||
( "stratus_mapping_name", boptions::value<string>()
|
||||
, "Stratus virtual cells mapping." );
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ pyCRL_files = files([
|
|||
py.extension_module(
|
||||
'Constant',
|
||||
'PyConstant.cpp',
|
||||
dependencies: [qt_deps, py_deps, boost, Hurricane],
|
||||
dependencies: [qt_deps, py_mod_deps, boost, Hurricane],
|
||||
include_directories: crlcore_includes,
|
||||
subdir: 'coriolis',
|
||||
install: true
|
||||
|
@ -39,7 +39,7 @@ pycrlcore = shared_library(
|
|||
'pycrlcore',
|
||||
pyCRL_files,
|
||||
link_with: crlcore,
|
||||
dependencies: [qt_deps, py_deps, boost, Hurricane],
|
||||
dependencies: [qt_deps, boost, Hurricane],
|
||||
include_directories: crlcore_includes,
|
||||
install: true,
|
||||
)
|
||||
|
@ -48,9 +48,8 @@ pycrlcore = shared_library(
|
|||
py.extension_module(
|
||||
'CRL',
|
||||
pyCRL_files,
|
||||
cpp_args: '-D__PYTHON_MODULE__=1',
|
||||
link_with: pycrlcore,
|
||||
dependencies: [qt_deps, py_deps, boost, Hurricane],
|
||||
dependencies: [qt_deps, py_mod_deps, boost, Hurricane],
|
||||
include_directories: crlcore_includes,
|
||||
subdir: 'coriolis',
|
||||
install: true
|
||||
|
|
|
@ -3,16 +3,16 @@ subdir('src/designflow')
|
|||
subdir('src/plugins')
|
||||
subdir('src/tools')
|
||||
|
||||
py.install_sources(cumulus, subdir: 'coriolis/cumulus')
|
||||
py.install_sources(designflow, subdir: 'coriolis/cumulus/designflow')
|
||||
py.install_sources(plugins, subdir: 'coriolis/cumulus/plugins')
|
||||
py.install_sources(block, subdir: 'coriolis/cumulus/plugins/block')
|
||||
py.install_sources(chip, subdir: 'coriolis/cumulus/plugins/chip')
|
||||
py.install_sources(core2chip, subdir: 'coriolis/cumulus/plugins/core2chip')
|
||||
py.install_sources(harness, subdir: 'coriolis/cumulus/plugins/harness')
|
||||
py.install_sources(macro, subdir: 'coriolis/cumulus/plugins/macro')
|
||||
py.install_sources(sram, subdir: 'coriolis/cumulus/plugins/sram')
|
||||
py.install_sources(tools, subdir: 'coriolis/cumulus/tools')
|
||||
py.install_sources(cumulus, subdir: 'coriolis')
|
||||
py.install_sources(designflow, subdir: 'coriolis/designflow')
|
||||
py.install_sources(plugins, subdir: 'coriolis/plugins')
|
||||
py.install_sources(block, subdir: 'coriolis/plugins/block')
|
||||
py.install_sources(chip, subdir: 'coriolis/plugins/chip')
|
||||
py.install_sources(core2chip, subdir: 'coriolis/plugins/core2chip')
|
||||
py.install_sources(harness, subdir: 'coriolis/plugins/harness')
|
||||
py.install_sources(macro, subdir: 'coriolis/plugins/macro')
|
||||
py.install_sources(sram, subdir: 'coriolis/plugins/sram')
|
||||
py.install_sources(tools, subdir: 'coriolis/tools')
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -65,7 +65,8 @@ class PnR ( FlowTask ):
|
|||
else:
|
||||
print( 'PnR.doTask() run in interactive CGT mode.' )
|
||||
PnR.textMode = False
|
||||
from .. import Etesian, Anabatic, Katana, Bora, Tramontana, Tutorial, Viewer, Unicorn
|
||||
#from .. import Etesian, Anabatic, Katana, Bora, Tramontana, Tutorial, Viewer, Unicorn
|
||||
from .. import Etesian, Anabatic, Katana, Bora, Viewer, Unicorn
|
||||
|
||||
ShellEnv().export()
|
||||
if self.script and not callable(self.script):
|
||||
|
@ -85,9 +86,9 @@ class PnR ( FlowTask ):
|
|||
unicorn.setApplicationName ( 'cgt')
|
||||
unicorn.registerTool ( Etesian.GraphicEtesianEngine.grab() )
|
||||
unicorn.registerTool ( Katana.GraphicKatanaEngine.grab() )
|
||||
unicorn.registerTool ( Tramontana.GraphicTramontanaEngine.grab() )
|
||||
#unicorn.registerTool ( Tramontana.GraphicTramontanaEngine.grab() )
|
||||
unicorn.registerTool ( Bora.GraphicBoraEngine.grab() )
|
||||
unicorn.registerTool ( Tutorial.GraphicTutorialEngine.grab() )
|
||||
#unicorn.registerTool ( Tutorial.GraphicTutorialEngine.grab() )
|
||||
#unicorn.setAnonNetSelectable(False)
|
||||
unicorn.setLayerVisible ( "grid" , False );
|
||||
unicorn.setLayerVisible ( "text.instance" , False );
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
cumulus = files([
|
||||
'__init__.py'
|
||||
])
|
||||
|
|
|
@ -78,7 +78,7 @@ class Configuration ( object ):
|
|||
self.onLepka = False
|
||||
self.onDocker = False
|
||||
hostname = socket.gethostname()
|
||||
if hostname.startswith('lepka'): self.onLepka = True
|
||||
if hostname.startswith('lepka'): self.onLepka = False
|
||||
else: self.onDocker = True
|
||||
scriptDir = os.path.abspath(os.getcwd())
|
||||
if scriptDir.endswith( 'coriolis/documentation' ) and not self.onLepka:
|
||||
|
|
|
@ -5,6 +5,12 @@ etesian_mocs = qt.compile_moc(
|
|||
dependencies: [Hurricane, CrlCore, Coloquinte],
|
||||
)
|
||||
|
||||
etesian_py = files([
|
||||
'PyEtesian.cpp',
|
||||
'PyEtesianEngine.cpp',
|
||||
'PyGraphicEtesianEngine.cpp',
|
||||
])
|
||||
|
||||
etesian = shared_library(
|
||||
'etesian',
|
||||
'Configuration.cpp',
|
||||
|
@ -18,6 +24,7 @@ etesian = shared_library(
|
|||
'BloatProperty.cpp',
|
||||
'EtesianEngine.cpp',
|
||||
'GraphicEtesianEngine.cpp',
|
||||
etesian_py,
|
||||
etesian_mocs,
|
||||
dependencies: [Hurricane, CrlCore, Coloquinte],
|
||||
install: true,
|
||||
|
@ -25,12 +32,9 @@ etesian = shared_library(
|
|||
|
||||
py.extension_module(
|
||||
'Etesian',
|
||||
'PyEtesian.cpp',
|
||||
'PyEtesianEngine.cpp',
|
||||
'PyGraphicEtesianEngine.cpp',
|
||||
|
||||
link_with: [configuration],
|
||||
dependencies: [Hurricane, CrlCore, Coloquinte],
|
||||
etesian_py,
|
||||
link_with: [configuration, etesian],
|
||||
dependencies: [py_mod_deps, Hurricane, CrlCore, Coloquinte],
|
||||
install: true,
|
||||
subdir: 'coriolis'
|
||||
)
|
||||
|
|
|
@ -20,7 +20,7 @@ flute = shared_library(
|
|||
py.extension_module(
|
||||
'Flute',
|
||||
'PyFlute.cpp',
|
||||
dependencies: [py_deps, Hurricane, CrlCore],
|
||||
dependencies: [py_mod_deps, Hurricane, CrlCore],
|
||||
include_directories: flute_includes,
|
||||
subdir: 'coriolis',
|
||||
install: true
|
||||
|
|
|
@ -90,4 +90,13 @@ isobar = library(
|
|||
install: true,
|
||||
)
|
||||
|
||||
py.extension_module(
|
||||
'Hurricane',
|
||||
isobar_sources,
|
||||
dependencies: [qt_deps, py_deps, boost],
|
||||
link_with: [isobar, hurricane],
|
||||
include_directories: hurricane_includes,
|
||||
install: true,
|
||||
subdir: 'coriolis'
|
||||
)
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ py.extension_module(
|
|||
katana_py,
|
||||
|
||||
link_with: [katana],
|
||||
dependencies: [Anabatic],
|
||||
dependencies: [py_mod_deps, Anabatic],
|
||||
install: true,
|
||||
subdir: 'coriolis'
|
||||
)
|
||||
|
|
|
@ -37,7 +37,7 @@ py.extension_module(
|
|||
unicorn_py,
|
||||
|
||||
link_with: [unicorn],
|
||||
dependencies: [Katana],
|
||||
dependencies: [py_mod_deps,Katana],
|
||||
install: true,
|
||||
subdir: 'coriolis'
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue