Merge branch 'devel' into fixes3
This commit is contained in:
commit
1a439d1b5d
4
Makefile
4
Makefile
|
@ -55,8 +55,8 @@ check_dir:
|
|||
|
||||
|
||||
install: check_dir
|
||||
@./bootstrap/ccb.py $(DEVTOOLSET_OPTION) --project=coriolis --make="$(SMP_FLAGS) install"
|
||||
@./bootstrap/ccb.py $(DEVTOOLSET_OPTION) --project=coriolis --make="-j1 install" --doc
|
||||
@./bootstrap/ccb.py $(DEVTOOLSET_OPTION) --project=support --project=coriolis --make="$(SMP_FLAGS) install"
|
||||
@./bootstrap/ccb.py $(DEVTOOLSET_OPTION) --project=support --project=coriolis --make="-j1 install" --doc
|
||||
@echo ""; \
|
||||
echo "============================================================================"; \
|
||||
echo "Coriolis has been successfully built"; \
|
||||
|
|
|
@ -47,13 +47,17 @@ To build Coriolis, ensure the following prerequisites are met:
|
|||
* bison & flex.
|
||||
* Qt 4 or 5.
|
||||
* libxml2.
|
||||
* RapidJSON
|
||||
* A C++11 compliant compiler.
|
||||
|
||||
The build system relies on a fixed directory tree from the root
|
||||
of the user currently building it. Thus first step is to get a clone of
|
||||
the repository in the right place. Proceed as follow: ::
|
||||
|
||||
ego@home:~$ mkdir -p ~/coriolis-2.x/src
|
||||
ego@home:~$ mkdir -p ~/coriolis-2.x/src/support
|
||||
ego@home:~$ cd ~/coriolis-2.x/src/support
|
||||
ego@home:~$ git clone http://github.com/miloyip/rapidjson
|
||||
ego@home:~$ git checkout ec322005072076ef53984462fb4a1075c27c7dfd
|
||||
ego@home:~$ cd ~/coriolis-2.x/src
|
||||
ego@home:src$ git clone https://www-soc.lip6.fr/git/coriolis.git
|
||||
ego@home:src$ cd coriolis
|
||||
|
|
|
@ -6,7 +6,12 @@
|
|||
projectdir = 'coriolis-2.x'
|
||||
|
||||
projects = [
|
||||
{ 'name' : "coriolis"
|
||||
{ 'name' : "support"
|
||||
, 'tools' : [ "rapidjson"
|
||||
]
|
||||
, 'repository': 'No_repository_for_support'
|
||||
}
|
||||
, { 'name' : "coriolis"
|
||||
, 'tools' : [ "bootstrap"
|
||||
, "vlsisapd"
|
||||
, "hurricane"
|
||||
|
@ -38,6 +43,7 @@ projects = [
|
|||
, "graph"
|
||||
, "pharos"
|
||||
, "isis"
|
||||
, "horus"
|
||||
#, "schematic"
|
||||
, "solver"
|
||||
, "autoDTR"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# -*- mode:Python -*-
|
||||
#
|
||||
# This file is part of the Coriolis Software.
|
||||
# Copyright (c) UPMC/LIP6 2012-2015, All Rights Reserved
|
||||
# Copyright (c) UPMC/LIP6 2012-2016, All Rights Reserved
|
||||
#
|
||||
# +-----------------------------------------------------------------+
|
||||
# | C O R I O L I S |
|
||||
|
@ -54,7 +54,7 @@ class AboutWidget ( QWidget ):
|
|||
subTitle.setFont( QFont('Courier',10,QFont.Bold) )
|
||||
|
||||
authors = QLabel( 'Coriolis CAD System 1.0 . . . . . . . . ccb 1.0\n'
|
||||
'Copyright (c) 2008-2015 . . . . . . . . . . UPMC\n'
|
||||
'Copyright (c) 2008-2016 . . . . . . . . . . UPMC\n'
|
||||
'Authors . . . . . . . . . . . . . Damien Dupuis\n'
|
||||
' . . . . . . . . . . . . Jean-Paul Chaput\n'
|
||||
'E-Mail . . . . . . . . Jean-Paul.Chaput@lip6.fr'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# -*- mode:Python -*-
|
||||
#
|
||||
# This file is part of the Coriolis Software.
|
||||
# Copyright (c) UPMC/LIP6 2008-2015, All Rights Reserved
|
||||
# Copyright (c) UPMC/LIP6 2008-2016, All Rights Reserved
|
||||
#
|
||||
# +-----------------------------------------------------------------+
|
||||
# | C O R I O L I S |
|
||||
|
@ -150,8 +150,9 @@ class Builder:
|
|||
|
||||
|
||||
def _build ( self, tool ):
|
||||
toolSourceDir = os.path.join ( self.sourceDir, tool.getToolDir() )
|
||||
toolBuildDir = os.path.join ( self.buildDir , tool.name )
|
||||
toolSourceDir = os.path.join ( self.sourceDir, tool.getToolDir() )
|
||||
toolBuildDir = os.path.join ( self.buildDir , tool.name )
|
||||
cmakeInstallDir = os.path.join ( self.installDir, "share", "cmake", "Modules" )
|
||||
# Supplied directly in the CMakeLists.txt.
|
||||
#cmakeModules = os.path.join ( self.installDir, "share", "cmake", "Modules" )
|
||||
|
||||
|
@ -170,8 +171,10 @@ class Builder:
|
|||
if self._qt5: command += [ "-D", "WITH_QT5:STRING=TRUE" ]
|
||||
if self._openmp: command += [ "-D", "WITH_OPENMP:STRING=TRUE" ]
|
||||
|
||||
command += [ "-D", "CMAKE_BUILD_TYPE:STRING=%s" % self.buildMode
|
||||
, "-D", "BUILD_SHARED_LIBS:STRING=%s" % self.enableShared
|
||||
command += [ "-D", "CMAKE_BUILD_TYPE:STRING=%s" % self.buildMode
|
||||
, "-D", "BUILD_SHARED_LIBS:STRING=%s" % self.enableShared
|
||||
, "-D", "CMAKE_INSTALL_PREFIX:STRING=%s" % self.installDir
|
||||
, "-D", "CMAKE_INSTALL_DIR:STRING=%s" % cmakeInstallDir
|
||||
#, "-D", "CMAKE_MODULE_PATH:STRING=%s" % cmakeModules
|
||||
, toolSourceDir ]
|
||||
|
||||
|
@ -191,6 +194,7 @@ class Builder:
|
|||
, "-D", "CHECK_DETERMINISM:STRING=%s" % self._checkDeterminism
|
||||
, "-D", "CMAKE_VERBOSE_MAKEFILE:STRING=%s" % self._verboseMakefile
|
||||
, "-D", "CMAKE_INSTALL_PREFIX:STRING=%s" % self.installDir
|
||||
, "-D", "CMAKE_INSTALL_DIR:STRING=%s" % cmakeInstallDir
|
||||
]
|
||||
if self.libSuffix:
|
||||
command += [ "-D", "LIB_SUFFIX:STRING=%s" % self.libSuffix ]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# -*- mode:Python -*-
|
||||
#
|
||||
# This file is part of the Coriolis Software.
|
||||
# Copyright (c) UPMC/LIP6 2012-2015, All Rights Reserved
|
||||
# Copyright (c) UPMC/LIP6 2012-2016, All Rights Reserved
|
||||
#
|
||||
# +-----------------------------------------------------------------+
|
||||
# | C O R I O L I S |
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# -*- mode:Python -*-
|
||||
#
|
||||
# This file is part of the Coriolis Software.
|
||||
# Copyright (c) UPMC/LIP6 2012-2015, All Rights Reserved
|
||||
# Copyright (c) UPMC/LIP6 2012-2016, All Rights Reserved
|
||||
#
|
||||
# +-----------------------------------------------------------------+
|
||||
# | C O R I O L I S |
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# -*- mode:Python -*-
|
||||
#
|
||||
# This file is part of the Coriolis Software.
|
||||
# Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
# Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
#
|
||||
# +-----------------------------------------------------------------+
|
||||
# | C O R I O L I S |
|
||||
|
@ -146,6 +146,8 @@ class Configuration ( object ):
|
|||
self._osCygwinW7 = re.compile (".*CYGWIN_NT-6\.1.*i686.*")
|
||||
self._osCygwinW8_64 = re.compile (".*CYGWIN_NT-6\.[2-3].*x86_64.*")
|
||||
self._osCygwinW8 = re.compile (".*CYGWIN_NT-6\.[2-3].*i686.*")
|
||||
self._osCygwinW10_64 = re.compile (".*CYGWIN_NT-10\.[0-3].*x86_64.*")
|
||||
self._osCygwinW10 = re.compile (".*CYGWIN_NT-10\.[0-3].*i686.*")
|
||||
|
||||
uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE )
|
||||
lines = uname.stdout.readlines()
|
||||
|
@ -186,6 +188,10 @@ class Configuration ( object ):
|
|||
self._osType = "Cygwin.W8_64"
|
||||
self._libSuffix = "64"
|
||||
elif self._osCygwinW8.match(lines[0]): self._osType = "Cygwin.W8"
|
||||
elif self._osCygwinW10_64.match(lines[0]):
|
||||
self._osType = "Cygwin.W10_64"
|
||||
self._libSuffix = "64"
|
||||
elif self._osCygwinW10.match(lines[0]): self._osType = "Cygwin.W10"
|
||||
else:
|
||||
uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE )
|
||||
self._osType = uname.stdout.readlines()[0][:-1]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# -*- mode:Python -*-
|
||||
#
|
||||
# This file is part of the Coriolis Software.
|
||||
# Copyright (c) UPMC/LIP6 2012-2015, All Rights Reserved
|
||||
# Copyright (c) UPMC/LIP6 2012-2016, All Rights Reserved
|
||||
#
|
||||
# +-----------------------------------------------------------------+
|
||||
# | C O R I O L I S |
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# -*- mode:Python -*-
|
||||
#
|
||||
# This file is part of the Coriolis Software.
|
||||
# Copyright (c) UPMC/LIP6 2012-2015, All Rights Reserved
|
||||
# Copyright (c) UPMC/LIP6 2012-2016, All Rights Reserved
|
||||
#
|
||||
# +-----------------------------------------------------------------+
|
||||
# | C O R I O L I S |
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# -*- mode:Python -*-
|
||||
#
|
||||
# This file is part of the Coriolis Software.
|
||||
# Copyright (c) UPMC/LIP6 2012-2015, All Rights Reserved
|
||||
# Copyright (c) UPMC/LIP6 2012-2016, All Rights Reserved
|
||||
#
|
||||
# +-----------------------------------------------------------------+
|
||||
# | C O R I O L I S |
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# -*- mode:Python -*-
|
||||
#
|
||||
# This file is part of the Coriolis Software.
|
||||
# Copyright (c) UPMC/LIP6 2012-2015, All Rights Reserved
|
||||
# Copyright (c) UPMC/LIP6 2012-2016, All Rights Reserved
|
||||
#
|
||||
# +-----------------------------------------------------------------+
|
||||
# | C O R I O L I S |
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# -*- mode:Python -*-
|
||||
#
|
||||
# This file is part of the Coriolis Software.
|
||||
# Copyright (c) UPMC/LIP6 2012-2015, All Rights Reserved
|
||||
# Copyright (c) UPMC/LIP6 2012-2016, All Rights Reserved
|
||||
#
|
||||
# +-----------------------------------------------------------------+
|
||||
# | C O R I O L I S |
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# -*- mode:Python -*-
|
||||
#
|
||||
# This file is part of the Coriolis Software.
|
||||
# Copyright (c) UPMC/LIP6 2012-2015, All Rights Reserved
|
||||
# Copyright (c) UPMC/LIP6 2012-2016, All Rights Reserved
|
||||
#
|
||||
# +-----------------------------------------------------------------+
|
||||
# | C O R I O L I S |
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# -*- mode:Python -*-
|
||||
#
|
||||
# This file is part of the Coriolis Software.
|
||||
# Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
# Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
#
|
||||
# +-----------------------------------------------------------------+
|
||||
# | C O R I O L I S |
|
||||
|
@ -80,6 +80,8 @@ def guessOs ():
|
|||
osCygwinW7 = re.compile (".*CYGWIN_NT-6\.1.*i686.*")
|
||||
osCygwinW8_64 = re.compile (".*CYGWIN_NT-6\.[2-3].*x86_64.*")
|
||||
osCygwinW8 = re.compile (".*CYGWIN_NT-6\.[2-3].*i686.*")
|
||||
osCygwinW10_64 = re.compile (".*CYGWIN_NT-10\.[0-3].*x86_64.*")
|
||||
osCygwinW10 = re.compile (".*CYGWIN_NT-10\.[0-3].*i686.*")
|
||||
|
||||
uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE )
|
||||
lines = uname.stdout.readlines()
|
||||
|
@ -127,6 +129,11 @@ def guessOs ():
|
|||
libDir = "lib64"
|
||||
elif osCygwinW8.match(lines[0]):
|
||||
osType = "Cygwin.W8"
|
||||
elif osCygwinW10_64.match(lines[0]):
|
||||
osType = "Cygwin.W10_64"
|
||||
libDir = "lib64"
|
||||
elif osCygwinW10.match(lines[0]):
|
||||
osType = "Cygwin.W10"
|
||||
else:
|
||||
uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE )
|
||||
osType = uname.stdout.readlines()[0][:-1]
|
||||
|
|
|
@ -78,14 +78,16 @@
|
|||
#set(DEBUG_FLAGS "-g -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC")
|
||||
set(DEBUG_FLAGS "-g")
|
||||
if(CYGWIN)
|
||||
set(CXX_STANDARD "gnu++0x")
|
||||
set(ADDTIONAL_FLAGS "-D_GLIBCXX_USE_C99")
|
||||
set(CXX_STANDARD "gnu++11")
|
||||
else()
|
||||
set(ADDTIONAL_FLAGS "")
|
||||
set(CXX_STANDARD "c++11")
|
||||
endif()
|
||||
set(CMAKE_C_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE)
|
||||
set(CMAKE_C_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -O2 -DNDEBUG" CACHE STRING "C Compiler Release options." FORCE)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -O2 -DNDEBUG" CACHE STRING "C++ Compiler Release options." FORCE)
|
||||
set(CMAKE_C_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE)
|
||||
set(CMAKE_C_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -O2 ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C Compiler Release options." FORCE)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -O2 ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C++ Compiler Release options." FORCE)
|
||||
|
||||
|
||||
#
|
||||
|
|
|
@ -52,6 +52,8 @@ def guessOs ():
|
|||
osCygwinW7 = re.compile (".*CYGWIN_NT-6\.1.*i686.*")
|
||||
osCygwinW8_64 = re.compile (".*CYGWIN_NT-6\.[2-3].*x86_64.*")
|
||||
osCygwinW8 = re.compile (".*CYGWIN_NT-6\.[2-3].*i686.*")
|
||||
osCygwinW10_64 = re.compile (".*CYGWIN_NT-10\.[0-3].*x86_64.*")
|
||||
osCygwinW10 = re.compile (".*CYGWIN_NT-10\.[0-3].*i686.*")
|
||||
|
||||
uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE )
|
||||
lines = uname.stdout.readlines()
|
||||
|
@ -108,6 +110,11 @@ def guessOs ():
|
|||
libDir = "lib64"
|
||||
elif osCygwinW8.match(lines[0]):
|
||||
osType = "Cygwin.W8"
|
||||
elif osCygwinW10_64.match(lines[0]):
|
||||
osType = "Cygwin.W10_64"
|
||||
libDir = "lib64"
|
||||
elif osCygwinW10.match(lines[0]):
|
||||
osType = "Cygwin.W10"
|
||||
else:
|
||||
uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE )
|
||||
osType = uname.stdout.readlines()[0][:-1]
|
||||
|
@ -165,16 +172,18 @@ if __name__ == "__main__":
|
|||
'PATH="%(PATH)s";' \
|
||||
'BOOTSTRAP_TOP="%(BOOTSTRAP_TOP)s";' \
|
||||
'CORIOLIS_TOP="%(CORIOLIS_TOP)s";' \
|
||||
'STRATUS_MAPPING_NAME="%(SYSCONF_DIR)s/stratus2sxlib.xml";' \
|
||||
'export PATH BOOTSTRAP_TOP CORIOLIS_TOP STRATUS_MAPPING_NAME;'
|
||||
|
||||
# 'STRATUS_MAPPING_NAME="%(SYSCONF_DIR)s/stratus2sxlib.xml";' \
|
||||
|
||||
shellScriptCsh = \
|
||||
'echo "%(MESSAGE)s";' \
|
||||
'echo "Switching to Coriolis 2.x (%(buildDir)s)";' \
|
||||
'setenv PATH "%(PATH)s";' \
|
||||
'setenv BOOTSTRAP_TOP "%(BOOTSTRAP_TOP)s";' \
|
||||
'setenv CORIOLIS_TOP "%(CORIOLIS_TOP)s";' \
|
||||
'setenv STRATUS_MAPPING_NAME "%(SYSCONF_DIR)s/stratus2sxlib.xml";'
|
||||
'setenv CORIOLIS_TOP "%(CORIOLIS_TOP)s";'
|
||||
|
||||
# 'setenv STRATUS_MAPPING_NAME "%(SYSCONF_DIR)s/stratus2sxlib.xml";' \
|
||||
|
||||
buildDir = buildType + "." + linkType
|
||||
scriptDir = os.path.dirname ( os.path.abspath(__file__) )
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# -*- mode:Python -*-
|
||||
#
|
||||
# This file is part of the Coriolis Software.
|
||||
# Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
# Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
#
|
||||
# +-----------------------------------------------------------------+
|
||||
# | C O R I O L I S |
|
||||
|
@ -155,8 +155,8 @@ class Command ( object ):
|
|||
class GitRepository ( object ):
|
||||
|
||||
@staticmethod
|
||||
def getLocalRepository ( gitRepository ):
|
||||
localRepo = gitRepository.split( '/' )[-1]
|
||||
def getLocalRepository ( url ):
|
||||
localRepo = url.split( '/' )[-1]
|
||||
if localRepo.endswith('.git'):
|
||||
localRepo = localRepo[:-4]
|
||||
return localRepo
|
||||
|
@ -197,8 +197,8 @@ class GitRepository ( object ):
|
|||
class Configuration ( object ):
|
||||
|
||||
PrimaryNames = \
|
||||
[ 'sender' , 'receiver'
|
||||
, 'coriolisRepo', 'chamsRepo' , 'benchsRepo'
|
||||
[ 'sender' , 'receivers'
|
||||
, 'coriolisRepo', 'chamsRepo' , 'benchsRepo', 'supportRepos'
|
||||
, 'homeDir' , 'masterHost'
|
||||
, 'debugArg' , 'nightlyMode'
|
||||
, 'rmSource' , 'rmBuild', 'doGit', 'doBuild', 'doBenchs', 'doSendReport'
|
||||
|
@ -210,7 +210,8 @@ class Configuration ( object ):
|
|||
|
||||
def __init__ ( self ):
|
||||
self._sender = 'Jean-Paul.Chaput@soc.lip6.fr'
|
||||
self._receiver = 'Jean-Paul.Chaput@lip6.fr'
|
||||
self._receivers = [ 'Jean-Paul.Chaput@lip6.fr', 'Eric.Lao@lip6.fr' ]
|
||||
self._supportRepos = [ 'http://github.com/miloyip/rapidjson' ]
|
||||
self._coriolisRepo = 'https://www-soc.lip6.fr/git/coriolis.git'
|
||||
self._chamsRepo = 'file:///users/outil/chams/chams.git'
|
||||
self._benchsRepo = 'https://www-soc.lip6.fr/git/alliance-check-toolkit.git'
|
||||
|
@ -321,16 +322,17 @@ class Report ( object ):
|
|||
def __init__ ( self, conf ):
|
||||
self.conf = conf
|
||||
|
||||
date = time.strftime( "%A %d %B %Y" )
|
||||
stateText = 'FAILED'
|
||||
modeText = 'SoC installation'
|
||||
commaspace = ', '
|
||||
date = time.strftime( "%A %d %B %Y" )
|
||||
stateText = 'FAILED'
|
||||
modeText = 'SoC installation'
|
||||
if self.conf.success: stateText = 'SUCCESS'
|
||||
if self.conf.nightlyMode: modeText = 'Nightly build'
|
||||
|
||||
self.message = MIMEMultipart()
|
||||
self.message['Subject'] = '[%s] Coriolis & Chams %s %s' % (stateText,modeText,date)
|
||||
self.message['From' ] = self.conf.sender
|
||||
self.message['To' ] = self.conf.receiver
|
||||
self.message['To' ] = commaspace.join( self.conf.receivers )
|
||||
self.attachements = []
|
||||
|
||||
self.mainText = '\n'
|
||||
|
@ -372,9 +374,9 @@ class Report ( object ):
|
|||
for attachement in self.attachements:
|
||||
self.message.attach( attachement )
|
||||
|
||||
print "Sending mail report to <%s>" % self.conf.receiver
|
||||
print "Sending mail report to <%s>" % self.conf.receivers
|
||||
session = smtplib.SMTP( 'localhost' )
|
||||
session.sendmail( self.conf.sender, self.conf.receiver, self.message.as_string() )
|
||||
session.sendmail( self.conf.sender, self.conf.receivers, self.message.as_string() )
|
||||
session.quit()
|
||||
return
|
||||
|
||||
|
@ -408,11 +410,20 @@ try:
|
|||
if options.rmSource or options.rmAll: conf.rmSource = True
|
||||
if options.rmBuild or options.rmAll: conf.rmBuild = True
|
||||
|
||||
gitSupports = []
|
||||
for supportRepo in conf.supportRepos:
|
||||
gitSupports.append( GitRepository( supportRepo, conf.srcDir+'/support' ) )
|
||||
gitCoriolis = GitRepository( conf.coriolisRepo, conf.srcDir )
|
||||
gitChams = GitRepository( conf.chamsRepo , conf.srcDir )
|
||||
gitBenchs = GitRepository( conf.benchsRepo , conf.srcDir )
|
||||
|
||||
if conf.doGit:
|
||||
for gitSupport in gitSupports:
|
||||
if conf.rmSource: gitSupport.removeLocalRepo()
|
||||
gitSupport.clone()
|
||||
#if gitSupport.url.endswith('rapidjson'):
|
||||
# gitSupport.checkout( 'a1c4f32' )
|
||||
|
||||
if conf.rmSource: gitCoriolis.removeLocalRepo()
|
||||
gitCoriolis.clone ()
|
||||
gitCoriolis.checkout( 'devel' )
|
||||
|
@ -440,7 +451,7 @@ try:
|
|||
if conf.doBuild: conf.openLog( 'build' )
|
||||
if conf.doBenchs: conf.openLog( 'benchs' )
|
||||
|
||||
buildCommand = '%s --root=%s --project=coriolis --project=chams --make="-j%%d install" %%s' \
|
||||
buildCommand = '%s --root=%s --project=support --project=coriolis --project=chams --make="-j%%d install" %%s' \
|
||||
% (ccbBin,conf.rootDir)
|
||||
benchsCommand = 'cd %s/benchs && ./bin/go.sh clean && ./bin/go.sh lvx' \
|
||||
% (gitBenchs.localRepoDir)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<table class="footer2">
|
||||
<tr>
|
||||
<td class="LFooter">Coriolis Core (CRL)</td>
|
||||
<td class="RFooter"><small>Copyright © 2008-2015 UPMC All rights reserved</small></td>
|
||||
<td class="RFooter"><small>Copyright © 2008-2016 UPMC All rights reserved</small></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
|
||||
install ( FILES techno.conf DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||
install ( DIRECTORY common DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||
install ( DIRECTORY ispd05 DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||
install ( DIRECTORY cmos DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||
install ( DIRECTORY ispd05 DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||
install ( DIRECTORY vsc200 DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||
install ( DIRECTORY scmos_deep_018 DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||
install ( DIRECTORY scn6m_deep_09 DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||
install ( DIRECTORY hcmos9gp DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||
install ( DIRECTORY cmos065 DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||
install ( DIRECTORY 180 DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||
install ( DIRECTORY 130 DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
# -*- Mode:Python; explicit-buffer-name: "technology.conf<c35b4>" -*-
|
||||
#
|
||||
# AMS 0.35 microns.
|
||||
|
||||
from Hurricane import DbU
|
||||
|
||||
|
||||
technoConfig = { 'name' : 'c35b4'
|
||||
, 'gridValue' : 0.025
|
||||
, 'gridUnit' : DbU.UnitPowerMicro
|
||||
, 'gridsPerLambda': 24
|
||||
}
|
||||
|
||||
gdsLayersTable = \
|
||||
( ("nWell" , "NTUB" , 5)
|
||||
, ("nImplant", "NPLUS" , 23)
|
||||
, ("pImplant", "PPLUS" , 24)
|
||||
, ("active" , "DIFF" , 10)
|
||||
, ("poly" , "POLY1" , 20)
|
||||
, ("cut0" , "CONT" , 34)
|
||||
, ("metal1" , "MET1" , 35)
|
||||
, ("cut1" , "VIA1" , 36)
|
||||
, ("metal2" , "MET2" , 37)
|
||||
, ("cut2" , "VIA2" , 38)
|
||||
, ("metal3" , "MET3" , 39)
|
||||
, ("cut3" , "VIA3" , 41)
|
||||
, ("metal4" , "MET4" , 42)
|
||||
)
|
|
@ -11,6 +11,7 @@ cellsTop = allianceTop+'/cells/'
|
|||
allianceConfig = \
|
||||
( ( 'CATALOG' , 'CATAL')
|
||||
, ( 'WORKING_LIBRARY' , '.')
|
||||
# , ( 'SYSTEM_LIBRARY' , ( (cellsTop+'ramlib' , AddMode.Append), ) )
|
||||
, ( 'SYSTEM_LIBRARY' , ( (cellsTop+'sxlib' , AddMode.Append)
|
||||
, (cellsTop+'dp_sxlib', AddMode.Append)
|
||||
, (cellsTop+'ramlib' , AddMode.Append)
|
||||
|
|
|
@ -25,18 +25,18 @@ parametersTable = \
|
|||
|
||||
# Format of routingGaugesTable (dictionary):
|
||||
# A list of entry of the form:
|
||||
# ( METAL_NAME, (Direction, Type, depth, density, offset, pitch, wire_width, via_width) )
|
||||
# ( METAL_NAME, (Direction, Type, depth, density, offset, pitch, wire_width, via_width, obs_dw) )
|
||||
|
||||
routingGaugesTable = {}
|
||||
|
||||
routingGaugesTable['sxlib'] = \
|
||||
( ( 'METAL1', ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 0, 5, 2, 1 ) )
|
||||
, ( 'METAL2', ( Gauge.Horizontal, Gauge.Default, 1, 7.0, 0, 5, 2, 1 ) )
|
||||
, ( 'METAL3', ( Gauge.Vertical , Gauge.Default, 2, 0.0, 0, 5, 2, 1 ) )
|
||||
, ( 'METAL4', ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 5, 2, 1 ) )
|
||||
, ( 'METAL5', ( Gauge.Vertical , Gauge.Default, 4, 0.0, 0, 5, 2, 1 ) )
|
||||
#, ( 'METAL6', ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 5, 2, 1 ) )
|
||||
#, ( 'METAL7', ( Gauge.Vertical , Gauge.Default, 6, 0.0, 0, 5, 2, 1 ) )
|
||||
( ( 'METAL1', ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 0, 5, 2, 1, 4 ) )
|
||||
, ( 'METAL2', ( Gauge.Horizontal, Gauge.Default, 1, 7.0, 0, 5, 2, 1, 4 ) )
|
||||
, ( 'METAL3', ( Gauge.Vertical , Gauge.Default, 2, 0.0, 0, 5, 2, 1, 4 ) )
|
||||
, ( 'METAL4', ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 5, 2, 1, 4 ) )
|
||||
, ( 'METAL5', ( Gauge.Vertical , Gauge.Default, 4, 0.0, 0, 5, 2, 1, 4 ) )
|
||||
#, ( 'METAL6', ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 5, 2, 1, 4 ) )
|
||||
#, ( 'METAL7', ( Gauge.Vertical , Gauge.Default, 6, 0.0, 0, 5, 2, 1, 4 ) )
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -5,9 +5,7 @@ import helpers
|
|||
|
||||
# Status1 parameters.
|
||||
parametersTable = \
|
||||
( ("stratus1.mappingName", TypeString, helpers.sysConfDir+"/stratus2sxlib.xml",
|
||||
{ 'flags':Cfg.Parameter.Flags.NeedRestart|Cfg.Parameter.Flags.MustExist } )
|
||||
, ("stratus1.format" , TypeString, "vst")
|
||||
( ("stratus1.format" , TypeString, "vst")
|
||||
, ("stratus1.simulator" , TypeString, "asimut")
|
||||
,)
|
||||
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
# -*- Mode:Python; explicit-buffer-name: "technology.conf<cmos065>" -*-
|
||||
|
||||
from Hurricane import DbU
|
||||
|
||||
|
||||
technoConfig = { 'name' : 'cmos065'
|
||||
, 'gridValue' : 0.005
|
||||
, 'gridUnit' : DbU.UnitPowerMicro
|
||||
, 'gridsPerLambda': 24
|
||||
}
|
||||
|
||||
gdsLayersTable = \
|
||||
( ("nWell" , "NWELL" , 3)
|
||||
, ("nImplant", "NPLUS" , 26)
|
||||
, ("pImplant", "PPLUS" , 25)
|
||||
, ("active" , "ACTIVE" , 6)
|
||||
, ("poly" , "POLY" , 17)
|
||||
, ("cut0" , "C0" , 30)
|
||||
, ("metal1" , "M1" , 31)
|
||||
, ("cut1" , "VIA1X" , 51)
|
||||
, ("metal2" , "M2X" , 32)
|
||||
, ("cut2" , "VIA2X" , 52)
|
||||
, ("metal3" , "M3X" , 33)
|
||||
, ("cut3" , "VIA3X" , 53)
|
||||
, ("metal4" , "M4X" , 34)
|
||||
, ("cut4" , "VIA4X" , 54)
|
||||
, ("metal5" , "M5X" , 35)
|
||||
, ("cut5" , "VIA5X" , 55)
|
||||
, ("metal6" , "M6X" , 36)
|
||||
)
|
|
@ -8,7 +8,7 @@ else:
|
|||
poly2Color = 'Orange'
|
||||
|
||||
|
||||
defaultStyle = 'Printer.Coriolis'
|
||||
defaultStyle = 'Alliance.Classic [black]'
|
||||
|
||||
stylesTable = \
|
||||
( ( (Style , 'Alliance.Coriolis [black]', 'Alliance Coriolis Look - black background')
|
||||
|
@ -84,6 +84,7 @@ stylesTable = \
|
|||
, (Drawing, 'gmetalh' , { 'color':'128,255,200', 'pattern':'light_antihash0.8', 'border':1 })
|
||||
, (Drawing, 'gmetalv' , { 'color':'200,200,255', 'pattern':'light_antihash1.8', 'border':1 })
|
||||
, (Drawing, 'gcut' , { 'color':'255,255,190', 'border':1 })
|
||||
, (Drawing, 'gcell' , { 'color':'255,255,190', 'pattern':'0000000000000000', 'border':4 })
|
||||
)
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
|
@ -142,15 +143,16 @@ stylesTable = \
|
|||
|
||||
# Routing Layers.
|
||||
, (Group , 'Routing Layers')
|
||||
#, (Drawing, 'metal1', { 'color':'Blue' , 'pattern':'light_antislash0.8', 'border':1, 'threshold':0.80*scale })
|
||||
, (Drawing, 'metal1', { 'color':'Blue' , 'pattern':'slash.8' , 'border':1, 'threshold':0.80*scale })
|
||||
, (Drawing, 'metal2', { 'color':'Aqua' , 'pattern':'poids4.8' , 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal3', { 'color':'LightPink', 'pattern':'poids4.8' , 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal4', { 'color':'Green' , 'pattern':'poids4.8' , 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal5', { 'color':'Yellow' , 'pattern':'poids4.8' , 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal6', { 'color':'Violet' , 'pattern':'poids4.8' , 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal7', { 'color':'Red' , 'pattern':'poids4.8' , 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal8', { 'color':'Blue' , 'pattern':'poids4.8' , 'border':1, 'threshold':0.02*scale })
|
||||
#, (Drawing, 'metal1', { 'color':'Blue' , 'pattern':'light_antislash0.8', 'border':1, 'threshold':0.80*scale })
|
||||
, (Drawing, 'metal1', { 'color':'Blue' , 'pattern':'slash.8' , 'border':1, 'threshold':0.80*scale })
|
||||
, (Drawing, 'metal2', { 'color':'Aqua' , 'pattern':'poids4.8' , 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metcap', { 'color':'DarkTurquoise', 'pattern':'poids2.8' , 'border':2, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal3', { 'color':'LightPink' , 'pattern':'poids4.8' , 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal4', { 'color':'Green' , 'pattern':'poids4.8' , 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal5', { 'color':'Yellow' , 'pattern':'poids4.8' , 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal6', { 'color':'Violet' , 'pattern':'poids4.8' , 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal7', { 'color':'Red' , 'pattern':'poids4.8' , 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal8', { 'color':'Blue' , 'pattern':'poids4.8' , 'border':1, 'threshold':0.02*scale })
|
||||
|
||||
# Cuts (VIA holes).
|
||||
, (Group , 'Cuts (VIA holes)')
|
||||
|
@ -172,14 +174,14 @@ stylesTable = \
|
|||
|
||||
# Blockages.
|
||||
, (Group , 'Blockages')
|
||||
, (Drawing, 'blockage1', { 'color':'Blue' , 'pattern':'light_antislash0.8', 'threshold':0.80*scale, 'border':2 })
|
||||
, (Drawing, 'blockage2', { 'color':'Aqua' , 'pattern':'poids4.8' , 'threshold':0.80*scale, 'border':2 })
|
||||
, (Drawing, 'blockage3', { 'color':'LightPink', 'pattern':'poids4.8' , 'threshold':0.80*scale, 'border':2 })
|
||||
, (Drawing, 'blockage4', { 'color':'Green' , 'pattern':'poids4.8' , 'threshold':0.80*scale, 'border':2 })
|
||||
, (Drawing, 'blockage5', { 'color':'Yellow' , 'pattern':'poids4.8' , 'threshold':0.80*scale, 'border':2 })
|
||||
, (Drawing, 'blockage6', { 'color':'Violet' , 'pattern':'poids4.8' , 'threshold':0.80*scale, 'border':2 })
|
||||
, (Drawing, 'blockage7', { 'color':'Red' , 'pattern':'poids4.8' , 'threshold':0.80*scale, 'border':2 })
|
||||
, (Drawing, 'blockage8', { 'color':'Blue' , 'pattern':'poids4.8' , 'threshold':0.80*scale, 'border':2 })
|
||||
, (Drawing, 'blockage1', { 'color':'Blue' , 'pattern':'light_antislash0.8', 'threshold':0.80*scale, 'border':4 })
|
||||
, (Drawing, 'blockage2', { 'color':'Aqua' , 'pattern':'poids4.8' , 'threshold':0.80*scale, 'border':4 })
|
||||
, (Drawing, 'blockage3', { 'color':'LightPink', 'pattern':'poids4.8' , 'threshold':0.80*scale, 'border':4 })
|
||||
, (Drawing, 'blockage4', { 'color':'Green' , 'pattern':'poids4.8' , 'threshold':0.80*scale, 'border':4 })
|
||||
, (Drawing, 'blockage5', { 'color':'Yellow' , 'pattern':'poids4.8' , 'threshold':0.80*scale, 'border':4 })
|
||||
, (Drawing, 'blockage6', { 'color':'Violet' , 'pattern':'poids4.8' , 'threshold':0.80*scale, 'border':4 })
|
||||
, (Drawing, 'blockage7', { 'color':'Red' , 'pattern':'poids4.8' , 'threshold':0.80*scale, 'border':4 })
|
||||
, (Drawing, 'blockage8', { 'color':'Blue' , 'pattern':'poids4.8' , 'threshold':0.80*scale, 'border':4 })
|
||||
|
||||
# Knick & Kite.
|
||||
, (Group , 'Knick & Kite')
|
||||
|
@ -188,6 +190,7 @@ stylesTable = \
|
|||
, (Drawing, 'gmetalh' , { 'color':'128,255,200', 'pattern':'antislash2.32' , 'border':1 })
|
||||
, (Drawing, 'gmetalv' , { 'color':'200,200,255', 'pattern':'light_antihash1.8', 'border':1 })
|
||||
, (Drawing, 'gcut' , { 'color':'255,255,190', 'border':1 })
|
||||
, (Drawing, 'gcell' , { 'color':'255,255,190', 'pattern':'0000000000000000', 'border':4 })
|
||||
)
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
|
@ -320,12 +323,13 @@ stylesTable = \
|
|||
|
||||
# Group: Routing Layers.
|
||||
, (Group , 'Routing Layers')
|
||||
, (Drawing, 'metal1', { 'color':'Blue' , 'pattern':'slash.32' , 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal2', { 'color':'Aqua' , 'pattern':'antislash2.32', 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal3', { 'color':'LightPink', 'pattern':'antislash3.32', 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal4', { 'color':'Green' , 'pattern':'antislash4.32', 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal5', { 'color':'Yellow' , 'pattern':'antislash5.32', 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal6', { 'color':'Violet' , 'pattern':'antislash2.32', 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal1', { 'color':'Blue' , 'pattern':'slash.32' , 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal2', { 'color':'Aqua' , 'pattern':'antislash2.32', 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metcap', { 'color':'DarkTurquoise', 'pattern':'poids2.32' , 'border':2, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal3', { 'color':'LightPink' , 'pattern':'antislash3.32', 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal4', { 'color':'Green' , 'pattern':'antislash4.32', 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal5', { 'color':'Yellow' , 'pattern':'antislash5.32', 'border':1, 'threshold':0.02*scale })
|
||||
, (Drawing, 'metal6', { 'color':'Violet' , 'pattern':'antislash2.32', 'border':1, 'threshold':0.02*scale })
|
||||
|
||||
# Group: Cuts (VIA holes)
|
||||
, (Group , 'Cuts (VIA holes)')
|
||||
|
@ -359,5 +363,6 @@ stylesTable = \
|
|||
, (Drawing, 'gmetalh' , { 'color':'128,255,200', 'pattern':'light_antihash0.8' , 'border':1 })
|
||||
, (Drawing, 'gmetalv' , { 'color':'200,200,255', 'pattern':'light_antihash1.8' , 'border':1 })
|
||||
, (Drawing, 'gcut' , { 'color':'255,255,190', 'border':1 })
|
||||
, (Drawing, 'gcell' , { 'color':'255,255,190', 'pattern':'0000000000000000', 'border':4 })
|
||||
)
|
||||
)
|
||||
|
|
|
@ -7,7 +7,8 @@ parametersTable = \
|
|||
, ('misc.logMode' , TypeBool, False)
|
||||
, ('misc.verboseLevel1', TypeBool, True )
|
||||
, ('misc.verboseLevel2', TypeBool, False)
|
||||
, ('misc.traceLevel' , TypeInt , 1000, {'min':0} )
|
||||
, ('misc.minTraceLevel', TypeInt , 0, {'min':0} )
|
||||
, ('misc.maxTraceLevel', TypeInt , 0, {'min':0} )
|
||||
|
||||
, ("viewer.printer.mode", TypeEnumerate ,1
|
||||
, { 'values':( ("Cell Mode" , 1)
|
||||
|
@ -58,7 +59,8 @@ layoutTable = \
|
|||
, (TypeOption, 'misc.verboseLevel2' , 'Very Verbose' , 0)
|
||||
, (TypeOption, 'misc.info' , 'Show Info' , 0)
|
||||
, (TypeOption, 'misc.logMode' , 'Output is a TTY' , 0)
|
||||
, (TypeOption, 'misc.traceLevel' , 'Trace Level' , 1)
|
||||
, (TypeOption, 'misc.minTraceLevel' , 'Min. Trace Level' , 1)
|
||||
, (TypeOption, 'misc.maxTraceLevel' , 'Max. Trace Level' , 1)
|
||||
, (TypeTitle , 'Print/Snapshot Parameters')
|
||||
, (TypeOption, 'viewer.printer.mode' , 'Printer/Snapshot Mode', 1)
|
||||
, (TypeOption, 'viewer.printer.paper', 'Paper Size' , 0)
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
# -*- Mode:Python; explicit-buffer-name: "patterns.conf<common>" -*-
|
||||
|
||||
|
||||
patternsTable = ( { 'name':'slash.8' , 'bits':[ ' X X'
|
||||
patternsTable = ( { 'name':'crux.8' , 'bits':[ ' '
|
||||
, ' X '
|
||||
, ' X '
|
||||
, ' XXXXX '
|
||||
, ' X '
|
||||
, ' X '
|
||||
, ' '
|
||||
, ' ' ] }
|
||||
|
||||
, { 'name':'slash.8' , 'bits':[ ' X X'
|
||||
, ' X X '
|
||||
, ' X X '
|
||||
, 'X X '
|
||||
|
|
|
@ -40,6 +40,7 @@ realLayersTable = \
|
|||
, ('metal1' , BasicLayer.Material.metal ) # WARNING: order *is* meaningful.
|
||||
, ('cut1' , BasicLayer.Material.cut )
|
||||
, ('metal2' , BasicLayer.Material.metal )
|
||||
, ('metcap' , BasicLayer.Material.other )
|
||||
, ('cut2' , BasicLayer.Material.cut )
|
||||
, ('metal3' , BasicLayer.Material.metal )
|
||||
, ('cut3' , BasicLayer.Material.cut )
|
||||
|
@ -96,6 +97,8 @@ symbolicLayersTable = \
|
|||
, ('POLY2' , TypeRegular , ('poly2' ,))
|
||||
, ('METAL1' , TypeRegular , ('metal1' ,))
|
||||
, ('METAL2' , TypeRegular , ('metal2' ,))
|
||||
, ('metcapdum' , TypeRegular , ('metcap' ,))
|
||||
, ('metbot' , TypeRegular , ('metal2' ,))
|
||||
, ('METAL3' , TypeRegular , ('metal3' ,))
|
||||
, ('METAL4' , TypeRegular , ('metal4' ,))
|
||||
, ('METAL5' , TypeRegular , ('metal5' ,))
|
||||
|
@ -109,6 +112,7 @@ symbolicLayersTable = \
|
|||
, ('CONT_POLY' , TypeVia , ( 'poly' , 'cut0', 'metal1'))
|
||||
, ('VIA12' , TypeVia , ( 'metal1', 'cut1', 'metal2'))
|
||||
, ('VIA23' , TypeVia , ( 'metal2', 'cut2', 'metal3'))
|
||||
, ('VIA23cap' , TypeVia , ( 'metcap', 'cut2', 'metal3'))
|
||||
, ('VIA34' , TypeVia , ( 'metal3', 'cut3', 'metal4'))
|
||||
, ('VIA45' , TypeVia , ( 'metal4', 'cut4', 'metal5'))
|
||||
, ('VIA56' , TypeVia , ( 'metal5', 'cut5', 'metal6'))
|
||||
|
@ -126,7 +130,7 @@ symbolicLayersTable = \
|
|||
)
|
||||
|
||||
|
||||
# Format of <symbolicRulesTable>:
|
||||
# Format of <workingLayersTable>:
|
||||
# This is a simple list of Real & Symbolic layers.
|
||||
|
||||
workingLayersTable = \
|
||||
|
@ -135,5 +139,5 @@ workingLayersTable = \
|
|||
, 'METAL1' , 'METAL2' , 'METAL3' , 'METAL4' , 'METAL5' , 'METAL6' , 'METAL7' , 'METAL8'
|
||||
, 'BLOCKAGE1', 'BLOCKAGE2', 'BLOCKAGE3', 'BLOCKAGE4', 'BLOCKAGE5', 'BLOCKAGE6', 'BLOCKAGE7', 'BLOCKAGE8'
|
||||
, 'VIA12' , 'VIA23' , 'VIA34' , 'VIA45' , 'VIA56'
|
||||
, 'gcut', 'gmetalh', 'gmetalv', 'gcontact'
|
||||
, 'gcut' , 'gmetalh' , 'gmetalv' , 'gcontact'
|
||||
]
|
||||
|
|
|
@ -25,18 +25,18 @@ parametersTable = \
|
|||
|
||||
# Format of routingGaugesTable (dictionary):
|
||||
# A list of entry of the form:
|
||||
# ( METAL_NAME, (Direction, Type, depth, density, offset, pitch, wire_width, via_width) )
|
||||
# ( METAL_NAME, (Direction, Type, depth, density, offset, pitch, wire_width, via_width, obs_dw) )
|
||||
|
||||
routingGaugesTable = {}
|
||||
|
||||
routingGaugesTable['sxlib'] = \
|
||||
( ( 'METAL1', ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 0, 5, 2, 1 ) )
|
||||
, ( 'METAL2', ( Gauge.Horizontal, Gauge.Default, 1, 7.0, 0, 5, 2, 1 ) )
|
||||
, ( 'METAL3', ( Gauge.Vertical , Gauge.Default, 2, 0.0, 0, 5, 2, 1 ) )
|
||||
, ( 'METAL4', ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 5, 2, 1 ) )
|
||||
, ( 'METAL5', ( Gauge.Vertical , Gauge.Default, 4, 0.0, 0, 5, 2, 1 ) )
|
||||
#, ( 'METAL6', ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 5, 2, 1 ) )
|
||||
#, ( 'METAL7', ( Gauge.Vertical , Gauge.Default, 6, 0.0, 0, 5, 2, 1 ) )
|
||||
( ( 'METAL1', ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 0, 5, 2, 1, 4 ) )
|
||||
, ( 'METAL2', ( Gauge.Horizontal, Gauge.Default, 1, 7.0, 0, 5, 2, 1, 4 ) )
|
||||
, ( 'METAL3', ( Gauge.Vertical , Gauge.Default, 2, 0.0, 0, 5, 2, 1, 4 ) )
|
||||
, ( 'METAL4', ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 5, 2, 1, 4 ) )
|
||||
, ( 'METAL5', ( Gauge.Vertical , Gauge.Default, 4, 0.0, 0, 5, 2, 1, 4 ) )
|
||||
#, ( 'METAL6', ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 5, 2, 1, 4 ) )
|
||||
#, ( 'METAL7', ( Gauge.Vertical , Gauge.Default, 6, 0.0, 0, 5, 2, 1, 4 ) )
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -5,9 +5,7 @@ import helpers
|
|||
|
||||
# Status1 parameters.
|
||||
parametersTable = \
|
||||
( ("stratus1.mappingName", TypeString, helpers.sysConfDir+"/stratus2sxlib.xml",
|
||||
{ 'flags':Cfg.Parameter.Flags.NeedRestart|Cfg.Parameter.Flags.MustExist } )
|
||||
, ("stratus1.format" , TypeString, "vst")
|
||||
( ("stratus1.format" , TypeString, "vst")
|
||||
, ("stratus1.simulator" , TypeString, "asimut")
|
||||
,)
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ cellsTop = allianceTop+'/cells'
|
|||
allianceConfig = \
|
||||
( ( 'CATALOG' , 'CATAL')
|
||||
, ( 'WORKING_LIBRARY' , '.')
|
||||
, ( 'SYSTEM_LIBRARY' , ( (cellsTop+'/msxlib' , Environment.Append)
|
||||
, ( 'SYSTEM_LIBRARY' , ( (cellsTop+'/nsxlib' , Environment.Append)
|
||||
, (cellsTop+'/mpxlib' , Environment.Append)) )
|
||||
, ( 'SCALE_X' , 100)
|
||||
, ( 'IN_LO' , 'vst')
|
||||
|
|
|
@ -25,17 +25,17 @@ parametersTable = \
|
|||
|
||||
# Format of routingGaugesTable (dictionary):
|
||||
# A list of entry of the form:
|
||||
# ( METAL_NAME, (Direction, Type, depth, density, offset, pitch, wire_width, via_width) )
|
||||
# ( METAL_NAME, (Direction, Type, depth, density, offset, pitch, wire_width, via_width, obs_dw) )
|
||||
|
||||
routingGaugesTable = {}
|
||||
|
||||
routingGaugesTable['msxlib'] = \
|
||||
( ( 'METAL1' , ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 0, 10, 2, 2 ) )
|
||||
, ( 'METAL2' , ( Gauge.Horizontal, Gauge.Default, 1, 0.0, 0, 10, 3, 2 ) )
|
||||
, ( 'METAL3' , ( Gauge.Vertical , Gauge.Default, 2, 0.0, 0, 10, 3, 2 ) )
|
||||
, ( 'METAL4' , ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 10, 3, 2 ) )
|
||||
, ( 'METAL5' , ( Gauge.Vertical , Gauge.Default, 4, 0.0, 0, 10, 3, 2 ) )
|
||||
#, ( 'METAL6' , ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 10, 5, 2 ) )
|
||||
( ( 'METAL1' , ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 0, 10, 2, 2, 7 ) )
|
||||
, ( 'METAL2' , ( Gauge.Horizontal, Gauge.Default, 1, 0.0, 0, 10, 3, 2, 8 ) )
|
||||
, ( 'METAL3' , ( Gauge.Vertical , Gauge.Default, 2, 0.0, 0, 10, 3, 2, 8 ) )
|
||||
, ( 'METAL4' , ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 10, 3, 2, 8 ) )
|
||||
, ( 'METAL5' , ( Gauge.Vertical , Gauge.Default, 4, 0.0, 0, 10, 3, 2, 8 ) )
|
||||
#, ( 'METAL6' , ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 10, 5, 2, 8 ) )
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -22,6 +22,6 @@ parametersTable = \
|
|||
, ('chip.pad.pvddeck' , TypeString, 'pvddeck_mpx')
|
||||
, ('chip.pad.pvsseck' , TypeString, 'pvsseck_mpx')
|
||||
, ('clockTree.minimumSide' , TypeInt , 1000)
|
||||
, ('clockTree.buffer' , TypeString, 'bf1_x4')
|
||||
, ('clockTree.buffer' , TypeString, 'buf_x2')
|
||||
, ('clockTree.placerEngine' , TypeString, 'Etesian')
|
||||
)
|
||||
|
|
|
@ -5,9 +5,7 @@ import helpers
|
|||
|
||||
# Status1 parameters.
|
||||
parametersTable = \
|
||||
( ("stratus1.mappingName", TypeString, helpers.sysConfDir+"/stratus2sxlib.xml",
|
||||
{ 'flags':Cfg.Parameter.Flags.NeedRestart|Cfg.Parameter.Flags.MustExist } )
|
||||
, ("stratus1.format" , TypeString, "vst")
|
||||
( ("stratus1.format" , TypeString, "vst")
|
||||
, ("stratus1.simulator" , TypeString, "asimut")
|
||||
,)
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ symbolicRulesTable = \
|
|||
, ('NTRANS.nImplant.extention.cap' , 2.0)
|
||||
, ('NTRANS.nImplant.extention.width' , 7.0)
|
||||
, ('NTRANS.active.extention.cap' , 0.0)
|
||||
, ('NTRANS.active.extention.width' , 4.0)
|
||||
, ('NTRANS.active.extention.width' , 3.0)
|
||||
, ('NTRANS.poly.extention.cap' , 3.0)
|
||||
, ('NTRANS.poly.extention.width' , 0.0)
|
||||
|
||||
|
@ -70,7 +70,7 @@ symbolicRulesTable = \
|
|||
, ('PTRANS.pImplant.extention.cap' , 2.0)
|
||||
, ('PTRANS.pImplant.extention.width' , 7.0)
|
||||
, ('PTRANS.active.extention.cap' , 0.0)
|
||||
, ('PTRANS.active.extention.width' , 4.0)
|
||||
, ('PTRANS.active.extention.width' , 3.0)
|
||||
, ('PTRANS.poly.extention.cap' , 3.0)
|
||||
, ('PTRANS.poly.extention.width' , 0.0)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# -*- Mode:Python -*-
|
||||
|
||||
symbolicTechno = 'cmos'
|
||||
realTechno = 'hcmos9gp'
|
||||
realTechno = '130/hcmos9gp'
|
||||
|
|
|
@ -25,18 +25,18 @@ parametersTable = \
|
|||
|
||||
# Format of routingGaugesTable (dictionary):
|
||||
# A list of entry of the form:
|
||||
# ( METAL_NAME, (Direction, Type, depth, density, offset, pitch, wire_width, via_width) )
|
||||
# ( METAL_NAME, (Direction, Type, depth, density, offset, pitch, wire_width, via_width, obs_dw) )
|
||||
|
||||
routingGaugesTable = {}
|
||||
|
||||
routingGaugesTable['vsclib'] = \
|
||||
( ( 'METAL1', ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 4, 8, 3, 2 ) )
|
||||
, ( 'METAL2', ( Gauge.Horizontal, Gauge.Default, 1, 7.0, 0, 8, 4, 2 ) )
|
||||
, ( 'METAL3', ( Gauge.Vertical , Gauge.Default, 2, 0.0, 4, 8, 4, 2 ) )
|
||||
, ( 'METAL4', ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 8, 4, 2 ) )
|
||||
, ( 'METAL5', ( Gauge.Vertical , Gauge.Default, 4, 0.0, 4, 8, 4, 2 ) )
|
||||
#, ( 'METAL6', ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 8, 4, 2 ) )
|
||||
#, ( 'METAL7', ( Gauge.Vertical , Gauge.Default, 6, 0.0, 4, 8, 4, 2 ) )
|
||||
( ( 'METAL1', ( Gauge.Vertical , Gauge.PinOnly, 0, 0.0, 4, 8, 3, 2, 6.5 ) )
|
||||
, ( 'METAL2', ( Gauge.Horizontal, Gauge.Default, 1, 7.0, 0, 8, 4, 2, 6 ) )
|
||||
, ( 'METAL3', ( Gauge.Vertical , Gauge.Default, 2, 0.0, 4, 8, 4, 2, 6 ) )
|
||||
, ( 'METAL4', ( Gauge.Horizontal, Gauge.Default, 3, 0.0, 0, 8, 4, 2, 6 ) )
|
||||
, ( 'METAL5', ( Gauge.Vertical , Gauge.Default, 4, 0.0, 4, 8, 4, 2, 6 ) )
|
||||
#, ( 'METAL6', ( Gauge.Horizontal, Gauge.Default, 5, 0.0, 0, 8, 4, 2, 6 ) )
|
||||
#, ( 'METAL7', ( Gauge.Vertical , Gauge.Default, 6, 0.0, 4, 8, 4, 2, 6 ) )
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -5,9 +5,7 @@ import helpers
|
|||
|
||||
# Status1 parameters.
|
||||
parametersTable = \
|
||||
( ("stratus1.mappingName", TypeString, helpers.sysConfDir+"/stratus2sxlib.xml",
|
||||
{ 'flags':Cfg.Parameter.Flags.NeedRestart|Cfg.Parameter.Flags.MustExist } )
|
||||
, ("stratus1.format" , TypeString, "vst")
|
||||
( ("stratus1.format" , TypeString, "vst")
|
||||
, ("stratus1.simulator" , TypeString, "asimut")
|
||||
,)
|
||||
|
||||
|
|
|
@ -160,4 +160,14 @@ def coriolisConfigure():
|
|||
|
||||
#sys.stdout.write(CRL.AllianceFramework.get().getEnvironment().getPrint())
|
||||
|
||||
if Cfg.getParamString('stratus1.mappingName').asString() == 'not_set':
|
||||
vendorTech = helpers.realTechno.split('/')[-1]
|
||||
mappingFile = os.path.join( helpers.realDir, 'stratus.xml' )
|
||||
if not os.path.isfile(mappingFile):
|
||||
mappingFile = os.path.join( helpers.sysConfDir, 'stratus2sxlib.xml' )
|
||||
|
||||
parameter = Cfg.getParamString('stratus1.mappingName')
|
||||
parameter.setString( mappingFile )
|
||||
parameter.flags = Cfg.Parameter.Flags.NeedRestart|Cfg.Parameter.Flags.MustExist
|
||||
|
||||
return
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# -*- Mode:Python; explicit-buffer-name: "Alliance.py<crlcore/helpers>" -*-
|
||||
#
|
||||
# This file is part of the Coriolis Software.
|
||||
# Copyright (c) UPMC 2012-2015, All Rights Reserved
|
||||
# Copyright (c) UPMC 2012-2016, All Rights Reserved
|
||||
#
|
||||
# +-----------------------------------------------------------------+
|
||||
# | C O R I O L I S |
|
||||
|
@ -152,10 +152,10 @@ def loadRoutingGaugesTable ( routingGaugesTable, fromFile ):
|
|||
,'Must have exactly two fields ("METAL_LAYER", (parameters_list)).'
|
||||
,str(entry)
|
||||
])
|
||||
if len(entry[1]) != 8:
|
||||
if len(entry[1]) != 9:
|
||||
raise ErrorMessage(1,['Malformed entry in <routingGaugesTable[%s]>.' % gaugeName
|
||||
,'Parameters list must have exactly eight fields:'
|
||||
,' (direction, type, depth, density, offset, pitch, wire_width, via_width)'
|
||||
,'Parameters list must have exactly nine fields:'
|
||||
,' (direction, type, depth, density, offset, pitch, wire_width, via_width, obs_dw)'
|
||||
,str(entry)
|
||||
])
|
||||
|
||||
|
@ -168,6 +168,7 @@ def loadRoutingGaugesTable ( routingGaugesTable, fromFile ):
|
|||
, DbU.fromLambda(entry[1][5]) # Pitch.
|
||||
, DbU.fromLambda(entry[1][6]) # Wire width.
|
||||
, DbU.fromLambda(entry[1][7]) # Via width.
|
||||
, DbU.fromLambda(entry[1][8]) # Obstacle dW.
|
||||
) )
|
||||
|
||||
except Exception, e:
|
||||
|
|
|
@ -17,28 +17,29 @@ displayFile = '<displayFile has not been set>'
|
|||
|
||||
|
||||
stdColors = \
|
||||
{ 'Black' : '0,0,0'
|
||||
, 'Gray50' : '050,050,050'
|
||||
, 'Gray238' : '238,238,238'
|
||||
, 'White' : '255,255,255'
|
||||
, 'Seashell4' : '139,134,130'
|
||||
, 'Red' : '255,0,0' # Shade of Reds.
|
||||
, 'OrangeRed' : "255,69,0"
|
||||
, 'DarkOrange' : "255,140,0"
|
||||
, 'Orange' : "255,165,0"
|
||||
, 'Wheat' : "245,222,179"
|
||||
, 'LightPink' : '255,182,193'
|
||||
, 'Green' : '0,255,0' # Shade of Green.
|
||||
, 'LawnGreen' : '124,252,0'
|
||||
, 'Blue' : '0,0,255' # Shade of Blue.
|
||||
, 'Aqua' : '0,255,255'
|
||||
, 'BlueViolet' : '138,43,226'
|
||||
, 'Violet' : '238;130;238' # Shade of Violets.
|
||||
, 'Magenta' : '255,0,255'
|
||||
, 'Magenta4' : '139,0,139'
|
||||
, 'Tan' : '210,180,140' # Shade of Browns
|
||||
, 'Yellow' : '255,255,0' # Shade of Yellows.
|
||||
, 'LightYellow' : '255,255,224'
|
||||
{ 'Black' : '0,0,0'
|
||||
, 'Gray50' : '050,050,050'
|
||||
, 'Gray238' : '238,238,238'
|
||||
, 'White' : '255,255,255'
|
||||
, 'Seashell4' : '139,134,130'
|
||||
, 'Red' : '255,0,0' # Shade of Reds.
|
||||
, 'OrangeRed' : "255,69,0"
|
||||
, 'DarkOrange' : "255,140,0"
|
||||
, 'Orange' : "255,165,0"
|
||||
, 'Wheat' : "245,222,179"
|
||||
, 'LightPink' : '255,182,193'
|
||||
, 'Green' : '0,255,0' # Shade of Green.
|
||||
, 'LawnGreen' : '124,252,0'
|
||||
, 'Blue' : '0,0,255' # Shade of Blue.
|
||||
, 'Aqua' : '0,255,255'
|
||||
, 'DarkTurquoise' : '0,206,209'
|
||||
, 'BlueViolet' : '138,43,226'
|
||||
, 'Violet' : '238;130;238' # Shade of Violets.
|
||||
, 'Magenta' : '255,0,255'
|
||||
, 'Magenta4' : '139,0,139'
|
||||
, 'Tan' : '210,180,140' # Shade of Browns
|
||||
, 'Yellow' : '255,255,0' # Shade of Yellows.
|
||||
, 'LightYellow' : '255,255,224'
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
# -*- mode:Python; explicit-buffer-name: "__init__.py<crlcore/helpers>" -*-
|
||||
#
|
||||
# This file is part of the Coriolis Software.
|
||||
# Copyright (c) UPMC 2012-2015, All Rights Reserved
|
||||
# Copyright (c) UPMC 2012-2016, All Rights Reserved
|
||||
#
|
||||
# +-----------------------------------------------------------------+
|
||||
# | C O R I O L I S |
|
||||
# | C o r i o l i s / C h a m s B u i l d e r |
|
||||
# | |
|
||||
# | Author : Jean-Paul Chaput |
|
||||
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
# | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
# | =============================================================== |
|
||||
# | Python : "./crlcore/__init__.py" |
|
||||
# +-----------------------------------------------------------------+
|
||||
|
@ -26,9 +26,10 @@ import traceback
|
|||
import Hurricane
|
||||
|
||||
sysConfDir = None
|
||||
ndaConfDir = None
|
||||
symbolicTechno = 'cmos'
|
||||
symbolicDir = None
|
||||
realTechno = 'hcmos9gp'
|
||||
realTechno = '130/hcmos9gp'
|
||||
realDir = None
|
||||
tab = None
|
||||
_trace = None
|
||||
|
@ -246,6 +247,7 @@ def setTraceLevel ( level ):
|
|||
|
||||
|
||||
def initTechno ( quiet ):
|
||||
global ndaConfDir
|
||||
global realDir
|
||||
global realTechno
|
||||
global symbolicDir
|
||||
|
@ -265,14 +267,19 @@ def initTechno ( quiet ):
|
|||
if moduleGlobals.has_key('symbolicTechnology'):
|
||||
symbolicTechno = symbolicTechnology
|
||||
else:
|
||||
print '[WARNING] The symbolic technology name is not set. Using <cmos>.'
|
||||
print '[WARNING] The symbolic technology name is not set. Using <%s>.' % symbolicTechno
|
||||
if moduleGlobals.has_key('realTechnology'):
|
||||
realTechno = realTechnology
|
||||
else:
|
||||
print '[WARNING] The real technology name is not set. Using <hcmos9gp>.'
|
||||
print '[WARNING] The real technology name is not set. Using <%s>.' % realTechno
|
||||
|
||||
if moduleGlobals.has_key('NdaDirectory'):
|
||||
ndaConfDir = os.path.join( NdaDirectory, 'etc/coriolis2' )
|
||||
else:
|
||||
ndaConfDir = sysConfDir
|
||||
|
||||
symbolicDir = os.path.join( sysConfDir, symbolicTechno )
|
||||
realDir = os.path.join( sysConfDir, realTechno )
|
||||
realDir = os.path.join( ndaConfDir, realTechno )
|
||||
if not quiet: print ' - Technologies: %s+%s.' % (symbolicTechno,realTechno)
|
||||
|
||||
|
||||
|
|
|
@ -11,9 +11,12 @@ Cfg.getParamBool("misc.bug" ).setBool(False)
|
|||
Cfg.getParamBool("misc.logMode" ).setBool(True )
|
||||
Cfg.getParamBool("misc.verboseLevel1").setBool(True )
|
||||
Cfg.getParamBool("misc.verboseLevel2").setBool(False)
|
||||
Cfg.getParamInt ("misc.traceLevel" ).setInt (1000 )
|
||||
param = Cfg.getParamInt ("misc.traceLevel")
|
||||
Cfg.getParamInt ("misc.minTraceLevel").setInt (0 )
|
||||
Cfg.getParamInt ("misc.maxTraceLevel").setInt (0 )
|
||||
param = Cfg.getParamInt ("misc.minTraceLevel")
|
||||
param.setMin(0)
|
||||
param = Cfg.getParamInt ("misc.maxTraceLevel")
|
||||
param.setMax(0)
|
||||
|
||||
# Misc. tab layout.
|
||||
layout = Cfg.Configuration.get().getLayout()
|
||||
|
@ -26,4 +29,5 @@ layout.addParameter ( "Misc.", "misc.info" , "Show Infos" , 0 )
|
|||
layout.addParameter ( "Misc.", "misc.paranoid" , "Show Everything" , 0 )
|
||||
layout.addParameter ( "Misc.", "misc.bug" , "Show Bugs" , 0 )
|
||||
layout.addParameter ( "Misc.", "misc.logMode" , "Output is a TTY" , 0 )
|
||||
layout.addParameter ( "Misc.", "misc.traceLevel" , "Trace Level" , 1 )
|
||||
layout.addParameter ( "Misc.", "misc.minTraceLevel", "Min. Trace Level", 1 )
|
||||
layout.addParameter ( "Misc.", "misc.maxTraceLevel", "Max. Trace Level", 1 )
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -226,6 +226,7 @@ namespace CRL {
|
|||
Catalog* catalog = AllianceFramework::get()->getCatalog();
|
||||
CellLoaders* loaders = CellLoaders::get();
|
||||
|
||||
getCellsDatas().clear();
|
||||
forEach ( Cell*, icell, library->getLibrary()->getCells() ) {
|
||||
CellDatas* datas = new CellDatas(*icell);
|
||||
getCellsDatas().push_back( datas );
|
||||
|
@ -245,6 +246,7 @@ namespace CRL {
|
|||
CellDatas* key = new CellDatas( cellName );
|
||||
|
||||
auto idatas = lower_bound( getCellsDatas().begin(), getCellsDatas().end(), key, LessCellDatas );
|
||||
|
||||
if ( (idatas == getCellsDatas().end())
|
||||
or ((*idatas)->getName() != cellName ) ) {
|
||||
getCellsDatas().push_back( key );
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -86,6 +86,10 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
void CellsWidget::updateLibrary ()
|
||||
{ _baseModel->updateLibrary(); }
|
||||
|
||||
|
||||
void CellsWidget::updateSelected ()
|
||||
{ if (_selected.isValid()) _baseModel->emitDataChanged(_selected); }
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -24,6 +24,7 @@
|
|||
|
||||
namespace CRL {
|
||||
|
||||
using namespace std;
|
||||
using Hurricane::Graphics;
|
||||
|
||||
|
||||
|
@ -37,6 +38,10 @@ namespace CRL {
|
|||
{ }
|
||||
|
||||
|
||||
void LibrariesModel::update ()
|
||||
{ emit layoutChanged(); }
|
||||
|
||||
|
||||
QVariant LibrariesModel::data ( const QModelIndex& index, int role ) const
|
||||
{
|
||||
static QFont nameFont = Graphics::getFixedFont( QFont::Bold );
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -75,6 +75,10 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
void LibrariesWidget::update ()
|
||||
{ _baseModel->update(); }
|
||||
|
||||
|
||||
void LibrariesWidget::initSelection ()
|
||||
{ _view->selectRow( 0 ); }
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -23,6 +23,7 @@
|
|||
#include "hurricane/Error.h"
|
||||
#include "hurricane/viewer/Graphics.h"
|
||||
#include "hurricane/viewer/CellViewer.h"
|
||||
#include "crlcore/AllianceFramework.h"
|
||||
#include "crlcore/LibraryManager.h"
|
||||
#include "crlcore/LibrariesWidget.h"
|
||||
#include "crlcore/CellsWidget.h"
|
||||
|
@ -39,13 +40,30 @@ namespace CRL {
|
|||
using Hurricane::Graphics;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "FrameworkObserver".
|
||||
|
||||
void FrameworkObserver::notify ( unsigned int flags )
|
||||
{
|
||||
LibraryManager* manager = getOwner();
|
||||
if (flags & (AllianceFramework::AddedLibrary
|
||||
|AllianceFramework::RemovedLibrary)) {
|
||||
manager->getLibrariesWidget()->update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "LibraryManager".
|
||||
|
||||
LibraryManager::LibraryManager ( QWidget* parent )
|
||||
: QWidget (parent)
|
||||
, _librariesWidget(new LibrariesWidget())
|
||||
, _cellsWidget (new CellsWidget())
|
||||
, _viewsWidget (new ViewsWidget())
|
||||
, _cellViewer (NULL)
|
||||
, _libPath (NULL)
|
||||
: QWidget (parent)
|
||||
, _frameworkObserver(this)
|
||||
, _librariesWidget (new LibrariesWidget())
|
||||
, _cellsWidget (new CellsWidget())
|
||||
, _viewsWidget (new ViewsWidget())
|
||||
, _cellViewer (NULL)
|
||||
, _libPath (NULL)
|
||||
{
|
||||
setObjectName ( "libraryManager" );
|
||||
setAttribute ( Qt::WA_QuitOnClose, false );
|
||||
|
@ -100,10 +118,18 @@ namespace CRL {
|
|||
|
||||
_librariesWidget->initSelection();
|
||||
|
||||
AllianceFramework::get()->addObserver( &_frameworkObserver );
|
||||
|
||||
resize( Graphics::toHighDpi(750), Graphics::toHighDpi(550) );
|
||||
}
|
||||
|
||||
|
||||
LibraryManager::~LibraryManager ()
|
||||
{
|
||||
AllianceFramework::get()->removeObserver( &_frameworkObserver );
|
||||
}
|
||||
|
||||
|
||||
void LibraryManager::toggleShow ()
|
||||
{ setVisible( not isVisible() ); }
|
||||
|
||||
|
@ -139,5 +165,8 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
void LibraryManager::updateLibrary ( Cell* )
|
||||
{ _cellsWidget->updateLibrary(); }
|
||||
|
||||
|
||||
} // CRL namespace.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -60,7 +60,9 @@ namespace CRL {
|
|||
};
|
||||
|
||||
|
||||
inline const AllianceLibrary* CellsModel::getLibrary () const { return (const AllianceLibrary*)_ilibrary->first; }
|
||||
inline const AllianceLibrary* CellsModel::getLibrary () const
|
||||
{ return (_ilibrary != _libraries.end()) ? (const AllianceLibrary*)_ilibrary->first : NULL; }
|
||||
|
||||
inline const std::vector<CellDatas*>& CellsModel::getCellsDatas () const { return _ilibrary->second; }
|
||||
inline std::vector<CellDatas*>& CellsModel::getCellsDatas () { return _ilibrary->second; }
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -47,6 +47,7 @@ namespace CRL {
|
|||
void selectedCell ( CellDatas* );
|
||||
public slots:
|
||||
void updateSelected ();
|
||||
void updateLibrary ();
|
||||
void selectCurrent ( const QModelIndex& index, const QModelIndex& );
|
||||
void setLibrary ( const AllianceLibrary* );
|
||||
private:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -39,6 +39,7 @@ namespace CRL {
|
|||
QVariant headerData ( int section, Qt::Orientation orientation, int role=Qt::DisplayRole ) const;
|
||||
const AllianceLibrary* getLibrary ( const QModelIndex& );
|
||||
const AllianceLibrary* getLibrary ( size_t );
|
||||
void update ();
|
||||
private:
|
||||
const AllianceLibraries& _libraries;
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -36,12 +36,12 @@ namespace CRL {
|
|||
// -------------------------------------------------------------------
|
||||
// Class : "LibrariesWidget".
|
||||
|
||||
|
||||
class LibrariesWidget : public QWidget {
|
||||
Q_OBJECT;
|
||||
public:
|
||||
LibrariesWidget ( QWidget* parent=NULL );
|
||||
void initSelection ();
|
||||
void update ();
|
||||
signals:
|
||||
void selectedLibrary ( const AllianceLibrary* );
|
||||
public slots:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -18,6 +18,7 @@
|
|||
#define CRL_LIBRARY_MANAGER_H
|
||||
|
||||
#include <QWidget>
|
||||
#include "hurricane/Observer.h"
|
||||
|
||||
class QLabel;
|
||||
class QModelIndex;
|
||||
|
@ -34,10 +35,29 @@ namespace CRL {
|
|||
|
||||
using Hurricane::Cell;
|
||||
using Hurricane::CellViewer;
|
||||
using Hurricane::Observer;
|
||||
class AllianceLibrary;
|
||||
class ViewsWidget;
|
||||
class CellsWidget;
|
||||
class LibrariesWidget;
|
||||
class LibraryManager;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "FrameworkObserver".
|
||||
|
||||
class FrameworkObserver : public Observer<LibraryManager> {
|
||||
public:
|
||||
inline FrameworkObserver ( LibraryManager* );
|
||||
virtual void notify ( unsigned int flags );
|
||||
private:
|
||||
FrameworkObserver ( const FrameworkObserver& );
|
||||
};
|
||||
|
||||
|
||||
inline FrameworkObserver::FrameworkObserver ( LibraryManager* owner )
|
||||
: Observer<LibraryManager>(owner)
|
||||
{ }
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
@ -47,24 +67,29 @@ namespace CRL {
|
|||
class LibraryManager : public QWidget {
|
||||
Q_OBJECT;
|
||||
public:
|
||||
LibraryManager ( QWidget* parent=NULL );
|
||||
inline void setCellViewer ( CellViewer* );
|
||||
inline CellViewer* getCellViewer () const;
|
||||
public slots:
|
||||
void toggleShow ();
|
||||
void setLibrary ( const AllianceLibrary* library );
|
||||
CellViewer* openCell ( Cell*, unsigned int flags );
|
||||
LibraryManager ( QWidget* parent=NULL );
|
||||
~LibraryManager ();
|
||||
inline void setCellViewer ( CellViewer* );
|
||||
inline CellViewer* getCellViewer () const;
|
||||
inline LibrariesWidget* getLibrariesWidget () const;
|
||||
public slots:
|
||||
void toggleShow ();
|
||||
void setLibrary ( const AllianceLibrary* library );
|
||||
CellViewer* openCell ( Cell*, unsigned int flags );
|
||||
void updateLibrary ( Cell* );
|
||||
private:
|
||||
LibrariesWidget* _librariesWidget;
|
||||
CellsWidget* _cellsWidget;
|
||||
ViewsWidget* _viewsWidget;
|
||||
CellViewer* _cellViewer;
|
||||
QLabel* _libPath;
|
||||
FrameworkObserver _frameworkObserver;
|
||||
LibrariesWidget* _librariesWidget;
|
||||
CellsWidget* _cellsWidget;
|
||||
ViewsWidget* _viewsWidget;
|
||||
CellViewer* _cellViewer;
|
||||
QLabel* _libPath;
|
||||
};
|
||||
|
||||
|
||||
inline void LibraryManager::setCellViewer ( CellViewer* cw ) { _cellViewer=cw; }
|
||||
inline CellViewer* LibraryManager::getCellViewer () const { return _cellViewer; }
|
||||
inline void LibraryManager::setCellViewer ( CellViewer* cw ) { _cellViewer=cw; }
|
||||
inline CellViewer* LibraryManager::getCellViewer () const { return _cellViewer; }
|
||||
inline LibrariesWidget* LibraryManager::getLibrariesWidget () const { return _librariesWidget; }
|
||||
|
||||
|
||||
} // CRL namespace.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -13,36 +13,37 @@
|
|||
// | C++ Module : "./AllianceFramework.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <unistd.h>
|
||||
#include "vlsisapd/utilities/Path.h"
|
||||
#include "hurricane/Warning.h"
|
||||
#include "hurricane/Technology.h"
|
||||
#include "hurricane/DataBase.h"
|
||||
#include "hurricane/Library.h"
|
||||
#include "hurricane/Cell.h"
|
||||
#include "hurricane/Instance.h"
|
||||
#include "hurricane/viewer/Graphics.h"
|
||||
#include "crlcore/Utilities.h"
|
||||
#include "crlcore/GraphicsParser.h"
|
||||
#include "crlcore/SymbolicTechnologyParser.h"
|
||||
#include "crlcore/RealTechnologyParser.h"
|
||||
#include "crlcore/CellGauge.h"
|
||||
#include "crlcore/RoutingGauge.h"
|
||||
#include "crlcore/RoutingLayerGauge.h"
|
||||
#include "crlcore/AllianceFramework.h"
|
||||
|
||||
|
||||
|
||||
#include <unistd.h>
|
||||
#include "vlsisapd/utilities/Path.h"
|
||||
#include "hurricane/Initializer.h"
|
||||
#include "hurricane/Warning.h"
|
||||
#include "hurricane/DataBase.h"
|
||||
#include "hurricane/Technology.h"
|
||||
#include "hurricane/Library.h"
|
||||
#include "hurricane/Cell.h"
|
||||
#include "hurricane/Instance.h"
|
||||
#include "hurricane/viewer/Graphics.h"
|
||||
#include "crlcore/Utilities.h"
|
||||
#include "crlcore/GraphicsParser.h"
|
||||
#include "crlcore/SymbolicTechnologyParser.h"
|
||||
#include "crlcore/RealTechnologyParser.h"
|
||||
#include "crlcore/CellGauge.h"
|
||||
#include "crlcore/RoutingGauge.h"
|
||||
#include "crlcore/RoutingLayerGauge.h"
|
||||
#include "crlcore/AllianceFramework.h"
|
||||
|
||||
|
||||
namespace CRL {
|
||||
|
||||
|
||||
using namespace std::placeholders;
|
||||
using Hurricane::Initializer;
|
||||
using Hurricane::JsonTypes;
|
||||
using Hurricane::JsonArray;
|
||||
using Hurricane::Warning;
|
||||
using Hurricane::tab;
|
||||
using Hurricane::Graphics;
|
||||
using Hurricane::ForEachIterator;
|
||||
using Hurricane::getCollection;
|
||||
using Hurricane::Instance;
|
||||
using Hurricane::PrivateProperty;
|
||||
|
||||
|
@ -57,6 +58,8 @@ namespace CRL {
|
|||
static Name getPropertyName ();
|
||||
virtual Name getName () const;
|
||||
inline AllianceFramework* getFramework () const;
|
||||
virtual bool hasJson () const;
|
||||
virtual void toJson ( JsonWriter*, const DBo* ) const;
|
||||
virtual string _getTypeName () const;
|
||||
virtual Record* _getRecord () const;
|
||||
private:
|
||||
|
@ -64,10 +67,19 @@ namespace CRL {
|
|||
AllianceFramework* _framework;
|
||||
private:
|
||||
inline AllianceFrameworkProperty ( AllianceFramework* );
|
||||
public:
|
||||
class JsonProperty : public JsonObject {
|
||||
public:
|
||||
static void initialize ();
|
||||
JsonProperty ( unsigned long flags );
|
||||
virtual string getTypeName () const;
|
||||
virtual JsonProperty* clone ( unsigned long ) const;
|
||||
virtual void toData ( JsonStack& );
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Name AllianceFrameworkProperty::_name = "AllianceFramework";
|
||||
Name AllianceFrameworkProperty::_name = "AllianceFrameworkProperty";
|
||||
|
||||
|
||||
inline AllianceFrameworkProperty::AllianceFrameworkProperty ( AllianceFramework* af )
|
||||
|
@ -111,6 +123,56 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
bool AllianceFrameworkProperty::hasJson () const
|
||||
{ return true; }
|
||||
|
||||
|
||||
void AllianceFrameworkProperty::toJson ( JsonWriter* w, const DBo* ) const
|
||||
{
|
||||
w->startObject();
|
||||
std::string tname = getString(getPropertyName());
|
||||
jsonWrite( w, "@typename" , tname );
|
||||
jsonWrite( w, "_framework", _framework );
|
||||
w->endObject();
|
||||
}
|
||||
|
||||
|
||||
Initializer<AllianceFrameworkProperty::JsonProperty> jsonFrameworkPropertyInit ( 20 );
|
||||
|
||||
|
||||
AllianceFrameworkProperty::JsonProperty::JsonProperty ( unsigned long flags )
|
||||
: JsonObject(flags)
|
||||
{
|
||||
add( "_framework", typeid(AllianceFramework*) );
|
||||
}
|
||||
|
||||
|
||||
string AllianceFrameworkProperty::JsonProperty::getTypeName () const
|
||||
{ return getString(AllianceFrameworkProperty::getPropertyName()); }
|
||||
|
||||
|
||||
void AllianceFrameworkProperty::JsonProperty::initialize ()
|
||||
{ JsonTypes::registerType( new JsonProperty (JsonWriter::RegisterMode) ); }
|
||||
|
||||
|
||||
AllianceFrameworkProperty::JsonProperty* AllianceFrameworkProperty::JsonProperty::clone ( unsigned long flags ) const
|
||||
{ return new JsonProperty ( flags ); }
|
||||
|
||||
|
||||
void AllianceFrameworkProperty::JsonProperty::toData ( JsonStack& stack )
|
||||
{
|
||||
check( stack, "AllianceFrameworkProperty::JsonProperty::toData" );
|
||||
|
||||
DBo* dbo = stack.back_dbo();
|
||||
AllianceFramework* framework = get<AllianceFramework*>(stack,"_framework");
|
||||
AllianceFrameworkProperty* property
|
||||
= AllianceFrameworkProperty::create(framework);
|
||||
if (dbo) dbo->put( property );
|
||||
|
||||
update( stack, property );
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "CRL::AllianceFramework".
|
||||
|
||||
|
@ -121,18 +183,23 @@ namespace CRL {
|
|||
|
||||
|
||||
AllianceFramework::AllianceFramework ()
|
||||
: _environment()
|
||||
, _parsers()
|
||||
, _drivers()
|
||||
, _catalog()
|
||||
, _parentLibrary(NULL)
|
||||
, _routingGauges()
|
||||
: _observers ()
|
||||
, _environment ()
|
||||
, _parsers ()
|
||||
, _drivers ()
|
||||
, _catalog ()
|
||||
, _parentLibrary (NULL)
|
||||
, _routingGauges ()
|
||||
, _defaultRoutingGauge(NULL)
|
||||
, _cellGauges ()
|
||||
, _defaultCellGauge (NULL)
|
||||
{
|
||||
DataBase* db = DataBase::getDB ();
|
||||
if ( not db )
|
||||
db = DataBase::create ();
|
||||
|
||||
db->put ( AllianceFrameworkProperty::create(this) );
|
||||
db->_setCellLoader( bind(&AllianceFramework::cellLoader,this,_1) );
|
||||
|
||||
//cmess1 << " o Reading Alliance Environment." << endl;
|
||||
|
||||
|
@ -176,7 +243,7 @@ namespace CRL {
|
|||
void AllianceFramework::_bindLibraries ()
|
||||
{
|
||||
DataBase* db = DataBase::getDB ();
|
||||
unsigned int flags = InSearchPath;
|
||||
unsigned int flags = AppendLibrary;
|
||||
SearchPath& LIBRARIES = _environment.getLIBRARIES ();
|
||||
Library* rootLibrary = db->getRootLibrary ();
|
||||
|
||||
|
@ -192,7 +259,8 @@ namespace CRL {
|
|||
for ( unsigned i=0 ; i<LIBRARIES.getSize() ; i++ ) {
|
||||
createLibrary ( LIBRARIES[i].getPath(), flags, LIBRARIES[i].getName() );
|
||||
|
||||
//cmess2 << " - \"" << LIBRARIES[i].getPath() << "\"";
|
||||
//cmess2 << " - " << LIBRARIES[i].getName()
|
||||
// << " \"" << LIBRARIES[i].getPath() << "\"" << endl;
|
||||
//cmess2.flush();
|
||||
|
||||
//if ( flags&HasCatalog ) cmess2 << " [have CATAL]." << endl;
|
||||
|
@ -201,13 +269,14 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
AllianceFramework* AllianceFramework::create ()
|
||||
AllianceFramework* AllianceFramework::create ( unsigned long flags )
|
||||
{
|
||||
if ( !_singleton ) {
|
||||
if (not _singleton) {
|
||||
// Triggers System singleton creation.
|
||||
System::get ();
|
||||
_singleton = new AllianceFramework ();
|
||||
System::runPythonInit();
|
||||
if (not (flags & NoPythonInit))
|
||||
System::runPythonInit();
|
||||
_singleton->_bindLibraries();
|
||||
}
|
||||
|
||||
|
@ -217,7 +286,7 @@ namespace CRL {
|
|||
|
||||
AllianceFramework* AllianceFramework::get ()
|
||||
{
|
||||
return create ();
|
||||
return create();
|
||||
}
|
||||
|
||||
|
||||
|
@ -233,6 +302,18 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
void AllianceFramework::addObserver ( BaseObserver* observer )
|
||||
{ _observers.addObserver( observer ); }
|
||||
|
||||
|
||||
void AllianceFramework::removeObserver ( BaseObserver* observer )
|
||||
{ _observers.removeObserver( observer ); }
|
||||
|
||||
|
||||
void AllianceFramework::notify ( unsigned flags )
|
||||
{ _observers.notify( flags ); }
|
||||
|
||||
|
||||
AllianceLibrary* AllianceFramework::getAllianceLibrary ( unsigned index )
|
||||
{
|
||||
if ( index >= _libraries.size() )
|
||||
|
@ -242,7 +323,7 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
AllianceLibrary* AllianceFramework::getAllianceLibrary ( const Name &libName, unsigned int& flags )
|
||||
AllianceLibrary* AllianceFramework::getAllianceLibrary ( const Name &libName, unsigned int flags )
|
||||
{
|
||||
for ( size_t ilib=0 ; ilib<_libraries.size() ; ++ilib ) {
|
||||
if ( _libraries[ilib]->getLibrary()->getName() == libName )
|
||||
|
@ -262,6 +343,15 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
Cell* AllianceFramework::cellLoader ( const string& rpath )
|
||||
{
|
||||
size_t dot = rpath.rfind('.');
|
||||
string cellName = rpath.substr(dot+1);
|
||||
|
||||
return getCell( cellName, Catalog::State::Views );
|
||||
}
|
||||
|
||||
|
||||
Cell* AllianceFramework::getCell ( const string& name, unsigned int mode, unsigned int depth )
|
||||
{
|
||||
bool createCell = false;
|
||||
|
@ -325,7 +415,7 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
AllianceLibrary* AllianceFramework::createLibrary ( const string& path, unsigned int& flags, string libName )
|
||||
AllianceLibrary* AllianceFramework::createLibrary ( const string& path, unsigned int flags, string libName )
|
||||
{
|
||||
if ( libName.empty() ) libName = SearchPath::extractLibName(path);
|
||||
|
||||
|
@ -333,7 +423,7 @@ namespace CRL {
|
|||
|
||||
string dupLibName = libName;
|
||||
for ( size_t duplicate=1 ; true ; ++duplicate ) {
|
||||
AllianceLibrary* library = getAllianceLibrary ( dupLibName, flags );
|
||||
AllianceLibrary* library = getAllianceLibrary ( dupLibName, flags & ~CreateLibrary );
|
||||
if (library == NULL) break;
|
||||
|
||||
ostringstream oss;
|
||||
|
@ -349,31 +439,42 @@ namespace CRL {
|
|||
// }
|
||||
|
||||
SearchPath& LIBRARIES = _environment.getLIBRARIES ();
|
||||
if ( not (flags & InSearchPath) ) LIBRARIES.prepend ( path, dupLibName );
|
||||
else LIBRARIES.select ( path );
|
||||
if ( not (flags & AppendLibrary) ) LIBRARIES.prepend ( path, dupLibName );
|
||||
else LIBRARIES.select ( path );
|
||||
|
||||
AllianceLibrary* library = new AllianceLibrary ( path, Library::create(getParentLibrary(),dupLibName) );
|
||||
Library* hlibrary = getParentLibrary()->getLibrary( dupLibName );
|
||||
if (not hlibrary)
|
||||
hlibrary = Library::create( getParentLibrary(), dupLibName );
|
||||
|
||||
AllianceLibrary* alibrary = new AllianceLibrary ( path, hlibrary );
|
||||
|
||||
AllianceLibraries::iterator ilib = _libraries.begin();
|
||||
for ( size_t i=0 ; i<LIBRARIES.getIndex() ; ++i, ++ilib );
|
||||
if (LIBRARIES.getIndex() != SearchPath::npos)
|
||||
for ( size_t i=0 ; i<LIBRARIES.getIndex() ; ++i, ++ilib );
|
||||
else
|
||||
ilib = _libraries.end();
|
||||
|
||||
_libraries.insert ( ilib, library );
|
||||
_libraries.insert ( ilib, alibrary );
|
||||
|
||||
string catalog = path + "/" + _environment.getCATALOG();
|
||||
|
||||
if ( _catalog.loadFromFile(catalog,library->getLibrary()) ) flags |= HasCatalog;
|
||||
if ( _catalog.loadFromFile(catalog,alibrary->getLibrary()) ) flags |= HasCatalog;
|
||||
|
||||
ParserFormatSlot& parser = _parsers.getParserSlot ( path, Catalog::State::Physical, _environment );
|
||||
|
||||
if ( not parser.loadByLib() ) return library;
|
||||
if ( not parser.loadByLib() ) {
|
||||
notify ( AddedLibrary );
|
||||
return alibrary;
|
||||
}
|
||||
|
||||
// Load the whole library.
|
||||
if ( ! _readLocate(dupLibName,Catalog::State::State::Logical,true) ) return library;
|
||||
if ( ! _readLocate(dupLibName,Catalog::State::State::Logical,true) ) return alibrary;
|
||||
|
||||
// Call the parser function.
|
||||
(parser.getParsLib())( _environment.getLIBRARIES().getSelected() , library->getLibrary() , _catalog );
|
||||
(parser.getParsLib())( _environment.getLIBRARIES().getSelected() , alibrary->getLibrary() , _catalog );
|
||||
|
||||
return library;
|
||||
notify ( AddedLibrary );
|
||||
return alibrary;
|
||||
}
|
||||
|
||||
|
||||
|
@ -474,6 +575,17 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
Library* AllianceFramework::getLibrary ( const Name &libName )
|
||||
{
|
||||
for ( size_t ilib=0 ; ilib<_libraries.size() ; ++ilib ) {
|
||||
if ( _libraries[ilib]->getLibrary()->getName() == libName )
|
||||
return _libraries[ilib]->getLibrary();
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
unsigned int AllianceFramework::loadLibraryCells ( Library *library )
|
||||
{
|
||||
cmess2 << " " << tab++ << "+ Library: " << getString(library->getName()) << endl;
|
||||
|
@ -564,6 +676,18 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
RoutingGauge* AllianceFramework::setRoutingGauge ( const Name& name )
|
||||
{
|
||||
RoutingGauge* gauge = getRoutingGauge( name );
|
||||
if (gauge) _defaultRoutingGauge = gauge;
|
||||
else
|
||||
cerr << Error( "AllianceFramework::setRoutingGauge(): No gauge named \"%s\"."
|
||||
, getString(name).c_str() ) << endl;
|
||||
|
||||
return _defaultRoutingGauge;
|
||||
}
|
||||
|
||||
|
||||
RoutingGauge* AllianceFramework::getRoutingGauge ( const Name& name )
|
||||
{
|
||||
if ( name.isEmpty() ) return _defaultRoutingGauge;
|
||||
|
@ -595,6 +719,18 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
CellGauge* AllianceFramework::setCellGauge ( const Name& name )
|
||||
{
|
||||
CellGauge* gauge = getCellGauge( name );
|
||||
if (gauge) _defaultCellGauge = gauge;
|
||||
else
|
||||
cerr << Error( "AllianceFramework::setCellGauge(): No gauge named \"%s\"."
|
||||
, getString(name).c_str() ) << endl;
|
||||
|
||||
return _defaultCellGauge;
|
||||
}
|
||||
|
||||
|
||||
CellGauge* AllianceFramework::getCellGauge ( const Name& name )
|
||||
{
|
||||
if ( name.isEmpty() ) return _defaultCellGauge;
|
||||
|
@ -656,15 +792,83 @@ namespace CRL {
|
|||
Record *AllianceFramework::_getRecord () const
|
||||
{
|
||||
Record* record = new Record ( "<AllianceFramework>" );
|
||||
record->add ( getSlot ( "_environment" , &_environment ) );
|
||||
record->add ( getSlot ( "_libraries" , &_libraries ) );
|
||||
record->add ( getSlot ( "_catalog" , &_catalog ) );
|
||||
record->add ( getSlot ( "_defaultRroutingGauge", _defaultRoutingGauge ) );
|
||||
record->add ( getSlot ( "_routingGauges" , _routingGauges ) );
|
||||
record->add ( getSlot ( "_defaultCellGauge" , _defaultCellGauge ) );
|
||||
record->add ( getSlot ( "_cellGauges" , _cellGauges ) );
|
||||
record->add ( getSlot ( "_environment" , &_environment ) );
|
||||
record->add ( getSlot ( "_libraries" , &_libraries ) );
|
||||
record->add ( getSlot ( "_catalog" , &_catalog ) );
|
||||
record->add ( getSlot ( "_defaultRoutingGauge", _defaultRoutingGauge ) );
|
||||
record->add ( getSlot ( "_routingGauges" , _routingGauges ) );
|
||||
record->add ( getSlot ( "_defaultCellGauge" , _defaultCellGauge ) );
|
||||
record->add ( getSlot ( "_cellGauges" , _cellGauges ) );
|
||||
return record;
|
||||
}
|
||||
|
||||
|
||||
void AllianceFramework::toJson ( JsonWriter* w ) const
|
||||
{
|
||||
w->startObject();
|
||||
jsonWrite( w, "@typename" , _getTypeName() );
|
||||
jsonWrite( w, "_environment" , &_environment );
|
||||
jsonWrite( w, "_defaultRoutingGauge", _defaultRoutingGauge->getName() );
|
||||
jsonWrite( w, "_defaultCellGauge" , _defaultCellGauge->getName() );
|
||||
jsonWrite( w, "+libraries" , getAllianceLibraries() );
|
||||
jsonWrite( w, "+routingGauges" , _routingGauges );
|
||||
jsonWrite( w, "+cellGauges" , _cellGauges );
|
||||
w->endObject();
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "CRL::JsonAllianceFramework".
|
||||
|
||||
Initializer<JsonAllianceFramework> jsonFrameworkInit ( 20 );
|
||||
|
||||
|
||||
JsonAllianceFramework::JsonAllianceFramework ( unsigned long flags )
|
||||
: JsonObject (flags)
|
||||
, _defaultRoutingGauge()
|
||||
, _defaultCellGauge ()
|
||||
{
|
||||
add( "_environment" , typeid(Environment*) );
|
||||
add( "_defaultRoutingGauge", typeid(string) );
|
||||
add( "_defaultCellGauge" , typeid(string) );
|
||||
add( "+libraries" , typeid(JsonArray) );
|
||||
add( "+routingGauges" , typeid(JsonArray) );
|
||||
add( "+cellGauges" , typeid(JsonArray) );
|
||||
}
|
||||
|
||||
|
||||
JsonAllianceFramework::~JsonAllianceFramework ()
|
||||
{
|
||||
AllianceFramework* framework = AllianceFramework::get();
|
||||
framework->setRoutingGauge( _defaultRoutingGauge );
|
||||
framework->setCellGauge ( _defaultCellGauge );
|
||||
}
|
||||
|
||||
|
||||
string JsonAllianceFramework::getTypeName () const
|
||||
{ return "AllianceFramework"; }
|
||||
|
||||
|
||||
void JsonAllianceFramework::initialize ()
|
||||
{ JsonTypes::registerType( new JsonAllianceFramework (JsonWriter::RegisterMode) ); }
|
||||
|
||||
|
||||
JsonAllianceFramework* JsonAllianceFramework::clone ( unsigned long flags ) const
|
||||
{ return new JsonAllianceFramework ( flags ); }
|
||||
|
||||
|
||||
void JsonAllianceFramework::toData ( JsonStack& stack )
|
||||
{
|
||||
check( stack, "JsonAllianceFramework::toData" );
|
||||
|
||||
// It's a singleton. Do not create it...
|
||||
AllianceFramework* framework = AllianceFramework::get();
|
||||
|
||||
string _defaultRoutingGauge = get<string>( stack, "_defaultRoutingGauge" );
|
||||
string _defaultCellGauge = get<string>( stack, "_defaultCellGauge" );
|
||||
|
||||
update( stack, framework );
|
||||
}
|
||||
|
||||
|
||||
} // End of CRL namespace.
|
||||
|
|
|
@ -1,67 +1,39 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project is distributed in the hope that it will be
|
||||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | Alliance / Hurricane Interface |
|
||||
// | |
|
||||
// | Author : Rémy Escassut |
|
||||
// | E-mail : Remy.Escassut@silvaco.com |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./AllianceLibrary.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
# include "hurricane/Library.h"
|
||||
|
||||
# include "crlcore/Utilities.h"
|
||||
# include "crlcore/AllianceLibrary.h"
|
||||
// | C++ Module : "./AllianceLibrary.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include "hurricane/Warning.h"
|
||||
#include "hurricane/SharedPath.h"
|
||||
#include "hurricane/Library.h"
|
||||
#include "hurricane/DataBase.h"
|
||||
#include "crlcore/Utilities.h"
|
||||
#include "crlcore/AllianceLibrary.h"
|
||||
#include "crlcore/AllianceFramework.h"
|
||||
|
||||
|
||||
namespace CRL {
|
||||
|
||||
using namespace std;
|
||||
using Hurricane::tab;
|
||||
using Hurricane::Initializer;
|
||||
using Hurricane::JsonTypes;
|
||||
using Hurricane::Warning;
|
||||
using Hurricane::Name;
|
||||
using Hurricane::SharedPath;
|
||||
using Hurricane::DataBase;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "AllianceDirectory".
|
||||
|
@ -107,12 +79,99 @@ namespace CRL {
|
|||
Record* AllianceLibrary::_getRecord() const
|
||||
{
|
||||
Record* record = new Record ( getString(this) );
|
||||
record->add ( getSlot("Path" ,&_path ) );
|
||||
record->add ( getSlot("Library", _library) );
|
||||
record->add ( getSlot("_path" ,&_path ) );
|
||||
record->add ( getSlot("_library", _library) );
|
||||
return ( record );
|
||||
}
|
||||
|
||||
|
||||
void AllianceLibrary::toJson ( JsonWriter* w ) const
|
||||
{
|
||||
w->startObject();
|
||||
jsonWrite( w, "@typename", _getTypeName() );
|
||||
jsonWrite( w, "_path" , _path );
|
||||
jsonWrite( w, "_library" , _library->getHierarchicalName() );
|
||||
w->endObject();
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "JsonAllianceLibrary".
|
||||
|
||||
Initializer<JsonAllianceLibrary> jsonAllianceLibraryInit ( 0 );
|
||||
|
||||
|
||||
void JsonAllianceLibrary::initialize ()
|
||||
{ JsonTypes::registerType( new JsonAllianceLibrary (JsonWriter::RegisterMode) ); }
|
||||
|
||||
|
||||
JsonAllianceLibrary::JsonAllianceLibrary ( unsigned long flags )
|
||||
: JsonObject(flags)
|
||||
{
|
||||
add( "_path" , typeid(string) );
|
||||
add( "_library", typeid(string) );
|
||||
}
|
||||
|
||||
string JsonAllianceLibrary::getTypeName () const
|
||||
{ return "AllianceLibrary"; }
|
||||
|
||||
|
||||
JsonAllianceLibrary* JsonAllianceLibrary::clone ( unsigned long flags ) const
|
||||
{ return new JsonAllianceLibrary ( flags ); }
|
||||
|
||||
|
||||
void JsonAllianceLibrary::toData ( JsonStack& stack )
|
||||
{
|
||||
check( stack, "JsonAllianceLibrary::toData" );
|
||||
|
||||
string libDbPath = get<string>( stack, "_library" );
|
||||
string libOsPath = get<string>( stack, "_path" );
|
||||
|
||||
AllianceFramework* af = AllianceFramework::get();
|
||||
Library* library = DataBase::getDB()->getLibrary( libDbPath
|
||||
, DataBase::CreateLib|DataBase::WarnCreateLib );
|
||||
AllianceLibrary* aLibrary = NULL;
|
||||
|
||||
cdebug.log(19) << "| " << libDbPath << " : " << library << endl;
|
||||
|
||||
if (library) {
|
||||
aLibrary = af->getAllianceLibrary( library );
|
||||
}
|
||||
if (not aLibrary) {
|
||||
char separator = SharedPath::getNameSeparator();
|
||||
size_t dot = libDbPath.rfind( separator );
|
||||
Name libName = libDbPath.substr(dot+1);
|
||||
aLibrary = af->getAllianceLibrary( libName, AllianceFramework::AppendLibrary );
|
||||
|
||||
if (not aLibrary) {
|
||||
aLibrary = af->getAllianceLibrary( libOsPath
|
||||
, AllianceFramework::CreateLibrary
|
||||
| AllianceFramework::AppendLibrary );
|
||||
}
|
||||
if (not library) library = aLibrary->getLibrary();
|
||||
}
|
||||
|
||||
cdebug.log(19) << "| Associates to: " << aLibrary << endl;
|
||||
|
||||
if (aLibrary->getLibrary() != library) {
|
||||
cerr << Warning( "JsonAllianceLibrary::toData(): Underlying Hurricane Library discrepency for \"%s\".\n"
|
||||
" (may be caused by a change in search path order)"
|
||||
, getString(library->getName()).c_str()
|
||||
) << endl;
|
||||
}
|
||||
if (aLibrary->getPath() != Name(libOsPath)) {
|
||||
cerr << Warning( "JsonAllianceLibrary::toData(): Underlying OS path discrepency for \"%s\":\n"
|
||||
" - Blob: %s\n"
|
||||
" - System: %s"
|
||||
, getString(library->getName()).c_str()
|
||||
, libOsPath.c_str()
|
||||
, getString(aLibrary->getPath()).c_str()
|
||||
) << endl;
|
||||
}
|
||||
|
||||
update( stack, aLibrary );
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // End of CRL namespace.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -17,17 +17,26 @@
|
|||
# include <iomanip>
|
||||
using namespace std;
|
||||
|
||||
#include "hurricane/Initializer.h"
|
||||
#include "hurricane/SharedPath.h"
|
||||
#include "hurricane/Collection.h"
|
||||
#include "hurricane/DataBase.h"
|
||||
#include "hurricane/Library.h"
|
||||
#include "hurricane/Name.h"
|
||||
#include "crlcore/Utilities.h"
|
||||
#include "crlcore/Catalog.h"
|
||||
#include "crlcore/AllianceFramework.h"
|
||||
|
||||
|
||||
namespace CRL {
|
||||
|
||||
using Hurricane::tab;
|
||||
using Hurricane::Initializer;
|
||||
using Hurricane::JsonTypes;
|
||||
using Hurricane::SharedPath;
|
||||
using Hurricane::DataBase;
|
||||
|
||||
const char* MissingStateProperty = "%s:\n\n Missing Catalog State Property in cell \"%s\".\n";
|
||||
const char* MissingStateProperty = "%s:\n\n Missing Catalog State Property in cell \"%s\".\n";
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
@ -41,6 +50,17 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
Cell* Catalog::State::setCell ( Cell* cell )
|
||||
{
|
||||
_cell = cell;
|
||||
if (_cell) {
|
||||
if (isPad ()) _cell->setPad ( true );
|
||||
if (isFeed()) _cell->setFeed( true );
|
||||
}
|
||||
return _cell;
|
||||
}
|
||||
|
||||
|
||||
void Catalog::State::merge ( const State& other )
|
||||
{
|
||||
if ( (_cell ==NULL) && other._cell ) _cell = other._cell;
|
||||
|
@ -79,6 +99,80 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
void Catalog::State::toJson ( JsonWriter* w ) const
|
||||
{
|
||||
w->startObject();
|
||||
jsonWrite( w, "@typename", _getTypeName() );
|
||||
jsonWrite( w, "_flags" , _getString() );
|
||||
jsonWrite( w, "_depth" , _depth );
|
||||
|
||||
string cellName = "";
|
||||
if (_cell) cellName = getString( _cell->getHierarchicalName() );
|
||||
jsonWrite( w, "_cell", cellName );
|
||||
w->endObject();
|
||||
}
|
||||
|
||||
|
||||
Initializer<Catalog::State::JsonState> jsonCatalogStateInit ( 20 );
|
||||
|
||||
|
||||
Catalog::State::JsonState::JsonState ( unsigned long flags )
|
||||
: JsonObject(flags)
|
||||
{
|
||||
add( "_flags", typeid(string) );
|
||||
add( "_depth", typeid(int64_t) );
|
||||
add( "_cell" , typeid(string) );
|
||||
}
|
||||
|
||||
|
||||
string Catalog::State::JsonState::getTypeName () const
|
||||
{ return "Catalog::State"; }
|
||||
|
||||
|
||||
void Catalog::State::JsonState::initialize ()
|
||||
{ JsonTypes::registerType( new JsonState (JsonWriter::RegisterMode) ); }
|
||||
|
||||
|
||||
Catalog::State::JsonState* Catalog::State::JsonState::clone ( unsigned long flags ) const
|
||||
{ return new JsonState ( flags ); }
|
||||
|
||||
|
||||
void Catalog::State::JsonState::toData ( JsonStack& stack )
|
||||
{
|
||||
check( stack, "Catalog::State::JsonState::toData" );
|
||||
|
||||
string cellPath = get<string> ( stack, "_cell" );
|
||||
string sflags = get<string> ( stack, "_flags" );
|
||||
unsigned int depth = get<int64_t>( stack, "_depth" );
|
||||
|
||||
char separator = SharedPath::getNameSeparator();
|
||||
size_t dot = cellPath.rfind( separator );
|
||||
string cellName = cellPath.substr(dot+1);
|
||||
string libraryName = cellPath.substr(0,dot);
|
||||
|
||||
Library* library = DataBase::getDB()->getLibrary( libraryName
|
||||
, DataBase::CreateLib|DataBase::WarnCreateLib );
|
||||
Cell* cell = library->getCell( cellName );
|
||||
|
||||
Catalog* catalog = AllianceFramework::get()->getCatalog();
|
||||
Catalog::State* state = catalog->getState( cellName );
|
||||
|
||||
if (not state) state = catalog->getState( cellName, true );
|
||||
if (state->getCell () != cell ) state->setCell ( cell );
|
||||
if (state->getLibrary() != library) state->setLibrary( library );
|
||||
|
||||
state->setDepth( depth );
|
||||
state->setFlattenLeaf( (sflags[0] == 'C') );
|
||||
state->setFeed( (sflags[1] == 'F') );
|
||||
state->setPad( (sflags[2] == 'P') );
|
||||
state->setGds( (sflags[3] == 'G') );
|
||||
state->setDelete( (sflags[4] == 'D') );
|
||||
state->setInMemory( (sflags[5] == 'm') );
|
||||
|
||||
update( stack, state );
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Catalog".
|
||||
|
||||
|
@ -238,8 +332,7 @@ namespace CRL {
|
|||
// -------------------------------------------------------------------
|
||||
// Class : "CatalogProperty"
|
||||
|
||||
|
||||
Name CatalogProperty::_name = "Alliance Catalog State";
|
||||
Name CatalogProperty::_name = "Catalog::State::Property";
|
||||
|
||||
|
||||
CatalogProperty* CatalogProperty::create ( Catalog::State* state )
|
||||
|
@ -296,6 +389,76 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
bool CatalogProperty::hasJson () const
|
||||
{ return true; }
|
||||
|
||||
|
||||
void CatalogProperty::toJson ( JsonWriter* w, const DBo* ) const
|
||||
{
|
||||
w->startObject();
|
||||
std::string tname = getString(getPropertyName());
|
||||
jsonWrite( w, "@typename", tname );
|
||||
jsonWrite( w, "_state" , _state );
|
||||
w->endObject();
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "JsonCatalogProperty"
|
||||
|
||||
Initializer<JsonCatalogProperty> jsonCatalogPropertyInit ( 20 );
|
||||
|
||||
|
||||
JsonCatalogProperty::JsonCatalogProperty ( unsigned long flags )
|
||||
: JsonObject(flags)
|
||||
{
|
||||
add( "_state", typeid(Catalog::State*) );
|
||||
}
|
||||
|
||||
|
||||
string JsonCatalogProperty::getTypeName () const
|
||||
{ return getString(CatalogProperty::getPropertyName()); }
|
||||
|
||||
|
||||
void JsonCatalogProperty::initialize ()
|
||||
{ JsonTypes::registerType( new JsonCatalogProperty (JsonWriter::RegisterMode) ); }
|
||||
|
||||
|
||||
JsonCatalogProperty* JsonCatalogProperty::clone ( unsigned long flags ) const
|
||||
{ return new JsonCatalogProperty ( flags ); }
|
||||
|
||||
|
||||
void JsonCatalogProperty::toData ( JsonStack& stack )
|
||||
{
|
||||
check( stack, "JsonCatalogProperty::toData" );
|
||||
|
||||
DBo* dbo = stack.back_dbo();
|
||||
Catalog::State* state = get<Catalog::State*>( stack, "_state" );
|
||||
CatalogProperty* property = NULL;
|
||||
|
||||
cdebug.log(19) << "topDBo:" << dbo << endl;
|
||||
|
||||
Cell* cell = dynamic_cast<Cell*>( dbo );
|
||||
if (cell) {
|
||||
Property* base = cell->getProperty( CatalogProperty::getPropertyName() );
|
||||
if (base) {
|
||||
property = static_cast<CatalogProperty*>( base );
|
||||
if (property->getState() != state) {
|
||||
cerr << Error( "JsonCatalogProperty::toData(): State object incoherency on Cell \"%s\"."
|
||||
, getString(cell->getName()).c_str()
|
||||
) << endl;
|
||||
}
|
||||
} else {
|
||||
property = CatalogProperty::create( state );
|
||||
cell->put( property );
|
||||
}
|
||||
}
|
||||
// NULL Cell means we are parsing the Catalog.
|
||||
|
||||
update( stack, property );
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "CatalogExtension"
|
||||
|
||||
|
|
|
@ -1,16 +1,9 @@
|
|||
|
||||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | Alliance / Hurricane Interface |
|
||||
// | |
|
||||
|
@ -18,24 +11,16 @@
|
|||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./CellGauge.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "crlcore/CellGauge.h"
|
||||
|
||||
|
||||
#include "crlcore/AllianceFramework.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
// const char *missingMandatoryAttr =
|
||||
// "CRoutingGauge::createFromXml () :\n\n"
|
||||
// " Can't found mandatory attribute \"%s\".\n";
|
||||
|
@ -57,19 +42,18 @@ namespace {
|
|||
// "::createCellGaugeFromXml () :\n\n"
|
||||
// " cellgauge name tag attribute is empty.\n";
|
||||
|
||||
|
||||
} // End of Anonymous namespace.
|
||||
|
||||
|
||||
} // Anonymous namespace.
|
||||
|
||||
|
||||
namespace CRL {
|
||||
|
||||
using namespace std;
|
||||
using Hurricane::JsonTypes;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "CRL::CellGauge".
|
||||
|
||||
|
||||
CellGauge::CellGauge ( const char* name
|
||||
, const char* pinLayerName
|
||||
, const DbU::Unit pitch
|
||||
|
@ -151,4 +135,84 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
void CellGauge::toJson ( JsonWriter* w ) const
|
||||
{
|
||||
w->startObject();
|
||||
jsonWrite( w, "@typename" , "CellGauge" );
|
||||
jsonWrite( w, "_name" , _name );
|
||||
jsonWrite( w, "_pinLayerName", _pinLayerName );
|
||||
jsonWrite( w, "_pitch" , _pitch );
|
||||
jsonWrite( w, "_sliceHeight" , _sliceHeight );
|
||||
jsonWrite( w, "_sliceStep" , _sliceStep );
|
||||
w->endObject();
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "JsonCellGauge"
|
||||
|
||||
Initializer<JsonCellGauge> jsonCellGaugeInit ( 0 );
|
||||
|
||||
|
||||
void JsonCellGauge::initialize ()
|
||||
{ JsonTypes::registerType( new JsonCellGauge (JsonWriter::RegisterMode) ); }
|
||||
|
||||
|
||||
JsonCellGauge::JsonCellGauge( unsigned long flags )
|
||||
: JsonObject(flags)
|
||||
{
|
||||
add( "_name" , typeid(string) );
|
||||
add( "_pinLayerName", typeid(string) );
|
||||
add( "_pitch" , typeid(int64_t) );
|
||||
add( "_sliceHeight" , typeid(int64_t) );
|
||||
add( "_sliceStep" , typeid(int64_t) );
|
||||
}
|
||||
|
||||
|
||||
string JsonCellGauge::getTypeName () const
|
||||
{ return "CellGauge"; }
|
||||
|
||||
|
||||
JsonCellGauge* JsonCellGauge::clone ( unsigned long flags ) const
|
||||
{ return new JsonCellGauge ( flags ); }
|
||||
|
||||
|
||||
void JsonCellGauge::toData ( JsonStack& stack )
|
||||
{
|
||||
check( stack, "JsonCellGauge::toData" );
|
||||
|
||||
AllianceFramework* af = get<AllianceFramework*>( stack, "_framework" );
|
||||
CellGauge* cg = NULL;
|
||||
string name = get<string> ( stack, "_name" );
|
||||
string pinLayerName = get<string> ( stack, "_pinLayerName" );
|
||||
DbU::Unit pitch = get<int64_t>( stack, "_pitch" );
|
||||
DbU::Unit sliceHeight = get<int64_t>( stack, "_sliceHeight" );
|
||||
DbU::Unit sliceStep = get<int64_t>( stack, "_sliceStep" );
|
||||
|
||||
if (stack.issetFlags(JsonWriter::TechnoMode)) {
|
||||
if (af) {
|
||||
if (not name.empty()) {
|
||||
cg = CellGauge::create( name.c_str()
|
||||
, pinLayerName.c_str()
|
||||
, pitch
|
||||
, sliceHeight
|
||||
, sliceStep
|
||||
);
|
||||
af->addCellGauge( cg );
|
||||
}
|
||||
} else {
|
||||
cerr << Error( "JsonCellGauge::toData(): Missing \"_framework\" in stack context." ) << endl;
|
||||
}
|
||||
} else {
|
||||
if (af) {
|
||||
cg = af->getCellGauge( name );
|
||||
}
|
||||
}
|
||||
|
||||
update( stack, cg );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // End of CRL namespace.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -22,6 +22,7 @@
|
|||
#include "crlcore/Utilities.h"
|
||||
#include "crlcore/XmlParser.h"
|
||||
#include "crlcore/Environment.h"
|
||||
#include "crlcore/AllianceFramework.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
@ -505,6 +506,12 @@ namespace {
|
|||
|
||||
namespace CRL {
|
||||
|
||||
using Hurricane::Initializer;
|
||||
using Hurricane::JsonTypes;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Environment".
|
||||
|
||||
Environment::Environment ()
|
||||
: _CORIOLIS_TOP (CORIOLIS_TOP)
|
||||
|
@ -523,7 +530,7 @@ namespace CRL {
|
|||
setBLOCKAGE ( "^obs$" );
|
||||
setPad ( "^.*_px$" );
|
||||
|
||||
_LIBRARIES.append ( "." );
|
||||
_LIBRARIES.append ( ".", "working" );
|
||||
|
||||
_inConstructor = false;
|
||||
}
|
||||
|
@ -753,4 +760,83 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
void Environment::toJson ( JsonWriter* w ) const
|
||||
{
|
||||
w->startObject();
|
||||
jsonWrite( w, "@typename" , _getTypeName() );
|
||||
jsonWrite( w, "_CORIOLIS_TOP", _CORIOLIS_TOP );
|
||||
jsonWrite( w, "_displayStyle", _displayStyle );
|
||||
jsonWrite( w, "_SCALE_X" , _SCALE_X );
|
||||
jsonWrite( w, "_IN_LO" , _IN_LO );
|
||||
jsonWrite( w, "_IN_PH" , _IN_PH );
|
||||
jsonWrite( w, "_OUT_LO" , _OUT_LO );
|
||||
jsonWrite( w, "_OUT_PH" , _OUT_PH );
|
||||
jsonWrite( w, "_POWER" , _POWER );
|
||||
jsonWrite( w, "_GROUND" , _GROUND );
|
||||
jsonWrite( w, "_CLOCK" , _CLOCK );
|
||||
jsonWrite( w, "_BLOCKAGE" , _BLOCKAGE );
|
||||
jsonWrite( w, "_pad" , _pad );
|
||||
jsonWrite( w, "_CATALOG" , _CATALOG );
|
||||
w->endObject();
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "JsonEnvironment".
|
||||
|
||||
Initializer<JsonEnvironment> jsonEnvironmentInit ( 0 );
|
||||
|
||||
|
||||
void JsonEnvironment::initialize ()
|
||||
{ JsonTypes::registerType( new JsonEnvironment (JsonWriter::RegisterMode) ); }
|
||||
|
||||
|
||||
JsonEnvironment::JsonEnvironment ( unsigned long flags )
|
||||
: JsonObject(flags)
|
||||
{
|
||||
add( "_CORIOLIS_TOP", typeid(string) );
|
||||
add( "_displayStyle", typeid(string) );
|
||||
add( "_SCALE_X" , typeid(int64_t) );
|
||||
add( "_IN_LO" , typeid(string) );
|
||||
add( "_IN_PH" , typeid(string) );
|
||||
add( "_OUT_LO" , typeid(string) );
|
||||
add( "_OUT_PH" , typeid(string) );
|
||||
add( "_POWER" , typeid(string) );
|
||||
add( "_GROUND" , typeid(string) );
|
||||
add( "_BLOCKAGE" , typeid(string) );
|
||||
add( "_pad" , typeid(string) );
|
||||
add( "_CATALOG" , typeid(string) );
|
||||
add( "_CLOCK" , typeid(string) );
|
||||
}
|
||||
|
||||
string JsonEnvironment::getTypeName () const
|
||||
{ return "Environment"; }
|
||||
|
||||
|
||||
JsonEnvironment* JsonEnvironment::clone ( unsigned long flags ) const
|
||||
{ return new JsonEnvironment ( flags ); }
|
||||
|
||||
|
||||
void JsonEnvironment::toData ( JsonStack& stack )
|
||||
{
|
||||
check( stack, "JsonEnvironment::toData" );
|
||||
|
||||
Environment* environement = AllianceFramework::get()->getEnvironment();
|
||||
environement->setDisplayStyle( get<string> (stack,"_displayStyle").c_str() );
|
||||
environement->setSCALE_X ( get<int64_t>(stack,"_SCALE_X" ) );
|
||||
environement->setIN_LO ( get<string> (stack,"_IN_LO" ).c_str() );
|
||||
environement->setIN_PH ( get<string> (stack,"_IN_PH" ).c_str() );
|
||||
environement->setOUT_LO ( get<string> (stack,"_OUT_LO" ).c_str() );
|
||||
environement->setOUT_PH ( get<string> (stack,"_OUT_PH" ).c_str() );
|
||||
environement->setPOWER ( get<string> (stack,"_POWER" ).c_str() );
|
||||
environement->setGROUND ( get<string> (stack,"_GROUND" ).c_str() );
|
||||
environement->setCLOCK ( get<string> (stack,"_CLOCK" ).c_str() );
|
||||
environement->setBLOCKAGE ( get<string> (stack,"_BLOCKAGE" ).c_str() );
|
||||
environement->setPad ( get<string> (stack,"_pad" ).c_str() );
|
||||
environement->setCATALOG ( get<string> (stack,"_CATALOG" ).c_str() );
|
||||
|
||||
update( stack, environement );
|
||||
}
|
||||
|
||||
|
||||
} // End of CRL namespace.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | Alliance / Hurricane Interface |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./RoutingGauge.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <climits>
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
#include "hurricane/Commons.h"
|
||||
|
@ -24,6 +24,7 @@
|
|||
#include "crlcore/XmlParser.h"
|
||||
#include "crlcore/RoutingLayerGauge.h"
|
||||
#include "crlcore/RoutingGauge.h"
|
||||
#include "crlcore/AllianceFramework.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
@ -40,15 +41,20 @@ namespace {
|
|||
|
||||
namespace CRL {
|
||||
|
||||
|
||||
using Hurricane::JsonTypes;
|
||||
using Hurricane::JsonArray;
|
||||
using Hurricane::DataBase;
|
||||
using Hurricane::ViaLayer;
|
||||
using Hurricane::getCollection;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "RoutingGauge".
|
||||
|
||||
|
||||
const size_t RoutingGauge::nlayerdepth = std::numeric_limits<size_t>::max();
|
||||
|
||||
|
||||
RoutingGauge::RoutingGauge ( const char* name )
|
||||
: _name (name)
|
||||
, _layerGauges()
|
||||
|
@ -74,7 +80,8 @@ namespace CRL {
|
|||
, gauge._layerGauges[i]->getOffset()
|
||||
, gauge._layerGauges[i]->getPitch()
|
||||
, gauge._layerGauges[i]->getWireWidth()
|
||||
, gauge._layerGauges[i]->getViaWidth() )
|
||||
, gauge._layerGauges[i]->getViaWidth()
|
||||
, gauge._layerGauges[i]->getObstacleDw() )
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -150,7 +157,7 @@ namespace CRL {
|
|||
if ( _layerGauges[i]->getLayer()->getMask() == bottomLayer->getMask() )
|
||||
return i;
|
||||
}
|
||||
return UINT_MAX;
|
||||
return nlayerdepth;
|
||||
}
|
||||
|
||||
|
||||
|
@ -160,7 +167,7 @@ namespace CRL {
|
|||
if ( _layerGauges[i]->getLayer()->getMask() == layer->getMask() )
|
||||
return i;
|
||||
}
|
||||
return UINT_MAX;
|
||||
return nlayerdepth;
|
||||
}
|
||||
|
||||
|
||||
|
@ -261,4 +268,65 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
void RoutingGauge::toJson ( JsonWriter* w ) const
|
||||
{
|
||||
w->startObject();
|
||||
jsonWrite( w, "@typename", "RoutingGauge" );
|
||||
jsonWrite( w, "_name" , _name );
|
||||
jsonWrite( w, "+routingLayerGauges", getCollection(getLayerGauges()) );
|
||||
w->endObject();
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "JsonRoutingGauge"
|
||||
|
||||
Initializer<JsonRoutingGauge> jsonRoutingGaugeInit ( 0 );
|
||||
|
||||
|
||||
void JsonRoutingGauge::initialize ()
|
||||
{ JsonTypes::registerType( new JsonRoutingGauge (JsonWriter::RegisterMode) ); }
|
||||
|
||||
|
||||
JsonRoutingGauge::JsonRoutingGauge( unsigned long flags )
|
||||
: JsonObject(flags)
|
||||
{
|
||||
add( "_name" , typeid(string) );
|
||||
add( "+routingLayerGauges", typeid(JsonArray) );
|
||||
}
|
||||
|
||||
|
||||
string JsonRoutingGauge::getTypeName () const
|
||||
{ return "RoutingGauge"; }
|
||||
|
||||
|
||||
JsonRoutingGauge* JsonRoutingGauge::clone ( unsigned long flags ) const
|
||||
{ return new JsonRoutingGauge ( flags ); }
|
||||
|
||||
|
||||
void JsonRoutingGauge::toData ( JsonStack& stack )
|
||||
{
|
||||
check( stack, "JsonRoutingGauge::toData" );
|
||||
|
||||
AllianceFramework* af = get<AllianceFramework*>( stack, "_framework" );
|
||||
string name = get<string> ( stack, "_name" );
|
||||
RoutingGauge* rg = NULL;
|
||||
|
||||
if (stack.issetFlags(JsonWriter::TechnoMode)) {
|
||||
if (af) {
|
||||
if (not name.empty()) {
|
||||
rg = RoutingGauge::create( name.c_str() );
|
||||
af->addRoutingGauge( rg );
|
||||
}
|
||||
} else {
|
||||
cerr << Error( "JsonRoutingGauge::toData(): Missing \"_framework\" in stack context." ) << endl;
|
||||
}
|
||||
} else {
|
||||
rg = af->getRoutingGauge( name );
|
||||
}
|
||||
|
||||
update( stack, rg );
|
||||
}
|
||||
|
||||
|
||||
} // End of CRL namespace.
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | C o r e L i b r a r y |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./RoutingLayerGauge.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
@ -17,10 +17,11 @@
|
|||
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "hurricane/BasicLayer.h"
|
||||
|
||||
#include "crlcore/RoutingLayerGauge.h"
|
||||
#include "hurricane/BasicLayer.h"
|
||||
#include "hurricane/DataBase.h"
|
||||
#include "hurricane/Technology.h"
|
||||
#include "crlcore/RoutingLayerGauge.h"
|
||||
#include "crlcore/RoutingGauge.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
@ -86,28 +87,27 @@ namespace CRL {
|
|||
|
||||
|
||||
using namespace std;
|
||||
|
||||
using Hurricane::JsonTypes;
|
||||
using Hurricane::Tabulation;
|
||||
using Hurricane::BasicLayer;
|
||||
using Hurricane::trace_in;
|
||||
using Hurricane::trace_out;
|
||||
using Hurricane::in_trace;
|
||||
using Hurricane::tab;
|
||||
using Hurricane::DataBase;
|
||||
using Hurricane::Technology;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "RoutingLayerGauge"
|
||||
|
||||
|
||||
RoutingLayerGauge::RoutingLayerGauge ( const Layer* layer
|
||||
, unsigned int direction
|
||||
, unsigned int type
|
||||
, unsigned int depth
|
||||
, double density
|
||||
, DbU::Unit offset
|
||||
, DbU::Unit pitch
|
||||
, DbU::Unit wireWidth
|
||||
, DbU::Unit viaWidth )
|
||||
RoutingLayerGauge::RoutingLayerGauge ( const Layer* layer
|
||||
, Constant::Direction direction
|
||||
, Constant::LayerGaugeType type
|
||||
, unsigned int depth
|
||||
, double density
|
||||
, DbU::Unit offset
|
||||
, DbU::Unit pitch
|
||||
, DbU::Unit wireWidth
|
||||
, DbU::Unit viaWidth
|
||||
, DbU::Unit obsDw )
|
||||
: _layer (layer)
|
||||
, _blockageLayer(layer->getBlockageLayer())
|
||||
, _direction (direction)
|
||||
|
@ -118,18 +118,20 @@ namespace CRL {
|
|||
, _pitch (pitch)
|
||||
, _wireWidth (wireWidth)
|
||||
, _viaWidth (viaWidth)
|
||||
, _obstacleDw (obsDw)
|
||||
{ }
|
||||
|
||||
|
||||
RoutingLayerGauge* RoutingLayerGauge::create ( const Layer* layer
|
||||
, unsigned int direction
|
||||
, unsigned int type
|
||||
, unsigned int depth
|
||||
, double density
|
||||
, DbU::Unit offset
|
||||
, DbU::Unit pitch
|
||||
, DbU::Unit wireWidth
|
||||
, DbU::Unit viaWidth )
|
||||
RoutingLayerGauge* RoutingLayerGauge::create ( const Layer* layer
|
||||
, Constant::Direction direction
|
||||
, Constant::LayerGaugeType type
|
||||
, unsigned int depth
|
||||
, double density
|
||||
, DbU::Unit offset
|
||||
, DbU::Unit pitch
|
||||
, DbU::Unit wireWidth
|
||||
, DbU::Unit viaWidth
|
||||
, DbU::Unit obsDw )
|
||||
{
|
||||
// Temporary: must write a more smart check.
|
||||
// BasicLayer* basicLayer = dynamic_cast<BasicLayer*>(layer);
|
||||
|
@ -147,7 +149,8 @@ namespace CRL {
|
|||
, offset
|
||||
, pitch
|
||||
, wireWidth
|
||||
, viaWidth );
|
||||
, viaWidth
|
||||
, obsDw );
|
||||
|
||||
return gauge;
|
||||
}
|
||||
|
@ -204,18 +207,17 @@ namespace CRL {
|
|||
|
||||
unsigned RoutingLayerGauge::getTrackIndex ( DbU::Unit start, DbU::Unit stop, DbU::Unit position, unsigned mode ) const
|
||||
{
|
||||
trace << "RoutingLayerGauge::getTrackIndex ( " << position << " )" << endl;
|
||||
trace_in ();
|
||||
cdebug.log(100,1) << "RoutingLayerGauge::getTrackIndex ( " << position << " )" << endl;
|
||||
|
||||
long modulo;
|
||||
long depth;
|
||||
|
||||
divide ( position-start, depth, modulo );
|
||||
|
||||
trace << "depth := " << depth << endl;
|
||||
cdebug.log(100) << "depth := " << depth << endl;
|
||||
|
||||
if ( depth < 0 ) {
|
||||
trace_out ();
|
||||
cdebug.tabw(100,-1);
|
||||
return 0;
|
||||
|
||||
// throw Error ( negativeIndex
|
||||
|
@ -237,7 +239,7 @@ namespace CRL {
|
|||
|
||||
unsigned int tracksNumber = getTrackNumber(start,stop);
|
||||
if ( (unsigned)depth >= tracksNumber ) {
|
||||
trace_out ();
|
||||
cdebug.tabw(100,-1);
|
||||
return (tracksNumber > 0) ? tracksNumber-1 : 0;
|
||||
// throw Error ( overflowIndex
|
||||
// , getString(this).c_str()
|
||||
|
@ -247,7 +249,7 @@ namespace CRL {
|
|||
// );
|
||||
}
|
||||
|
||||
trace_out ();
|
||||
cdebug.tabw(100,-1);
|
||||
|
||||
return depth;
|
||||
}
|
||||
|
@ -302,4 +304,107 @@ namespace CRL {
|
|||
}
|
||||
|
||||
|
||||
} // End of Coriolis namespace.
|
||||
void RoutingLayerGauge::toJson ( JsonWriter* w ) const
|
||||
{
|
||||
w->startObject();
|
||||
jsonWrite( w, "@typename", "RoutingLayerGauge" );
|
||||
jsonWrite( w, "_layer" , _layer->getName() );
|
||||
jsonWrite( w, "_direction" , getString(&_direction) );
|
||||
jsonWrite( w, "_type" , getString(&_type ) );
|
||||
jsonWrite( w, "_depth" , _depth );
|
||||
jsonWrite( w, "_density" , _density );
|
||||
jsonWrite( w, "_offset" , _offset );
|
||||
jsonWrite( w, "_pitch" , _pitch );
|
||||
jsonWrite( w, "_wireWidth" , _wireWidth );
|
||||
jsonWrite( w, "_viaWidth" , _viaWidth );
|
||||
jsonWrite( w, "_obstacleDw" , _obstacleDw );
|
||||
w->endObject();
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "JsonRoutingLayerGauge"
|
||||
|
||||
Initializer<JsonRoutingLayerGauge> jsonRoutingLayerGaugeInit ( 0 );
|
||||
|
||||
|
||||
void JsonRoutingLayerGauge::initialize ()
|
||||
{ JsonTypes::registerType( new JsonRoutingLayerGauge (JsonWriter::RegisterMode) ); }
|
||||
|
||||
|
||||
JsonRoutingLayerGauge::JsonRoutingLayerGauge( unsigned long flags )
|
||||
: JsonObject(flags)
|
||||
{
|
||||
add( ".RoutingGauge" , typeid(RoutingGauge*) );
|
||||
add( "_layer" , typeid(string) );
|
||||
add( "_direction" , typeid(string) );
|
||||
add( "_type" , typeid(string) );
|
||||
add( "_depth" , typeid(unsigned int) );
|
||||
add( "_density" , typeid(double) );
|
||||
add( "_offset" , typeid(int64_t) );
|
||||
add( "_pitch" , typeid(int64_t) );
|
||||
add( "_wireWidth" , typeid(int64_t) );
|
||||
add( "_viaWidth" , typeid(int64_t) );
|
||||
add( "_obstacleDw" , typeid(int64_t) );
|
||||
}
|
||||
|
||||
|
||||
string JsonRoutingLayerGauge::getTypeName () const
|
||||
{ return "RoutingLayerGauge"; }
|
||||
|
||||
|
||||
JsonRoutingLayerGauge* JsonRoutingLayerGauge::clone ( unsigned long flags ) const
|
||||
{ return new JsonRoutingLayerGauge ( flags ); }
|
||||
|
||||
|
||||
void JsonRoutingLayerGauge::toData ( JsonStack& stack )
|
||||
{
|
||||
check( stack, "JsonRoutingLayerGauge::toData" );
|
||||
|
||||
Technology* techno = DataBase::getDB()->getTechnology();
|
||||
RoutingGauge* rg = get<RoutingGauge*>( stack, ".RoutingGauge" );
|
||||
RoutingLayerGauge* rlg = NULL;
|
||||
string layer = get<string> ( stack, "_layer" );
|
||||
unsigned int depth = get<int64_t> ( stack, "_depth" );
|
||||
double density = get<double> ( stack, "_density" );
|
||||
DbU::Unit offset = get<int64_t> ( stack, "_offset" );
|
||||
DbU::Unit pitch = get<int64_t> ( stack, "_pitch" );
|
||||
DbU::Unit wireWidth = get<int64_t> ( stack, "_wireWidth" );
|
||||
DbU::Unit viaWidth = get<int64_t> ( stack, "_viaWidth" );
|
||||
DbU::Unit obstacleDw = get<int64_t> ( stack, "_obstacleDw" );
|
||||
|
||||
Constant::Direction direction;
|
||||
Constant::LayerGaugeType type;
|
||||
from( direction, get<string>(stack,"_direction") );
|
||||
from( type , get<string>(stack,"_type" ) );
|
||||
|
||||
if (stack.issetFlags(JsonWriter::TechnoMode)) {
|
||||
if (rg) {
|
||||
if (not layer.empty()) {
|
||||
rlg = RoutingLayerGauge::create( techno->getLayer(layer)
|
||||
, direction
|
||||
, type
|
||||
, depth
|
||||
, density
|
||||
, offset
|
||||
, pitch
|
||||
, wireWidth
|
||||
, viaWidth
|
||||
, obstacleDw
|
||||
);
|
||||
rg->addLayerGauge( rlg );
|
||||
}
|
||||
} else {
|
||||
cerr << Error( "JsonRoutingLayerGauge::toData(): Missing \".RoutingGauge\" in stack context." ) << endl;
|
||||
}
|
||||
} else {
|
||||
if (rg) {
|
||||
rlg = rg->getLayerGauge( techno->getLayer(layer) );
|
||||
}
|
||||
}
|
||||
|
||||
update( stack, rlg );
|
||||
}
|
||||
|
||||
|
||||
} // Coriolis namespace.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -88,9 +88,17 @@ namespace {
|
|||
}
|
||||
|
||||
|
||||
void traceLevelChanged ( Cfg::Parameter* p )
|
||||
void minTraceLevelChanged ( Cfg::Parameter* p )
|
||||
{
|
||||
ltracelevel ( p->asInt() );
|
||||
//cerr << "minTraceLevelChanged:" << p->asInt() << endl;
|
||||
cdebug.setMinLevel( p->asInt() );
|
||||
}
|
||||
|
||||
|
||||
void maxTraceLevelChanged ( Cfg::Parameter* p )
|
||||
{
|
||||
//cerr << "maxTraceLevelChanged:" << p->asInt() << endl;
|
||||
cdebug.setMaxLevel( p->asInt() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -322,25 +330,26 @@ namespace CRL {
|
|||
// Triggers Configuration singleton creation.
|
||||
Cfg::Configuration::get ();
|
||||
|
||||
Cfg::getParamBool ("misc.catchCore" ,true )->registerCb ( catchCoreChanged );
|
||||
Cfg::getParamBool ("misc.verboseLevel1" ,true )->registerCb ( verboseLevel1Changed );
|
||||
Cfg::getParamBool ("misc.verboseLevel2" ,true )->registerCb ( verboseLevel2Changed );
|
||||
Cfg::getParamBool ("misc.info" ,false)->registerCb ( infoChanged );
|
||||
Cfg::getParamBool ("misc.paranoid" ,false)->registerCb ( paranoidChanged );
|
||||
Cfg::getParamBool ("misc.bug" ,false)->registerCb ( bugChanged );
|
||||
Cfg::getParamBool ("misc.logMode" ,false)->registerCb ( logModeChanged );
|
||||
Cfg::getParamInt ("misc.traceLevel" ,1000 )->registerCb ( traceLevelChanged );
|
||||
Cfg::getParamString("stratus1.mappingName","./stratus2sxlib.xml")->registerCb ( stratus1MappingNameChanged );
|
||||
Cfg::getParamBool ("misc.catchCore" ,false)->registerCb ( this, catchCoreChanged );
|
||||
Cfg::getParamBool ("misc.verboseLevel1" ,true )->registerCb ( this, verboseLevel1Changed );
|
||||
Cfg::getParamBool ("misc.verboseLevel2" ,true )->registerCb ( this, verboseLevel2Changed );
|
||||
Cfg::getParamBool ("misc.info" ,false)->registerCb ( this, infoChanged );
|
||||
Cfg::getParamBool ("misc.paranoid" ,false)->registerCb ( this, paranoidChanged );
|
||||
Cfg::getParamBool ("misc.bug" ,false)->registerCb ( this, bugChanged );
|
||||
Cfg::getParamBool ("misc.logMode" ,false)->registerCb ( this, logModeChanged );
|
||||
Cfg::getParamInt ("misc.minTraceLevel" ,0 )->registerCb ( this, minTraceLevelChanged );
|
||||
Cfg::getParamInt ("misc.maxTraceLevel" ,0 )->registerCb ( this, maxTraceLevelChanged );
|
||||
Cfg::getParamString("stratus1.mappingName","not_set")->registerCb ( this, stratus1MappingNameChanged );
|
||||
|
||||
// Immediate update from the configuration.
|
||||
catchCoreChanged ( Cfg::getParamBool("misc.catchCore" ) );
|
||||
verboseLevel1Changed ( Cfg::getParamBool("misc.verboseLevel1") );
|
||||
verboseLevel2Changed ( Cfg::getParamBool("misc.verboseLevel2") );
|
||||
infoChanged ( Cfg::getParamBool("misc.info" ) );
|
||||
paranoidChanged ( Cfg::getParamBool("misc.paranoid" ) );
|
||||
bugChanged ( Cfg::getParamBool("misc.bug" ) );
|
||||
logModeChanged ( Cfg::getParamBool("misc.logMode" ) );
|
||||
traceLevelChanged ( Cfg::getParamInt ("misc.traceLevel" ) );
|
||||
//catchCoreChanged ( Cfg::getParamBool("misc.catchCore" ) );
|
||||
//verboseLevel1Changed ( Cfg::getParamBool("misc.verboseLevel1") );
|
||||
//verboseLevel2Changed ( Cfg::getParamBool("misc.verboseLevel2") );
|
||||
//infoChanged ( Cfg::getParamBool("misc.info" ) );
|
||||
//paranoidChanged ( Cfg::getParamBool("misc.paranoid" ) );
|
||||
//bugChanged ( Cfg::getParamBool("misc.bug" ) );
|
||||
//logModeChanged ( Cfg::getParamBool("misc.logMode" ) );
|
||||
//traceLevelChanged ( Cfg::getParamInt ("misc.traceLevel" ) );
|
||||
|
||||
Utilities::Path stratusMappingName;
|
||||
if ( arguments.count("stratus_mapping_name") ) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2009-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2009-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -15,22 +15,20 @@
|
|||
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "hurricane/Pin.h"
|
||||
#include "hurricane/Instance.h"
|
||||
#include "hurricane/Net.h"
|
||||
#include "hurricane/NetExternalComponents.h"
|
||||
#include "hurricane/Reference.h"
|
||||
#include "hurricane/Horizontal.h"
|
||||
#include "hurricane/Vertical.h"
|
||||
#include "hurricane/RoutingPad.h"
|
||||
#include "hurricane/Cell.h"
|
||||
#include "hurricane/Layer.h"
|
||||
#include "hurricane/RegularLayer.h"
|
||||
#include "hurricane/Warning.h"
|
||||
|
||||
#include "Ap.h"
|
||||
#include "crlcore/Catalog.h"
|
||||
#include "hurricane/Pin.h"
|
||||
#include "hurricane/Instance.h"
|
||||
#include "hurricane/Net.h"
|
||||
#include "hurricane/NetExternalComponents.h"
|
||||
#include "hurricane/Reference.h"
|
||||
#include "hurricane/Horizontal.h"
|
||||
#include "hurricane/Vertical.h"
|
||||
#include "hurricane/RoutingPad.h"
|
||||
#include "hurricane/Cell.h"
|
||||
#include "hurricane/Layer.h"
|
||||
#include "hurricane/RegularLayer.h"
|
||||
#include "hurricane/Warning.h"
|
||||
#include "Ap.h"
|
||||
#include "crlcore/Catalog.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -355,6 +355,9 @@ namespace {
|
|||
net->setType ( Net::Type::CLOCK );
|
||||
net->setGlobal ( true );
|
||||
}
|
||||
if ( _framework->isBLOCKAGE(hName) ) {
|
||||
net->setType ( Net::Type::BLOCKAGE );
|
||||
}
|
||||
}
|
||||
|
||||
return net;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -100,7 +100,8 @@ namespace Vhdl {
|
|||
|
||||
|
||||
Entity::Entity ( EntityProperty* property, Cell* cell, unsigned int flags )
|
||||
: _signals()
|
||||
: _ns (NamingScheme::FromVerilog)
|
||||
, _signals()
|
||||
, _globals()
|
||||
, _flags (flags)
|
||||
{
|
||||
|
@ -111,16 +112,17 @@ namespace Vhdl {
|
|||
|
||||
if (_flags == NoFlags) _flags = EntityMode;
|
||||
|
||||
forEach ( Net*, inet, cell->getNets() ) {
|
||||
if (not inet->isExternal() and (flags & ComponentMode)) continue;
|
||||
for ( Net* net : cell->getNets() ) {
|
||||
if (net->isDeepNet()) continue;
|
||||
if (not net->isExternal() and (flags & ComponentMode)) continue;
|
||||
|
||||
string stem;
|
||||
size_t index = 0;
|
||||
if (parseNetName(*inet,stem,index)) {
|
||||
if (inet->isGlobal()) {
|
||||
if (parseNetName(net,stem,index)) {
|
||||
if (net->isGlobal()) {
|
||||
cerr << Warning( "Vhdl::Entity::Entity(): Net is both vectorized and global, this is not allowed.\n"
|
||||
" On Net <%s> of Cell <%s>."
|
||||
, getString(inet->getName()).c_str()
|
||||
, getString(net->getName()).c_str()
|
||||
, getString(cell->getName()).c_str()
|
||||
) << endl;
|
||||
}
|
||||
|
@ -128,12 +130,13 @@ namespace Vhdl {
|
|||
VectorSignal* signal = const_cast<VectorSignal*>( dynamic_cast<const VectorSignal*>( getSignal(stem) ) );
|
||||
if (not signal)
|
||||
signal = new VectorSignal ( stem );
|
||||
signal->addNet( index, *inet );
|
||||
signal->addNet( index, net );
|
||||
_signals.insert( signal );
|
||||
} else {
|
||||
_signals.insert( new ScalarSignal(*inet) );
|
||||
if (inet->isGlobal())
|
||||
_globals.insert( new ScalarSignal(*inet) );
|
||||
ScalarSignal* signal = new ScalarSignal(net);
|
||||
_signals.insert( signal );
|
||||
if (net->isGlobal())
|
||||
_globals.insert( signal );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -144,6 +147,7 @@ namespace Vhdl {
|
|||
Entity::~Entity ()
|
||||
{
|
||||
for ( auto signal : _signals ) delete signal;
|
||||
//for ( auto global : _globals ) delete global;
|
||||
for ( auto ientity=_entities.begin() ; ientity!=_entities.end() ; ++ientity ) {
|
||||
if (*ientity == this) {
|
||||
_entities.erase( ientity );
|
||||
|
@ -160,7 +164,7 @@ namespace Vhdl {
|
|||
bool Entity::parseNetName ( const Net* net, string& stem, size_t& index )
|
||||
{
|
||||
string error;
|
||||
string name = getString(net->getName());
|
||||
string name = getString(_ns.convert(net->getName()));
|
||||
size_t leftpar = name.find( '(' );
|
||||
size_t rightpar = name.find( ')' );
|
||||
|
||||
|
@ -210,19 +214,20 @@ namespace Vhdl {
|
|||
{
|
||||
if (isEntityMode()) return;
|
||||
|
||||
forEach ( Net*, inet, getCell()->getNets() ) {
|
||||
if (inet->isExternal()) continue;
|
||||
for ( Net* net : getCell()->getNets() ) {
|
||||
if (net->isDeepNet()) continue;
|
||||
if (net->isExternal()) continue;
|
||||
|
||||
string stem;
|
||||
size_t index = 0;
|
||||
if (parseNetName(*inet,stem,index)) {
|
||||
if (parseNetName(net,stem,index)) {
|
||||
VectorSignal* signal = const_cast<VectorSignal*>( dynamic_cast<const VectorSignal*>( getSignal(stem) ) );
|
||||
if (not signal)
|
||||
signal = new VectorSignal ( stem );
|
||||
signal->addNet( index, *inet );
|
||||
signal->addNet( index, net );
|
||||
_signals.insert( signal );
|
||||
} else {
|
||||
_signals.insert( new ScalarSignal(*inet) );
|
||||
_signals.insert( new ScalarSignal(net) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -332,11 +337,12 @@ namespace Vhdl {
|
|||
out << "use IEEE.numeric_std.all;\n\n\n";
|
||||
}
|
||||
|
||||
out << tab++ << "entity " << getCell()->getName() << " is\n";
|
||||
string cellName = getString( _ns.convert( getCell()->getName()) );
|
||||
out << tab++ << "entity " << cellName << " is\n";
|
||||
toPort( out );
|
||||
out << --tab << "\nend " << getCell()->getName() << ";\n\n";
|
||||
out << --tab << "\nend " << cellName << ";\n\n";
|
||||
|
||||
out << "architecture structural of " << getCell()->getName() << " is\n\n";
|
||||
out << "architecture structural of " << cellName << " is\n\n";
|
||||
++tab;
|
||||
|
||||
set<Cell*> masterCells;
|
||||
|
@ -367,7 +373,9 @@ namespace Vhdl {
|
|||
|
||||
void Entity::toComponent ( ostream& out ) const
|
||||
{
|
||||
out << tab++ << "component " << getCell()->getName() << "\n";
|
||||
string cellName = getString( _ns.convert( getCell()->getName()) );
|
||||
|
||||
out << tab++ << "component " << cellName << "\n";
|
||||
toPort( out );
|
||||
out << "\n" << --tab << "end component;\n";
|
||||
}
|
||||
|
@ -375,7 +383,10 @@ namespace Vhdl {
|
|||
|
||||
void Entity::toInstance ( ostream& out, Instance* instance ) const
|
||||
{
|
||||
out << tab << instance->getName() << " : " << instance->getMasterCell()->getName() << "\n";
|
||||
string instanceName = getString( _ns.convert( instance->getName() ) );
|
||||
string masterName = getString( _ns.convert( instance->getMasterCell()->getName() ) );
|
||||
|
||||
out << tab << instanceName << " : " << masterName << "\n";
|
||||
out << tab << "port map ( ";
|
||||
|
||||
Entity* masterEntity = EntityExtension::get( instance->getMasterCell() );
|
||||
|
@ -518,7 +529,7 @@ namespace Vhdl {
|
|||
void EntityExtension::destroy ( Cell* cell )
|
||||
{
|
||||
Property* property = cell->getProperty( EntityProperty::getPropertyName() );
|
||||
if (property) static_cast<EntityProperty*>(property)->destroy();
|
||||
if (property) cell->remove( property );
|
||||
|
||||
_owner = NULL;
|
||||
_cache = NULL;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -102,7 +102,7 @@ namespace Vhdl {
|
|||
{ }
|
||||
|
||||
ScalarSignal::~ScalarSignal ()
|
||||
{ }
|
||||
{ _bit->destroy(); }
|
||||
|
||||
bool ScalarSignal::isScalar () const { return true; }
|
||||
bool ScalarSignal::isVector () const { return false; }
|
||||
|
@ -150,7 +150,7 @@ namespace Vhdl {
|
|||
{ }
|
||||
|
||||
VectorSignal::~VectorSignal ()
|
||||
{ for ( auto bit : _bits ) bit->getProperty()->destroy(); }
|
||||
{ for ( auto bit : _bits ) bit->destroy(); }
|
||||
|
||||
|
||||
bool VectorSignal::isScalar () const { return false; }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2004-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2004-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -38,7 +38,7 @@ namespace CRL {
|
|||
|
||||
void vstDriver ( const string cellPath, Cell *cell, unsigned int &saveState )
|
||||
{
|
||||
NamingScheme::toVhdl( cell, NamingScheme::FromVerilog );
|
||||
//NamingScheme::toVhdl( cell, NamingScheme::FromVerilog );
|
||||
Vhdl::Entity* vhdlEntity = Vhdl::EntityExtension::create( cell
|
||||
, Vhdl::Entity::EntityMode
|
||||
//| Vhdl::Entity::IeeeMode
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%{
|
||||
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%{
|
||||
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2015-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2015-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -339,7 +339,7 @@ namespace {
|
|||
void Model::connectModels ()
|
||||
{
|
||||
for ( Model* blifModel : _blifOrder ){
|
||||
cmess2 << "Handling model <" << blifModel->getCell()->getName() << ">" << endl;
|
||||
//cmess2 << "Handling model <" << blifModel->getCell()->getName() << ">" << endl;
|
||||
blifModel->connectSubckts();
|
||||
}
|
||||
}
|
||||
|
@ -366,7 +366,6 @@ namespace {
|
|||
, _subckts()
|
||||
, _depth (0)
|
||||
{
|
||||
|
||||
_blifLut.insert( make_pair(getString(_cell->getName()), this) );
|
||||
if (_cell->isTerminal())
|
||||
_depth = 1;
|
||||
|
@ -398,17 +397,21 @@ namespace {
|
|||
|
||||
Net* Model::mergeNet ( string name, bool isExternal, unsigned int direction )
|
||||
{
|
||||
bool isClock = AllianceFramework::get()->isCLOCK( name );
|
||||
|
||||
Net* net = _cell->getNet( name );
|
||||
if (not net) {
|
||||
net = Net::create( _cell, name );
|
||||
net->setExternal ( isExternal );
|
||||
net->setDirection( (Net::Direction::Code)direction );
|
||||
if (isClock) net->setType( Net::Type::CLOCK );
|
||||
} else {
|
||||
net->addAlias( name );
|
||||
if (isExternal) net->setExternal( true );
|
||||
direction &= ~Net::Direction::UNDEFINED;
|
||||
direction |= net->getDirection();
|
||||
net->setDirection( (Net::Direction::Code)direction );
|
||||
if (isClock) net->setType( Net::Type::CLOCK );
|
||||
}
|
||||
return net;
|
||||
}
|
||||
|
@ -469,6 +472,12 @@ namespace {
|
|||
|
||||
void Model::connectSubckts ()
|
||||
{
|
||||
auto framework = AllianceFramework::get();
|
||||
|
||||
unsigned int supplyCount = 0;
|
||||
Cell* zero = framework->getCell( "zero_x0", Catalog::State::Views );
|
||||
Cell* one = framework->getCell( "one_x0" , Catalog::State::Views);
|
||||
|
||||
for ( Subckt* subckt : _subckts ) {
|
||||
if(not subckt->getModel())
|
||||
throw Error( "No .model or cell named <%s> has been found.\n"
|
||||
|
@ -486,9 +495,8 @@ namespace {
|
|||
// << "plug: <" << masterNetName << ">, "
|
||||
// << "external: <" << netName << ">."
|
||||
// << endl;
|
||||
Net* net = _cell->getNet( netName );
|
||||
|
||||
Net* masterNet = instance->getMasterCell()->getNet(masterNetName);
|
||||
Net* net = _cell->getNet( netName );
|
||||
Net* masterNet = instance->getMasterCell()->getNet(masterNetName);
|
||||
if(not masterNet) {
|
||||
ostringstream tmes;
|
||||
tmes << "The master net <" << masterNetName << "> hasn't been found "
|
||||
|
@ -499,7 +507,7 @@ namespace {
|
|||
throw Error(tmes.str());
|
||||
}
|
||||
|
||||
Plug* plug = instance->getPlug( masterNet );
|
||||
Plug* plug = instance->getPlug( masterNet );
|
||||
if(not plug) {
|
||||
ostringstream tmes;
|
||||
tmes << "The plug in net <" << netName << "> "
|
||||
|
@ -511,8 +519,7 @@ namespace {
|
|||
throw Error(tmes.str());
|
||||
}
|
||||
|
||||
|
||||
Net* plugNet = plug->getNet();
|
||||
Net* plugNet = plug->getNet();
|
||||
|
||||
if (not plugNet) { // Plug not connected yet
|
||||
if (not net) net = Net::create( _cell, netName );
|
||||
|
@ -523,20 +530,38 @@ namespace {
|
|||
plugNet->addAlias( netName );
|
||||
}
|
||||
else if (plugNet != net){ // Plus already connected to another net
|
||||
plugNet->merge( net );
|
||||
if (not plugNet->isExternal()) net->merge( plugNet );
|
||||
else plugNet->merge( net );
|
||||
}
|
||||
|
||||
if( plugNet->getType() == Net::Type::POWER or plugNet->getType() == Net::Type::GROUND ){
|
||||
ostringstream tmes;
|
||||
string powType = plugNet->getType() == Net::Type::POWER ? "power" : "ground";
|
||||
string plugName = plugNet->getName()._getString(); // Name of the original net
|
||||
tmes << "Connecting instance <" << subckt->getInstanceName() << "> "
|
||||
<< "of <" << subckt->getModelName() << "> "
|
||||
<< "to the " << powType << " net <" << plugName << "> ";
|
||||
if(netName != plugName)
|
||||
tmes << "with the alias <" << netName << ">. ";
|
||||
tmes << "Maybe you should use tie cells?";
|
||||
cerr << Warning(tmes.str()) << endl;
|
||||
if (plugNet->isSupply() and not plug->getMasterNet()->isSupply()) {
|
||||
ostringstream message;
|
||||
message << "In " << instance << "\n "
|
||||
<< "Terminal " << plug->getMasterNet()->getName()
|
||||
<< " is connected to POWER/GROUND " << plugNet->getName()
|
||||
<< " through the alias " << netName
|
||||
<< ".";
|
||||
cerr << Warning( message.str() ) << endl;
|
||||
|
||||
if (plugNet->isPower()) {
|
||||
ostringstream insName; insName << "one_" << supplyCount++;
|
||||
|
||||
Instance* insOne = Instance::create( _cell, insName.str(), one );
|
||||
Net* netOne = Net::create( _cell, insName.str() );
|
||||
|
||||
insOne->getPlug( one->getNet("q") )->setNet( netOne );
|
||||
plug->setNet( netOne );
|
||||
}
|
||||
|
||||
if (plugNet->isGround()) {
|
||||
ostringstream insName; insName << "zero_" << supplyCount++;
|
||||
|
||||
Instance* insZero = Instance::create( _cell, insName.str(), zero );
|
||||
Net* netZero = Net::create( _cell, insName.str() );
|
||||
|
||||
insZero->getPlug( zero->getNet("nq") )->setNet( netZero );
|
||||
plug->setNet( netZero );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -647,25 +672,25 @@ namespace CRL {
|
|||
blifModel->mergeAlias( blifLine[1], blifLine[2] );
|
||||
} else if (tokenize.state() & Tokenize::CoverZero) {
|
||||
cerr << Warning( "Blif::load() Definition of an alias <%s> of VSS in a \".names\". Maybe you should use tie cells?\n"
|
||||
" File %s.blif at line %u."
|
||||
, blifLine[1].c_str()
|
||||
, blifFile.c_str()
|
||||
, tokenize.lineno()
|
||||
) << endl;
|
||||
" File \"%s.blif\" at line %u."
|
||||
, blifLine[1].c_str()
|
||||
, blifFile.c_str()
|
||||
, tokenize.lineno()
|
||||
) << endl;
|
||||
//blifModel->mergeAlias( blifLine[1], "vss" );
|
||||
blifModel->getCell()->getNet( "vss" )->addAlias( blifLine[1] );
|
||||
} else if (tokenize.state() & Tokenize::CoverOne ) {
|
||||
cerr << Warning( "Blif::load() Definition of an alias <%s> of VDD in a \".names\". Maybe you should use tie cells?\n"
|
||||
" File %s.blif at line %u."
|
||||
, blifLine[1].c_str()
|
||||
, blifFile.c_str()
|
||||
, tokenize.lineno()
|
||||
) << endl;
|
||||
" File \"%s.blif\" at line %u."
|
||||
, blifLine[1].c_str()
|
||||
, blifFile.c_str()
|
||||
, tokenize.lineno()
|
||||
) << endl;
|
||||
//blifModel->mergeAlias( blifLine[1], "vdd" );
|
||||
blifModel->getCell()->getNet( "vdd" )->addAlias( blifLine[1] );
|
||||
} else {
|
||||
cerr << Error( "Blif::load() Unsupported \".names\" cover construct.\n"
|
||||
" File %s.blif at line %u."
|
||||
" File \"%s.blif\" at line %u."
|
||||
, blifFile.c_str()
|
||||
, tokenize.lineno()
|
||||
) << endl;
|
||||
|
|
|
@ -318,7 +318,7 @@ Name BKParser::getNewNetName()
|
|||
|
||||
|
||||
bool BKParser::isNumber ( char* token ) {
|
||||
trace << "isNumber = " << token;
|
||||
cdebug.log(100) << "isNumber = " << token;
|
||||
|
||||
unsigned i = 0;
|
||||
char tok;
|
||||
|
@ -330,7 +330,7 @@ bool BKParser::isNumber ( char* token ) {
|
|||
}
|
||||
|
||||
bool BKParser::isFloat ( char* token ) {
|
||||
trace << "isFloat = " << token;
|
||||
cdebug.log(100) << "isFloat = " << token;
|
||||
|
||||
unsigned i = 0;
|
||||
char tok;
|
||||
|
@ -343,7 +343,7 @@ bool BKParser::isFloat ( char* token ) {
|
|||
}
|
||||
|
||||
bool BKParser::isName ( char* token ) {
|
||||
trace << "isName = " << token;
|
||||
cdebug.log(100) << "isName = " << token;
|
||||
|
||||
unsigned i = 0;
|
||||
char tok;
|
||||
|
@ -358,7 +358,7 @@ bool BKParser::isName ( char* token ) {
|
|||
}
|
||||
|
||||
bool BKParser::isSymetry ( char* token ) {
|
||||
trace << "isSymetry = " << token;
|
||||
cdebug.log(100) << "isSymetry = " << token;
|
||||
if ( ( ( token[0] == 'X' ) && ( token[1] == char(0) ) )
|
||||
|| ( ( token[0] == 'Y' ) && ( token[1] == char(0) ) )
|
||||
|| ( ( token[0] == 'R' ) && ( token[1] == '9' ) && ( token[2] == '0' ) && ( token[3] == char(0) ) ) )
|
||||
|
@ -366,7 +366,7 @@ bool BKParser::isSymetry ( char* token ) {
|
|||
return false;
|
||||
}
|
||||
bool BKParser::isDirection ( char* token ) {
|
||||
trace << "isDirection = " << token;
|
||||
cdebug.log(100) << "isDirection = " << token;
|
||||
|
||||
if ( ( ( token[0] == 'I' ) || ( token[0] == 'O' ) || ( token[0] == 'B' ) ) && ( token[1] == char(0) ) )
|
||||
return true;
|
||||
|
@ -381,7 +381,7 @@ bool BKParser::ScanAux ()
|
|||
// The Aux record looks like :
|
||||
// RowBasedPlacement : <cell_name>.nodes <cell_name>.nets <cell_name>.wts <cell_name>.pl <cell_name>.scl
|
||||
// **********************************************************************************************************
|
||||
trace << "ScanAux = " << _buffer;
|
||||
cdebug.log(100) << "ScanAux = " << _buffer;
|
||||
|
||||
// ***********************
|
||||
// Patterns initialization
|
||||
|
@ -441,7 +441,7 @@ bool BKParser::ScanNum ( unsigned& num )
|
|||
// The NodeNum record looks like :
|
||||
// NumNodes : <num>
|
||||
// *******************************
|
||||
trace << "ScanNum = " << _buffer;
|
||||
cdebug.log(100) << "ScanNum = " << _buffer;
|
||||
|
||||
char *p_type, *p_num;
|
||||
if ( ( ( p_type = strtok ( _buffer, "\t \n:" ) ) != NULL ) &&
|
||||
|
@ -460,7 +460,7 @@ bool BKParser::ScanDegree ( unsigned& degree, Name& netName )
|
|||
// The NetDregree record looks like :
|
||||
// NetDegree : <degree> [netName]
|
||||
// **********************************
|
||||
trace << "ScanDegree = " << _buffer;
|
||||
cdebug.log(100) << "ScanDegree = " << _buffer;
|
||||
|
||||
bool mDegree = false;
|
||||
bool mName = false;
|
||||
|
@ -502,7 +502,7 @@ bool BKParser::ScanNodes ( Name& name, DbU::Unit& width, DbU::Unit& height, bool
|
|||
// The Node record looks like :
|
||||
// <ins_name> <width> <height> [terminal]
|
||||
// **************************************
|
||||
trace << "ScanNodes = " << _buffer;
|
||||
cdebug.log(100) << "ScanNodes = " << _buffer;
|
||||
|
||||
char *p_name, *p_width, *p_height, *p_term;
|
||||
if ( ( ( p_name = strtok ( _buffer, "\t \n" ) ) != NULL ) &&
|
||||
|
@ -528,7 +528,7 @@ bool BKParser::ScanNets ( Name& insName, Net::Direction& dir, DbU::Unit& dx, DbU
|
|||
// The Net record looks like :
|
||||
// NetDegree : <degree> <net_name>
|
||||
// *********************************
|
||||
trace << "ScanNets = " << _buffer;
|
||||
cdebug.log(100) << "ScanNets = " << _buffer;
|
||||
|
||||
bool mName = false;
|
||||
bool mDirection = false;
|
||||
|
@ -580,7 +580,7 @@ bool BKParser::ScanWts ( Name& name, unsigned& weight )
|
|||
// The Weight record looks like :
|
||||
// <ins_name> <weight>
|
||||
// ******************************
|
||||
trace << "ScanWts = " << _buffer;
|
||||
cdebug.log(100) << "ScanWts = " << _buffer;
|
||||
|
||||
//char *p_x, *p_y, *p_model, *p_name, *p_transf;
|
||||
|
||||
|
@ -622,7 +622,7 @@ bool BKParser::ScanPl ( Name& name, DbU::Unit& x, DbU::Unit& y, Transformation::
|
|||
// The Placement record looks like :
|
||||
// <ins_name> <x> <y> : <orient> [FIXED]
|
||||
// *************************************
|
||||
trace << "ScanPl = " << _buffer;
|
||||
cdebug.log(100) << "ScanPl = " << _buffer;
|
||||
|
||||
char *p_name, *p_x, *p_y, *p_orient, *p_fixed;
|
||||
if ( ( ( p_name = strtok ( _buffer, "\t \n" ) ) != NULL ) &&
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -18,17 +17,21 @@
|
|||
#ifndef CRL_ALLIANCE_FRAMEWORK_H
|
||||
#define CRL_ALLIANCE_FRAMEWORK_H
|
||||
|
||||
#include <map>
|
||||
#include <limits>
|
||||
#include "hurricane/Cell.h"
|
||||
#include "crlcore/Environment.h"
|
||||
#include "crlcore/AllianceLibrary.h"
|
||||
#include "crlcore/Catalog.h"
|
||||
#include "crlcore/ParsersDrivers.h"
|
||||
#include <map>
|
||||
#include <limits>
|
||||
#include "hurricane/Cell.h"
|
||||
#include "crlcore/Environment.h"
|
||||
#include "crlcore/AllianceLibrary.h"
|
||||
#include "crlcore/Catalog.h"
|
||||
#include "crlcore/ParsersDrivers.h"
|
||||
|
||||
|
||||
namespace CRL {
|
||||
|
||||
using Hurricane::Observable;
|
||||
using Hurricane::BaseObserver;
|
||||
using Hurricane::JsonObject;
|
||||
using Hurricane::JsonStack;
|
||||
using Hurricane::Cell;
|
||||
using Hurricane::Net;
|
||||
class RoutingGauge;
|
||||
|
@ -37,11 +40,23 @@ namespace CRL {
|
|||
|
||||
class AllianceFramework {
|
||||
public:
|
||||
enum InstancesCountFlags { Recursive=0x1, IgnoreFeeds=0x2 };
|
||||
enum LibraryFlags { CreateLibrary=0x1, InSearchPath=0x2, HasCatalog=0x4 };
|
||||
enum FunctionsFlags { NoFlags = 0
|
||||
, NoPythonInit = (1<<0)
|
||||
};
|
||||
enum InstancesCountFlags { Recursive = (1<<0)
|
||||
, IgnoreFeeds = (1<<1)
|
||||
};
|
||||
enum LibraryFlags { CreateLibrary = (1<<0)
|
||||
, AppendLibrary = (1<<1)
|
||||
, HasCatalog = (1<<2)
|
||||
};
|
||||
enum NotifyFlags { AddedLibrary = (1<<0)
|
||||
, RemovedLibrary = (1<<1)
|
||||
, ConfigChanged = (1<<2)
|
||||
};
|
||||
public:
|
||||
// Constructors.
|
||||
static AllianceFramework* create ();
|
||||
static AllianceFramework* create ( unsigned long flags=NoFlags );
|
||||
// Destructors.
|
||||
void destroy ();
|
||||
// Accessors.
|
||||
|
@ -71,10 +86,11 @@ namespace CRL {
|
|||
inline const Name& getParentLibraryName () const;
|
||||
inline Library* getParentLibrary ();
|
||||
Library* getLibrary ( unsigned int index );
|
||||
Library* getLibrary ( const Name& libName );
|
||||
AllianceLibrary* getAllianceLibrary ( unsigned int index );
|
||||
AllianceLibrary* getAllianceLibrary ( const Name& libName, unsigned int& flags );
|
||||
AllianceLibrary* getAllianceLibrary ( const Name& libName, unsigned int flags );
|
||||
AllianceLibrary* getAllianceLibrary ( Library* );
|
||||
AllianceLibrary* createLibrary ( const string& path, unsigned int& flags, string libName="" );
|
||||
AllianceLibrary* createLibrary ( const string& path, unsigned int flags, string libName="" );
|
||||
inline const AllianceLibraries& getAllianceLibraries () const;
|
||||
void saveLibrary ( Library* );
|
||||
void saveLibrary ( AllianceLibrary* );
|
||||
|
@ -82,9 +98,15 @@ namespace CRL {
|
|||
CellGauge* getCellGauge ( const Name& name="" );
|
||||
inline const Name getDefaultCGPinLayerName () const;
|
||||
// Modifiers.
|
||||
RoutingGauge* setRoutingGauge ( const Name& name="" );
|
||||
CellGauge* setCellGauge ( const Name& name="" );
|
||||
void addRoutingGauge ( RoutingGauge* );
|
||||
void addCellGauge ( CellGauge* );
|
||||
void addObserver ( BaseObserver* );
|
||||
void removeObserver ( BaseObserver* );
|
||||
void notify ( unsigned int flags );
|
||||
// Cell Management.
|
||||
Cell* cellLoader ( const string& rpath );
|
||||
Cell* getCell ( const string& name
|
||||
, unsigned int mode
|
||||
, unsigned int depth=(unsigned int)-1 );
|
||||
|
@ -94,6 +116,7 @@ namespace CRL {
|
|||
unsigned int loadLibraryCells ( const Name& );
|
||||
static size_t getInstancesCount ( Cell*, unsigned int flags );
|
||||
// Hurricane Managment.
|
||||
void toJson ( JsonWriter* ) const;
|
||||
inline string _getTypeName () const;
|
||||
string _getString () const;
|
||||
Record* _getRecord () const;
|
||||
|
@ -102,15 +125,16 @@ namespace CRL {
|
|||
protected:
|
||||
static const Name _parentLibraryName;
|
||||
static AllianceFramework* _singleton;
|
||||
Observable _observers;
|
||||
Environment _environment;
|
||||
ParsersMap _parsers;
|
||||
DriversMap _drivers;
|
||||
Catalog _catalog;
|
||||
AllianceLibraries _libraries;
|
||||
Library* _parentLibrary;
|
||||
RoutingGauge* _defaultRoutingGauge;
|
||||
map<const Name,RoutingGauge*>
|
||||
_routingGauges;
|
||||
RoutingGauge* _defaultRoutingGauge;
|
||||
map<const Name,CellGauge*>
|
||||
_cellGauges;
|
||||
CellGauge* _defaultCellGauge;
|
||||
|
@ -158,6 +182,20 @@ namespace CRL {
|
|||
inline string AllianceFramework::_getTypeName () const { return "AllianceFramework"; }
|
||||
|
||||
|
||||
class JsonAllianceFramework : public JsonObject {
|
||||
public:
|
||||
static void initialize ();
|
||||
JsonAllianceFramework( unsigned long );
|
||||
virtual ~JsonAllianceFramework();
|
||||
virtual string getTypeName () const;
|
||||
virtual JsonAllianceFramework* clone ( unsigned long ) const;
|
||||
virtual void toData ( JsonStack& );
|
||||
private:
|
||||
std::string _defaultRoutingGauge;
|
||||
std::string _defaultCellGauge;
|
||||
};
|
||||
|
||||
|
||||
} // CRL namespace.
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -30,7 +30,8 @@ namespace Hurricane {
|
|||
namespace CRL {
|
||||
|
||||
using std::vector;
|
||||
|
||||
using Hurricane::JsonObject;
|
||||
using Hurricane::JsonStack;
|
||||
using Hurricane::Name;
|
||||
using Hurricane::Library;
|
||||
using Hurricane::Record;
|
||||
|
@ -53,6 +54,7 @@ namespace CRL {
|
|||
inline const Name& getPath () const;
|
||||
inline Library* getLibrary () const;
|
||||
// Hurricane management.
|
||||
void toJson ( JsonWriter* ) const;
|
||||
inline std::string _getTypeName () const;
|
||||
std::string _getString () const;
|
||||
Record* _getRecord () const;
|
||||
|
@ -74,6 +76,19 @@ namespace CRL {
|
|||
inline std::string AllianceLibrary::_getTypeName () const { return _TName("AllianceLibrary"); }
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "JsonAllianceLibrary".
|
||||
|
||||
class JsonAllianceLibrary : public JsonObject {
|
||||
public:
|
||||
static void initialize ();
|
||||
JsonAllianceLibrary ( unsigned long flags );
|
||||
virtual std::string getTypeName () const;
|
||||
virtual JsonAllianceLibrary* clone ( unsigned long flags ) const;
|
||||
virtual void toData ( JsonStack& );
|
||||
};
|
||||
|
||||
|
||||
} // CRL namespace.
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -34,6 +34,8 @@ namespace CRL {
|
|||
|
||||
using std::string;
|
||||
using std::map;
|
||||
using Hurricane::JsonObject;
|
||||
using Hurricane::JsonStack;
|
||||
using Hurricane::_TName;
|
||||
using Hurricane::Name;
|
||||
using Hurricane::Record;
|
||||
|
@ -106,16 +108,18 @@ namespace CRL {
|
|||
inline bool setDelete ( bool value );
|
||||
inline bool setPhysical ( bool value );
|
||||
inline bool setLogical ( bool value );
|
||||
inline bool setInMemory ( bool value );
|
||||
// Accessors.
|
||||
inline Cell* getCell () const;
|
||||
inline Library* getLibrary () const;
|
||||
inline unsigned int getDepth () const;
|
||||
// Modifiers.
|
||||
inline void merge ( const State& other );
|
||||
inline Cell* setCell ( Cell* cell );
|
||||
Cell* setCell ( Cell* cell );
|
||||
inline Library* setLibrary ( Library* library );
|
||||
inline void setDepth ( unsigned int depth );
|
||||
// Hurricane Management.
|
||||
void toJson ( JsonWriter* w ) const;
|
||||
inline string _getTypeName () const;
|
||||
string _getString () const;
|
||||
Record* _getRecord () const;
|
||||
|
@ -126,7 +130,18 @@ namespace CRL {
|
|||
unsigned int _depth;
|
||||
Cell* _cell;
|
||||
Library* _library;
|
||||
};
|
||||
|
||||
// Json Property.
|
||||
public:
|
||||
class JsonState : public JsonObject {
|
||||
public:
|
||||
static void initialize ();
|
||||
JsonState ( unsigned long flags );
|
||||
virtual string getTypeName () const;
|
||||
virtual JsonState* clone ( unsigned long ) const;
|
||||
virtual void toData ( JsonStack& );
|
||||
};
|
||||
};
|
||||
|
||||
private:
|
||||
// Attributes.
|
||||
|
@ -142,7 +157,6 @@ namespace CRL {
|
|||
// -------------------------------------------------------------------
|
||||
// Class : "CRL::CatalogProperty".
|
||||
|
||||
|
||||
class CatalogProperty : public PrivateProperty {
|
||||
|
||||
public:
|
||||
|
@ -154,6 +168,8 @@ namespace CRL {
|
|||
inline Catalog::State* getState () const;
|
||||
inline void setState ( Catalog::State* state );
|
||||
virtual void onReleasedBy ( DBo* owner );
|
||||
virtual bool hasJson () const;
|
||||
virtual void toJson ( JsonWriter* w, const DBo* ) const;
|
||||
virtual string _getTypeName () const;
|
||||
virtual string _getString () const;
|
||||
virtual Record* _getRecord () const;
|
||||
|
@ -168,6 +184,19 @@ namespace CRL {
|
|||
};
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "CRL::JsonCatalogProperty".
|
||||
|
||||
class JsonCatalogProperty : public JsonObject {
|
||||
public:
|
||||
static void initialize ();
|
||||
JsonCatalogProperty ( unsigned long );
|
||||
virtual string getTypeName () const;
|
||||
virtual JsonCatalogProperty* clone ( unsigned long ) const;
|
||||
virtual void toData ( JsonStack& );
|
||||
};
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Inline Functions.
|
||||
|
||||
|
@ -193,7 +222,7 @@ namespace CRL {
|
|||
inline bool Catalog::State::setDelete ( bool value ) { return setFlags(Delete ,value); }
|
||||
inline bool Catalog::State::setPhysical ( bool value ) { return setFlags(Physical ,value); }
|
||||
inline bool Catalog::State::setLogical ( bool value ) { return setFlags(Logical ,value); }
|
||||
inline Cell* Catalog::State::setCell ( Cell* cell ) { return _cell = cell; }
|
||||
inline bool Catalog::State::setInMemory ( bool value ) { return setFlags(InMemory ,value); }
|
||||
inline Library* Catalog::State::setLibrary ( Library* library ) { return _library = library; }
|
||||
inline void Catalog::State::setDepth ( unsigned int depth ) { _depth = depth; }
|
||||
inline Cell* Catalog::State::getCell () const { return _cell; }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -29,7 +29,9 @@ namespace CRL {
|
|||
|
||||
using std::string;
|
||||
using std::map;
|
||||
|
||||
using Hurricane::JsonObject;
|
||||
using Hurricane::JsonStack;
|
||||
using Hurricane::Initializer;
|
||||
using Hurricane::Record;
|
||||
using Hurricane::DbU;
|
||||
using Hurricane::Name;
|
||||
|
@ -38,7 +40,6 @@ namespace CRL {
|
|||
// -------------------------------------------------------------------
|
||||
// Class : "CRL::CellGauge".
|
||||
|
||||
|
||||
class CellGauge {
|
||||
|
||||
public:
|
||||
|
@ -57,6 +58,7 @@ namespace CRL {
|
|||
inline const DbU::Unit getSliceStep () const;
|
||||
CellGauge* getClone () const;
|
||||
// Hurricane management.
|
||||
void toJson ( JsonWriter* ) const;
|
||||
virtual string _getTypeName () const;
|
||||
virtual string _getString () const;
|
||||
virtual Record* _getRecord () const;
|
||||
|
@ -96,6 +98,19 @@ namespace CRL {
|
|||
inline const DbU::Unit CellGauge::getSliceStep () const { return _sliceStep; }
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "JsonCellGauge".
|
||||
|
||||
class JsonCellGauge : public JsonObject {
|
||||
public:
|
||||
static void initialize ();
|
||||
JsonCellGauge ( unsigned long flags );
|
||||
virtual string getTypeName () const;
|
||||
virtual JsonCellGauge* clone ( unsigned long flags ) const;
|
||||
virtual void toData ( JsonStack& );
|
||||
};
|
||||
|
||||
|
||||
} // namespace CRL.
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2010-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2010-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -19,11 +19,18 @@
|
|||
|
||||
#include <regex.h>
|
||||
#include <string>
|
||||
#include <crlcore/SearchPath.h>
|
||||
#include "hurricane/Commons.h"
|
||||
#include "crlcore/SearchPath.h"
|
||||
|
||||
|
||||
namespace CRL {
|
||||
|
||||
using Hurricane::JsonObject;
|
||||
using Hurricane::JsonStack;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Environment".
|
||||
|
||||
class Environment {
|
||||
public:
|
||||
|
@ -76,6 +83,7 @@ namespace CRL {
|
|||
void addSYSTEM_LIBRARY ( const char* value, const char* libName, unsigned int mode=Append );
|
||||
// Methods.
|
||||
std::string getPrint () const;
|
||||
void toJson ( JsonWriter* ) const;
|
||||
inline std::string _getTypeName () const;
|
||||
std::string _getString () const;
|
||||
Record* _getRecord () const;
|
||||
|
@ -134,6 +142,19 @@ namespace CRL {
|
|||
inline std::string Environment::_getTypeName () const { return "Environment"; }
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "JsonEnvironment".
|
||||
|
||||
class JsonEnvironment : public JsonObject {
|
||||
public:
|
||||
static void initialize ();
|
||||
JsonEnvironment ( unsigned long flags );
|
||||
virtual std::string getTypeName () const;
|
||||
virtual JsonEnvironment* clone ( unsigned long flags ) const;
|
||||
virtual void toData ( JsonStack& );
|
||||
};
|
||||
|
||||
|
||||
} // CRL namespace.
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2009-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2009-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2014-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2014-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue