Compare commits
7 Commits
ef004a955b
...
9b8ea64545
Author | SHA1 | Date |
---|---|---|
|
9b8ea64545 | |
|
1d7a415e9f | |
|
d2a621629a | |
|
d2e1ab3796 | |
|
1afc48fb4c | |
|
db26e14358 | |
|
fed586385c |
|
@ -94,12 +94,14 @@
|
|||
set(ADDTIONAL_FLAGS "")
|
||||
set(CXX_STANDARD "c++11")
|
||||
endif()
|
||||
#set(CMAKE_C_FLAGS_DEBUG " -Wall -fsanitize=address ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE)
|
||||
set(CMAKE_C_FLAGS_DEBUG " -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE)
|
||||
set(CMAKE_C_FLAGS_DEBUG " -Wall -fsanitize=address ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE)
|
||||
#set(CMAKE_C_FLAGS_DEBUG " -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE)
|
||||
set(CMAKE_C_FLAGS_RELEASE " -Wall -O2 ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C Compiler Release options." FORCE)
|
||||
#set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall -fsanitize=address ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE)
|
||||
#set(CMAKE_C_FLAGS_RELEASE " -Wall -fsanitize=address ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C Compiler Release options." FORCE)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall -fsanitize=address ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug 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)
|
||||
#set(CMAKE_CXX_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -fsanitize=address ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C++ Compiler Release options." FORCE)
|
||||
|
||||
|
||||
#
|
||||
|
|
|
@ -726,11 +726,15 @@ namespace {
|
|||
else if (not net) { // Net doesn't exist yet
|
||||
plugNet->addAlias( netName );
|
||||
}
|
||||
else if (plugNet != net){ // Plus already connected to another net
|
||||
else if (plugNet != net){ // Plug already connected to another net
|
||||
if (not plugNet->isExternal()) {
|
||||
net->merge( plugNet );
|
||||
plugNet = net;
|
||||
}
|
||||
else {
|
||||
plugNet->merge( net );
|
||||
net = plugNet;
|
||||
}
|
||||
else plugNet->merge( net );
|
||||
}
|
||||
|
||||
// if (subckt->getModel()->getCell()->getName() == "sm0") {
|
||||
|
|
|
@ -61,6 +61,7 @@ namespace CRL {
|
|||
// VHDL reserved keywords (scalar).
|
||||
if (loweredName == "in" ) return "in_v";
|
||||
if (loweredName == "out" ) return "out_v";
|
||||
if (loweredName == "ref" ) return "ref_v";
|
||||
if (loweredName == "inout") return "inout_v";
|
||||
if (loweredName == "true" ) return "bool_true";
|
||||
if (loweredName == "false") return "bool_false";
|
||||
|
|
|
@ -312,6 +312,7 @@ class Block ( object ):
|
|||
, IoPin.SOUTH : Side( self.conf, IoPin.SOUTH )
|
||||
, IoPin.NORTH : Side( self.conf, IoPin.NORTH )
|
||||
}
|
||||
self.etesian = None
|
||||
if not self.conf.cell.getAbutmentBox().isEmpty():
|
||||
isBuilt = True
|
||||
for instance in self.conf.cell.getInstances():
|
||||
|
@ -467,7 +468,7 @@ class Block ( object ):
|
|||
def flattenNets ( self ):
|
||||
if self.flags & Block.FLATTENED: return
|
||||
if self.conf.isCoreBlock:
|
||||
self.conf.corona.flattenNets( self.conf.icore, self.conf.hTreeNames, Cell.Flags_NoClockFlatten )
|
||||
self.conf.corona.flattenNets( None, self.excludedNets, Cell.Flags_NoClockFlatten )
|
||||
else:
|
||||
self.conf.cell.flattenNets( None, self.excludedNets, Cell.Flags_NoClockFlatten )
|
||||
self.flags |= Block.FLATTENED
|
||||
|
@ -633,6 +634,8 @@ class Block ( object ):
|
|||
|
||||
def initEtesian ( self ):
|
||||
editor = self.conf.editor
|
||||
if self.etesian:
|
||||
return
|
||||
if self.conf.isCoreBlock:
|
||||
self.etesian = Etesian.EtesianEngine.create( self.conf.corona )
|
||||
self.etesian.setBlock( self.conf.icore )
|
||||
|
@ -641,9 +644,10 @@ class Block ( object ):
|
|||
Breakpoint.stop( 100, 'Block.place(), corona loaded.')
|
||||
else:
|
||||
self.etesian = Etesian.EtesianEngine.create( self.conf.cell )
|
||||
self.etesian.getCell().flattenNets( None, self.excludedNets, Cell.Flags_NoClockFlatten )
|
||||
self.flattenNets()
|
||||
|
||||
def place ( self ):
|
||||
self.initEtesian()
|
||||
if self.conf.placeArea:
|
||||
self.etesian.setPlaceArea( self.conf.placeArea )
|
||||
if self.conf.useHFNS: self.etesian.doHFNS()
|
||||
|
@ -793,7 +797,6 @@ class Block ( object ):
|
|||
blockInstance.block.build()
|
||||
if editor: editor.setCell( self.conf.cellPnR )
|
||||
self.conf.cfg.apply()
|
||||
self.initEtesian()
|
||||
iteration = -1
|
||||
while True:
|
||||
iteration += 1
|
||||
|
@ -803,9 +806,10 @@ class Block ( object ):
|
|||
self.placeIoPins()
|
||||
self.checkIoPins()
|
||||
self.spares.build()
|
||||
#if self.conf.useHFNS: self.findHfnTrees4()
|
||||
#if self.conf.useHFNS: self.findHfnTrees4()
|
||||
self.initEtesian()
|
||||
self.addHTrees()
|
||||
#if self.conf.useHFNS: self.addHfnBuffers()
|
||||
#if self.conf.useHFNS: self.addHfnBuffers()
|
||||
if editor: editor.fit()
|
||||
#Breakpoint.stop( 0, 'Clock tree(s) done.' )
|
||||
self.place()
|
||||
|
|
|
@ -478,6 +478,7 @@ class Builder ( object ):
|
|||
message += [ '\n - {} {}'.format(plug,plug.getInstance()) ]
|
||||
raise ErrorMessage( 1, message )
|
||||
return
|
||||
if not coronaNet.isExternal(): return
|
||||
coronaPin = None
|
||||
for pin in coronaNet.getPins():
|
||||
coronaPin = pin
|
||||
|
|
|
@ -18,6 +18,7 @@ from Hurricane import Breakpoint
|
|||
from Hurricane import Box
|
||||
from Hurricane import Vertical
|
||||
from Hurricane import RoutingPad
|
||||
from helpers import trace
|
||||
|
||||
|
||||
def breakpoint ( editor, level, message ):
|
||||
|
@ -96,3 +97,45 @@ def hpathToName ( path ):
|
|||
if len(s): s += '_'
|
||||
s += head.getName()
|
||||
return s
|
||||
|
||||
|
||||
def getInstanceMatching ( cell, pattern, level=0 ):
|
||||
"""
|
||||
getInstanceMatching(): returns first instance with the word being searched.
|
||||
"""
|
||||
for instance in cell.getInstances():
|
||||
name = instance.getName()
|
||||
if pattern in name:
|
||||
trace( 550, '\t{} {} match pattern "{}"\n'.format(' '*level,instance,pattern) )
|
||||
return instance
|
||||
return None
|
||||
|
||||
|
||||
def rgetInstanceMatching ( cell, path, level=0 ):
|
||||
"""
|
||||
Get the instance designated by path (recursively). The path argument can be
|
||||
either a string of instance names separated by dots or directly a list of
|
||||
instances names.
|
||||
|
||||
It also "reconstructs" the actual full path name of the instances
|
||||
found recursively.
|
||||
"""
|
||||
if isinstance(path,str):
|
||||
path = path.split( '.' )
|
||||
elif not isinstance(path, list):
|
||||
raise ErrorMessage( 1, 'rgetInstanceMatching(): "path" argument is ' \
|
||||
'neither a string or a list ({})."' \
|
||||
.format(path) )
|
||||
# Find instance at this level.
|
||||
instance = getInstanceMatching( cell, path[0], level )
|
||||
if instance is None:
|
||||
raise ErrorMessage( 1, 'rgetInstanceMatching(): No instance "{}" in cell "{}".' \
|
||||
.format(path[0], cell.getName()) )
|
||||
iname = instance.getName()
|
||||
# Last instance (leaf search), return it.
|
||||
if len(path) == 1:
|
||||
return instance, iname
|
||||
# Chew down another level, another brick in the wall
|
||||
rinstance, rname = rgetInstanceLike( instance.getMasterCell(), path[1:], level+1 )
|
||||
# Accumulate the names recursively found "level0.level1.level2..."
|
||||
return rinstance, '{}.{}'.format( iname, rname )
|
||||
|
|
|
@ -116,8 +116,6 @@ namespace {
|
|||
inline Net* getCk () const;
|
||||
inline Net* getBlockage () const;
|
||||
inline void setBlockage ( Net* );
|
||||
private:
|
||||
bool guessGlobalNet ( const Name&, Net* );
|
||||
private:
|
||||
uint32_t _flags;
|
||||
Name _vddCoreName;
|
||||
|
@ -217,37 +215,6 @@ namespace {
|
|||
}
|
||||
|
||||
|
||||
bool GlobalNetTable::guessGlobalNet ( const Name& name, Net* net )
|
||||
{
|
||||
if (name == _vddCoreName) {
|
||||
cmess1 << " - Using <" << net->getName() << "> as core (internal:vdd) power net." << endl;
|
||||
_vdd = net;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (name == _vssCoreName) {
|
||||
cmess1 << " - Using <" << net->getName() << "> as core (internal:vss) ground net." << endl;
|
||||
_vss = net;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (name == _ckCoreName) {
|
||||
cmess1 << " - Using <" << net->getName() << "> as core (internal:ck) clock net." << endl;
|
||||
_ck = net;
|
||||
|
||||
if (NetRoutingExtension::isMixedPreRoute(_ck)) {
|
||||
cmess1 << " (core clock net is already routed)" << endl;
|
||||
_flags |= ClockIsRouted;
|
||||
} else {
|
||||
cmess1 << " (core clock net will be routed as an ordinary signal)" << endl;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Net* GlobalNetTable::getRootNet ( const Net* net, Path path ) const
|
||||
{
|
||||
cdebug_log(159,0) << " getRootNet:" << path << ":" << net << endl;
|
||||
|
@ -255,21 +222,20 @@ namespace {
|
|||
if (net == _blockage) return _blockage;
|
||||
if (net->getType() == Net::Type::POWER ) return _vdd;
|
||||
if (net->getType() == Net::Type::GROUND) return _vss;
|
||||
if (net->getType() != Net::Type::CLOCK ) return NULL;
|
||||
|
||||
// Track up, *only* for clocks.
|
||||
const Net* upNet = net;
|
||||
|
||||
if (not path.isEmpty()) {
|
||||
cdebug_log(159,0) << " Path is *not* empty:" << path << endl;
|
||||
DeepNet* deepClockNet = getTopCell()->getDeepNet( path, net );
|
||||
if (deepClockNet) {
|
||||
cdebug_log(159,0) << " Deep Clock Net:" << deepClockNet
|
||||
<< " state:" << NetRoutingExtension::getFlags(deepClockNet) << endl;
|
||||
DeepNet* deepNet = getTopCell()->getDeepNet( path, net );
|
||||
if (deepNet) {
|
||||
cdebug_log(159,0) << " Deep Clock Net:" << deepNet
|
||||
<< " state:" << NetRoutingExtension::getFlags(deepNet) << endl;
|
||||
|
||||
return NetRoutingExtension::isFixed(deepClockNet) ? _blockage : NULL;
|
||||
return NetRoutingExtension::isFixed(deepNet) ? _blockage : NULL;
|
||||
} else {
|
||||
cdebug_log(159,0) << " Top Clock Net:" << net
|
||||
cdebug_log(159,0) << " Top DeepNet:" << net
|
||||
<< " state:" << NetRoutingExtension::getFlags(net) << endl;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue