* ./crlcore/src/ccore:
- New: In Utilities, uses the new Backtrace to print the stack before core-dumping. - New: In Environment, pattern recognition of Pad model names. - New: In AllianceFramework, pattern recognition of Pad model names. - Bug: In Measures, add inspector support and uses pointer to prevent using copy construction. Makes the inspector to core-dump. - New: In RoutingLayerGauge, inspector support for Constant::Direction. - Change: In ApDriver, correct managment of BIGVIA sizes. BIGVIA in one metal keep their sizes, but BIGVIA whith cut must be expandeds to contains their enclosure in metals. In Hurricane VIA size are relatives to the cut but in Alliance, to the biggest metal. Generate correct direction (always UP or RIGHT) for segments. - Change: In ApParser, shrink BIGVIA to the size of their cut from the Alliance format. Avoid VIA "bloating". More thorough verification of Segment data coherency, mainly with direction. Suppress warning of non-existent logical instance in the special case of "padreal". - Change: In VstParserGrammar, perform an explicit plug connection on globals Nets if the names of globals Nets differs. - New: In display.xml, add style for printers (B&W). - Bug: In technology.symbolic.xml, BLOCKAGE6 was associated to metal6 instead of blockage6. Correct extensions value for VIA metal layers above cut1. - Bug: In Utilities, in System singleton constructor check of duplicated type_info/RTTI initialization. Occurs when python modules are useds. CRL must always be included first.
This commit is contained in:
parent
8be83b1ae0
commit
2c50fae3d3
|
@ -28,7 +28,7 @@
|
||||||
<drawingstyle name="fallback" color="238,238,238" border="1" pattern="55AA55AA55AA55AA"/>
|
<drawingstyle name="fallback" color="238,238,238" border="1" pattern="55AA55AA55AA55AA"/>
|
||||||
<drawingstyle name="background" color="50,50,50" border="1"/>
|
<drawingstyle name="background" color="50,50,50" border="1"/>
|
||||||
<drawingstyle name="foreground" color="255,255,255" border="1"/>
|
<drawingstyle name="foreground" color="255,255,255" border="1"/>
|
||||||
<drawingstyle name="rubber" color="192,0,192" border="4" threshold="0.02"/>
|
<drawingstyle name="rubber" color="192,0,192" border="2" threshold="0.02"/>
|
||||||
<drawingstyle name="phantom" color="139,134,130" border="1"/>
|
<drawingstyle name="phantom" color="139,134,130" border="1"/>
|
||||||
<drawingstyle name="boundaries" color="208,199,192" border="1" pattern="0000000000000000" threshold="0"/>
|
<drawingstyle name="boundaries" color="208,199,192" border="1" pattern="0000000000000000" threshold="0"/>
|
||||||
<drawingstyle name="marker" color="80,250,80" border="1"/>
|
<drawingstyle name="marker" color="80,250,80" border="1"/>
|
||||||
|
@ -251,5 +251,73 @@
|
||||||
<drawingstyle name="active" color="175,175,175" pattern="0000000000000000" threshold="1.50" border="2"/>
|
<drawingstyle name="active" color="175,175,175" pattern="0000000000000000" threshold="1.50" border="2"/>
|
||||||
</group>
|
</group>
|
||||||
</displaystyle>
|
</displaystyle>
|
||||||
|
<displaystyle name="Printer.Coriolis">
|
||||||
|
<description>Coriolis Look for Printers</description>
|
||||||
|
<darkening>3.0</darkening>
|
||||||
|
<group name="Viewer">
|
||||||
|
<drawingstyle name="fallback" color="238,238,238" border="1" pattern="55AA55AA55AA55AA"/>
|
||||||
|
<drawingstyle name="background" color="255,255,255" border="1"/>
|
||||||
|
<drawingstyle name="foreground" color="0,0,0" border="1"/>
|
||||||
|
<drawingstyle name="rubber" color="192,0,192" border="4" threshold="0.02"/>
|
||||||
|
<drawingstyle name="phantom" color="139,134,130" border="1"/>
|
||||||
|
<drawingstyle name="boundaries" color="0,0,0" border="1" pattern="0000000000000000" threshold="0"/>
|
||||||
|
<drawingstyle name="marker" color="80,250,80" border="1"/>
|
||||||
|
<drawingstyle name="selectionDraw" color="0,0,0" border="1"/>
|
||||||
|
<drawingstyle name="selectionFill" color="0,0,0" border="1"/>
|
||||||
|
<drawingstyle name="grid" color="0,0,0" border="1" threshold="2.0"/>
|
||||||
|
<drawingstyle name="spot" color="0,0,0" border="2" threshold="6.0"/>
|
||||||
|
<drawingstyle name="ghost" color="0,0,0" border="1"/>
|
||||||
|
<drawingstyle name="text.ruler" color="0,0,0" border="1" threshold="0.0"/>
|
||||||
|
<drawingstyle name="text.instance" color="0,0,0" border="1" threshold="4.0"/>
|
||||||
|
<drawingstyle name="text.reference" color="0,0,0" border="1" threshold="20.0"/>
|
||||||
|
<drawingstyle name="undef" color="238,130,238" border="0" pattern="2244118822441188"/>
|
||||||
|
<drawingstyle name="mauka.container" color="139,0,139" border="4" pattern="0000000000000000" goMatched="false"/>
|
||||||
|
</group>
|
||||||
|
<group name="Active Layers">
|
||||||
|
<drawingstyle name="nWell" color="210,180,140" pattern="55AA55AA55AA55AA" threshold="1.50"/>
|
||||||
|
<drawingstyle name="pWell" color="255,255,224" pattern="55AA55AA55AA55AA" threshold="1.50"/>
|
||||||
|
<drawingstyle name="nImplant" color="124,252,0" pattern="55AA55AA55AA55AA" threshold="1.50"/>
|
||||||
|
<drawingstyle name="pImplant" color="255,255,0" pattern="55AA55AA55AA55AA" threshold="1.50"/>
|
||||||
|
<drawingstyle name="active" color="255,255,255" pattern="bbddee77bbddee77" threshold="1.50"/>
|
||||||
|
<drawingstyle name="poly" color="255,0,0" pattern="55AA55AA55AA55AA" threshold="1.50"/>
|
||||||
|
</group>
|
||||||
|
<group name="Routing Layers">
|
||||||
|
<drawingstyle name="metal1" color="0,0,0" pattern="AA55AA55AA55AA55" threshold="0.80"/>
|
||||||
|
<drawingstyle name="metal2" color="0,0,0" pattern="8822882288228822" threshold="0.02"/>
|
||||||
|
<drawingstyle name="metal3" color="0,0,0" pattern="4411441144114411" threshold="0.02"/>
|
||||||
|
<drawingstyle name="metal4" color="127,127,127" pattern="2288228822882288" threshold="0.02"/>
|
||||||
|
<drawingstyle name="metal5" color="127,127,127" pattern="1144114411441144" threshold="0.02"/>
|
||||||
|
<drawingstyle name="metal6" color="0,0,0" pattern="8822882288228822" threshold="0.02"/>
|
||||||
|
</group>
|
||||||
|
<group name="Cuts (VIA holes)">
|
||||||
|
<drawingstyle name="cut0" color="0,0,0" threshold="1.50"/>
|
||||||
|
<drawingstyle name="cut1" color="0,0,0" threshold="0.80"/>
|
||||||
|
<drawingstyle name="cut2" color="0,0,0" threshold="0.80"/>
|
||||||
|
<drawingstyle name="cut3" color="127,127,127" threshold="0.80"/>
|
||||||
|
<drawingstyle name="cut4" color="127,127,127" threshold="0.80"/>
|
||||||
|
<drawingstyle name="cut5" color="0,0,0" threshold="0.80"/>
|
||||||
|
</group>
|
||||||
|
<group name="MIM6">
|
||||||
|
<drawingstyle name="topmim6" color="0,0,255" pattern="AA55AA55AA55AA55" threshold="0.80"/>
|
||||||
|
<drawingstyle name="botmim6" color="0,255,255" pattern="8822882288228822" threshold="0.80"/>
|
||||||
|
<drawingstyle name="padopen" color="255,182,193" pattern="4411441144114411" threshold="0.80"/>
|
||||||
|
<drawingstyle name="alucap" color="0,255,0" pattern="2288228822882288" threshold="0.80"/>
|
||||||
|
</group>
|
||||||
|
<group name="Blockages">
|
||||||
|
<drawingstyle name="blockage1" color="0,0,255" pattern="006070381c0e0703" threshold="0.80" border="2"/>
|
||||||
|
<drawingstyle name="blockage2" color="0,255,255" pattern="8103060c183060c0" threshold="0.80" border="2"/>
|
||||||
|
<drawingstyle name="blockage3" color="255,182,193" pattern="8800220088002200" threshold="0.80" border="2"/>
|
||||||
|
<drawingstyle name="blockage4" color="0,255,0" pattern="2288228822882288" threshold="0.80" border="2"/>
|
||||||
|
<drawingstyle name="blockage5" color="255,255,0" pattern="1144114411441144" threshold="0.80" border="2"/>
|
||||||
|
<drawingstyle name="blockage6" color="238,130,238" pattern="8822882288228822" threshold="0.80" border="2"/>
|
||||||
|
</group>
|
||||||
|
<group name="Knick & Kite">
|
||||||
|
<drawingstyle name="SPL1" color="255,0,0"/>
|
||||||
|
<drawingstyle name="AutoLayer" color="255,0,255"/>
|
||||||
|
<drawingstyle name="gmetalh" color="128,255,200" pattern="8822882288228822" border="1"/>
|
||||||
|
<drawingstyle name="gmetalv" color="200,200,255" pattern="4411441144114411" border="1"/>
|
||||||
|
<drawingstyle name="gcut" color="255,255,190" border="1"/>
|
||||||
|
</group>
|
||||||
|
</displaystyle>
|
||||||
</displaystyles>
|
</displaystyles>
|
||||||
</graphics>
|
</graphics>
|
||||||
|
|
|
@ -183,7 +183,7 @@
|
||||||
<layer name="blockage5"/>
|
<layer name="blockage5"/>
|
||||||
</regularlayer>
|
</regularlayer>
|
||||||
<regularlayer name="BLOCKAGE6" type="UNDEFINED">
|
<regularlayer name="BLOCKAGE6" type="UNDEFINED">
|
||||||
<layer name="metal6"/>
|
<layer name="blockage6"/>
|
||||||
</regularlayer>
|
</regularlayer>
|
||||||
|
|
||||||
<!-- Special BasicLayers for Knik/Kite routers -->
|
<!-- Special BasicLayers for Knik/Kite routers -->
|
||||||
|
@ -257,11 +257,11 @@
|
||||||
<rule name="METAL1.minimum.width" value="1.0"/>
|
<rule name="METAL1.minimum.width" value="1.0"/>
|
||||||
<rule name="METAL1.metal1.extention.cap" value="0.5"/>
|
<rule name="METAL1.metal1.extention.cap" value="0.5"/>
|
||||||
<rule name="METAL2.minimum.width" value="1.0"/>
|
<rule name="METAL2.minimum.width" value="1.0"/>
|
||||||
<rule name="METAL2.metal2.extention.cap" value="0.5"/>
|
<rule name="METAL2.metal2.extention.cap" value="1.0"/>
|
||||||
<rule name="METAL3.minimum.width" value="1.0"/>
|
<rule name="METAL3.minimum.width" value="1.0"/>
|
||||||
<rule name="METAL3.metal3.extention.cap" value="0.5"/>
|
<rule name="METAL3.metal3.extention.cap" value="1.0"/>
|
||||||
<rule name="METAL4.minimum.width" value="1.0"/>
|
<rule name="METAL4.minimum.width" value="1.0"/>
|
||||||
<rule name="METAL4.metal4.extention.cap" value="0.5"/>
|
<rule name="METAL4.metal4.extention.cap" value="1.0"/>
|
||||||
<rule name="METAL5.minimum.width" value="2.0"/>
|
<rule name="METAL5.minimum.width" value="2.0"/>
|
||||||
<rule name="METAL5.metal5.extention.cap" value="1.0"/>
|
<rule name="METAL5.metal5.extention.cap" value="1.0"/>
|
||||||
<rule name="METAL6.minimum.width" value="2.0"/>
|
<rule name="METAL6.minimum.width" value="2.0"/>
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<!-- Miscellaneous -->
|
<!-- Miscellaneous -->
|
||||||
<parameter id="misc.catchCore" type="bool" value="true"/>
|
<parameter id="misc.catchCore" type="bool" value="true"/>
|
||||||
<parameter id="misc.verboseLevel1" type="bool" value="true"/>
|
<parameter id="misc.verboseLevel1" type="bool" value="false"/>
|
||||||
<parameter id="misc.verboseLevel2" type="bool" value="false"/>
|
<parameter id="misc.verboseLevel2" type="bool" value="false"/>
|
||||||
<parameter id="misc.info" type="bool" value="false"/>
|
<parameter id="misc.info" type="bool" value="false"/>
|
||||||
<parameter id="misc.logMode" type="bool" value="true"/>
|
<parameter id="misc.logMode" type="bool" value="false"/>
|
||||||
<parameter id="misc.traceLevel" type="int" value="1000" min="0"/>
|
<parameter id="misc.traceLevel" type="int" value="1000" min="0"/>
|
||||||
<!-- Nimbus -->
|
<!-- Nimbus -->
|
||||||
<parameter id="nimbus.cellGauge" type="string" value="sxlib"/>
|
<parameter id="nimbus.cellGauge" type="string" value="sxlib"/>
|
||||||
|
@ -132,7 +132,7 @@
|
||||||
<widget id="mauka.annealingRowMult" label="Annealing Row Mult (%)" column="1"/>
|
<widget id="mauka.annealingRowMult" label="Annealing Row Mult (%)" column="1"/>
|
||||||
<widget type="rule"/>
|
<widget type="rule"/>
|
||||||
</tab>
|
</tab>
|
||||||
<tab name="kite">
|
<tab name="Kite">
|
||||||
<widget type="title" label="Katabatic - Routing Database"/>
|
<widget type="title" label="Katabatic - Routing Database"/>
|
||||||
<widget id="katabatic.saturateRatio" label="Saturate Ratio (%)" column="0"/>
|
<widget id="katabatic.saturateRatio" label="Saturate Ratio (%)" column="0"/>
|
||||||
<widget id="katabatic.saturateRp" label="Saturate RoutingPad" column="0"/>
|
<widget id="katabatic.saturateRp" label="Saturate RoutingPad" column="0"/>
|
||||||
|
|
|
@ -535,6 +535,7 @@ namespace CRL {
|
||||||
setGROUND ( "vss" );
|
setGROUND ( "vss" );
|
||||||
setCLOCK ( "^ck$" );
|
setCLOCK ( "^ck$" );
|
||||||
setOBSTACLE ( "^obs$" );
|
setOBSTACLE ( "^obs$" );
|
||||||
|
setPad ( "^.*_px$" );
|
||||||
|
|
||||||
_LIBRARIES.append ( "." );
|
_LIBRARIES.append ( "." );
|
||||||
|
|
||||||
|
@ -548,6 +549,7 @@ namespace CRL {
|
||||||
regfree ( &_GroundRegex );
|
regfree ( &_GroundRegex );
|
||||||
regfree ( &_ClockRegex );
|
regfree ( &_ClockRegex );
|
||||||
regfree ( &_ObstacleRegex );
|
regfree ( &_ObstacleRegex );
|
||||||
|
regfree ( &_padRegex );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -591,6 +593,12 @@ namespace CRL {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Environment::isPad ( const char* name ) const
|
||||||
|
{
|
||||||
|
return regexec ( &_padRegex, name, 0, NULL, 0 ) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Environment::setPOWER ( const char* value )
|
void Environment::setPOWER ( const char* value )
|
||||||
{
|
{
|
||||||
_POWER = value;
|
_POWER = value;
|
||||||
|
@ -619,6 +627,13 @@ namespace CRL {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Environment::setPad ( const char* value )
|
||||||
|
{
|
||||||
|
_pad = value;
|
||||||
|
_setRegex ( &_padRegex , _pad , "Pad" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
string Environment::getPrint () const
|
string Environment::getPrint () const
|
||||||
{
|
{
|
||||||
ostringstream s;
|
ostringstream s;
|
||||||
|
@ -657,7 +672,9 @@ namespace CRL {
|
||||||
<< " - Power Signal := \"" << _POWER << "\"\n"
|
<< " - Power Signal := \"" << _POWER << "\"\n"
|
||||||
<< " - Ground Signal := \"" << _GROUND << "\"\n"
|
<< " - Ground Signal := \"" << _GROUND << "\"\n"
|
||||||
<< " - Clock Signal := \"" << _CLOCK << "\"\n"
|
<< " - Clock Signal := \"" << _CLOCK << "\"\n"
|
||||||
<< " - Obstacles := \"" << _OBSTACLE << "\"\n\n";
|
<< " - Obstacles := \"" << _OBSTACLE << "\"\n"
|
||||||
|
<< " o Special Cells.\n"
|
||||||
|
<< " - Pads := \"" << _pad << "\"\n\n";
|
||||||
|
|
||||||
return s.str();
|
return s.str();
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
namespace boptions = boost::program_options;
|
namespace boptions = boost::program_options;
|
||||||
|
|
||||||
#include "vlsisapd/configuration/Configuration.h"
|
#include "vlsisapd/configuration/Configuration.h"
|
||||||
|
#include "hurricane/Backtrace.h"
|
||||||
#include "hurricane/Warning.h"
|
#include "hurricane/Warning.h"
|
||||||
#include "hurricane/viewer/Script.h"
|
#include "hurricane/viewer/Script.h"
|
||||||
#include "crlcore/Utilities.h"
|
#include "crlcore/Utilities.h"
|
||||||
|
@ -247,10 +248,19 @@ namespace CRL {
|
||||||
if ( bfs::path::default_name_check_writable() )
|
if ( bfs::path::default_name_check_writable() )
|
||||||
bfs::path::default_name_check ( bfs::portable_posix_name );
|
bfs::path::default_name_check ( bfs::portable_posix_name );
|
||||||
|
|
||||||
|
// Check for duplicated type_info initialization.
|
||||||
|
const boptions::variable_value& value = arguments["coriolis_top"];
|
||||||
|
if ( value.value().type() != typeid(string) ) {
|
||||||
|
throw Error("type_info RTTI tree has been initialized twice.\n\n"
|
||||||
|
" This may be due to incorrect import of Python modules, please ensure\n"
|
||||||
|
" that the CRL module is always imported first."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
bfs::path sysConfDir ( SYS_CONF_DIR );
|
bfs::path sysConfDir ( SYS_CONF_DIR );
|
||||||
if ( not sysConfDir.has_root_path() ) {
|
if ( not sysConfDir.has_root_path() ) {
|
||||||
if ( arguments.count("coriolis_top") ) {
|
if ( arguments.count("coriolis_top") ) {
|
||||||
// const boptions::variable_value& value = arguments["coriolis_top"];
|
const boptions::variable_value& value = arguments["coriolis_top"];
|
||||||
// cerr << "value:"
|
// cerr << "value:"
|
||||||
// << " empty:" << boolalpha << value.empty()
|
// << " empty:" << boolalpha << value.empty()
|
||||||
// << " defaulted:" << boolalpha << value.defaulted()
|
// << " defaulted:" << boolalpha << value.defaulted()
|
||||||
|
@ -283,7 +293,7 @@ namespace CRL {
|
||||||
Cfg::getParamBool ("misc.verboseLevel1" ,true )->registerCb ( verboseLevel1Changed );
|
Cfg::getParamBool ("misc.verboseLevel1" ,true )->registerCb ( verboseLevel1Changed );
|
||||||
Cfg::getParamBool ("misc.verboseLevel2" ,true )->registerCb ( verboseLevel2Changed );
|
Cfg::getParamBool ("misc.verboseLevel2" ,true )->registerCb ( verboseLevel2Changed );
|
||||||
Cfg::getParamBool ("misc.info" ,false)->registerCb ( infoChanged );
|
Cfg::getParamBool ("misc.info" ,false)->registerCb ( infoChanged );
|
||||||
Cfg::getParamBool ("misc.logMode" ,true )->registerCb ( logModeChanged );
|
Cfg::getParamBool ("misc.logMode" ,false)->registerCb ( logModeChanged );
|
||||||
Cfg::getParamInt ("misc.traceLevel" ,1000 )->registerCb ( traceLevelChanged );
|
Cfg::getParamInt ("misc.traceLevel" ,1000 )->registerCb ( traceLevelChanged );
|
||||||
Cfg::getParamString("stratus1.mappingName","./stratus2sxlib.xml")->registerCb ( stratus1MappingNameChanged );
|
Cfg::getParamString("stratus1.mappingName","./stratus2sxlib.xml")->registerCb ( stratus1MappingNameChanged );
|
||||||
|
|
||||||
|
@ -348,6 +358,7 @@ namespace CRL {
|
||||||
void System::_trapSig ( int sig )
|
void System::_trapSig ( int sig )
|
||||||
{
|
{
|
||||||
cerr << "\n\n[CRL ERROR] System::_trapSig():\n" << endl;
|
cerr << "\n\n[CRL ERROR] System::_trapSig():\n" << endl;
|
||||||
|
cerr << "Program stack:\n" << Backtrace().textWhere() << endl;
|
||||||
|
|
||||||
switch ( sig ) {
|
switch ( sig ) {
|
||||||
case SIGINT:
|
case SIGINT:
|
||||||
|
|
|
@ -36,6 +36,7 @@ using namespace std;
|
||||||
#include "hurricane/RoutingPad.h"
|
#include "hurricane/RoutingPad.h"
|
||||||
#include "hurricane/Cell.h"
|
#include "hurricane/Cell.h"
|
||||||
#include "hurricane/Layer.h"
|
#include "hurricane/Layer.h"
|
||||||
|
#include "hurricane/RegularLayer.h"
|
||||||
#include "hurricane/Warning.h"
|
#include "hurricane/Warning.h"
|
||||||
|
|
||||||
#include "Ap.h"
|
#include "Ap.h"
|
||||||
|
@ -209,12 +210,16 @@ void DumpContacts(ofstream& ccell, Cell *cell)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
DbU::Unit expand = 0;
|
||||||
|
if ( not dynamic_cast<const RegularLayer*>(contact->getLayer()) )
|
||||||
|
expand = DbU::lambda(1.0);
|
||||||
|
|
||||||
if (toMBKLayer(mbkLayer,contact->getLayer()->getName(),true))
|
if (toMBKLayer(mbkLayer,contact->getLayer()->getName(),true))
|
||||||
ccell << "B "
|
ccell << "B "
|
||||||
<< toMBKlambda(contact->getX()) << ","
|
<< toMBKlambda(contact->getX()) << ","
|
||||||
<< toMBKlambda(contact->getY()) << ","
|
<< toMBKlambda(contact->getY()) << ","
|
||||||
<< toMBKlambda(contact->getWidth()) << ","
|
<< toMBKlambda(contact->getWidth () + expand) << ","
|
||||||
<< toMBKlambda(contact->getHeight()) << ","
|
<< toMBKlambda(contact->getHeight() + expand) << ","
|
||||||
<< mbkLayer << ","
|
<< mbkLayer << ","
|
||||||
<< toMBKName(contact->getNet()->getName())
|
<< toMBKName(contact->getNet()->getName())
|
||||||
<< endl;
|
<< endl;
|
||||||
|
@ -260,6 +265,9 @@ void DumpContacts(ofstream& ccell, Cell *cell)
|
||||||
} else
|
} else
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
const char* direction = "RIGHT";
|
||||||
|
if ( (x1 == x2) and (y1 != y2) ) direction = "UP";
|
||||||
|
|
||||||
if ( x1 > x2 ) swap ( x1, x2 );
|
if ( x1 > x2 ) swap ( x1, x2 );
|
||||||
if ( y1 > y2 ) swap ( y1, y2 );
|
if ( y1 > y2 ) swap ( y1, y2 );
|
||||||
|
|
||||||
|
@ -270,8 +278,8 @@ void DumpContacts(ofstream& ccell, Cell *cell)
|
||||||
<< toMBKlambda(x2) << ","
|
<< toMBKlambda(x2) << ","
|
||||||
<< toMBKlambda(y2) << ","
|
<< toMBKlambda(y2) << ","
|
||||||
<< toMBKlambda(width) << ","
|
<< toMBKlambda(width) << ","
|
||||||
<< toMBKName(component->getNet()->getName())
|
<< toMBKName(component->getNet()->getName()) << ","
|
||||||
<< ",RIGHT,"
|
<< direction << ","
|
||||||
<< mbkLayer
|
<< mbkLayer
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,7 @@
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
|
|
||||||
#include "hurricane/DataBase.h"
|
#include "hurricane/DataBase.h"
|
||||||
|
#include "hurricane/RegularLayer.h"
|
||||||
#include "hurricane/Technology.h"
|
#include "hurricane/Technology.h"
|
||||||
#include "hurricane/Pin.h"
|
#include "hurricane/Pin.h"
|
||||||
#include "hurricane/Contact.h"
|
#include "hurricane/Contact.h"
|
||||||
|
@ -172,23 +173,30 @@ namespace {
|
||||||
|
|
||||||
class ApParser {
|
class ApParser {
|
||||||
public:
|
public:
|
||||||
// Methods.
|
|
||||||
ApParser ( AllianceFramework* af );
|
ApParser ( AllianceFramework* af );
|
||||||
void loadFromFile ( const string& cellPath, Cell* cell );
|
void loadFromFile ( const string& cellPath, Cell* cell );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Internal: enum.
|
enum ParserState { StateVersion
|
||||||
enum ParserState { StateVersion
|
, StateHeader
|
||||||
, StateHeader
|
, StateBody
|
||||||
, StateBody
|
, StateEOF
|
||||||
, StateEOF
|
};
|
||||||
};
|
enum SegmentDirection { DirectionHorizontal=0x1
|
||||||
// Internal: static Attributes.
|
, DirectionVertical =0x2
|
||||||
|
, DirectionIncrease =0x4
|
||||||
|
, DirectionDecrease =0x8
|
||||||
|
, DirectionUndefined =0
|
||||||
|
, DirectionUp =DirectionVertical |DirectionIncrease
|
||||||
|
, DirectionDown =DirectionVertical |DirectionDecrease
|
||||||
|
, DirectionLeft =DirectionHorizontal|DirectionDecrease
|
||||||
|
, DirectionRight =DirectionHorizontal|DirectionIncrease
|
||||||
|
};
|
||||||
static LayerInformations _layerInformations;
|
static LayerInformations _layerInformations;
|
||||||
// Internal: Attributes.
|
|
||||||
AllianceFramework* _framework;
|
AllianceFramework* _framework;
|
||||||
string _cellPath;
|
string _cellPath;
|
||||||
Cell* _cell;
|
Cell* _cell;
|
||||||
|
Catalog::State* _state;
|
||||||
double _scaleRatio;
|
double _scaleRatio;
|
||||||
unsigned int _anonymousId;
|
unsigned int _anonymousId;
|
||||||
int _parserState;
|
int _parserState;
|
||||||
|
@ -204,6 +212,7 @@ namespace {
|
||||||
Net* _getNet ( const char* apName );
|
Net* _getNet ( const char* apName );
|
||||||
Net* _getAnonymousNet ();
|
Net* _getAnonymousNet ();
|
||||||
Net* _safeGetNet ( const char* apName );
|
Net* _safeGetNet ( const char* apName );
|
||||||
|
SegmentDirection _getApSegDirection ( const char* segDir );
|
||||||
void _parseVersion ();
|
void _parseVersion ();
|
||||||
void _parseHeader ();
|
void _parseHeader ();
|
||||||
void _parseAbutmentBox ();
|
void _parseAbutmentBox ();
|
||||||
|
@ -222,13 +231,14 @@ namespace {
|
||||||
|
|
||||||
|
|
||||||
ApParser::ApParser ( AllianceFramework* framework )
|
ApParser::ApParser ( AllianceFramework* framework )
|
||||||
: _framework(framework)
|
: _framework (framework)
|
||||||
, _cellPath()
|
, _cellPath ()
|
||||||
, _cell(NULL)
|
, _cell (NULL)
|
||||||
, _scaleRatio(100.0)
|
, _state (NULL)
|
||||||
|
, _scaleRatio (100.0)
|
||||||
, _anonymousId(0)
|
, _anonymousId(0)
|
||||||
, _parserState(StateVersion)
|
, _parserState(StateVersion)
|
||||||
, _lineNumber(0)
|
, _lineNumber (0)
|
||||||
{
|
{
|
||||||
if ( _layerInformations.empty() ) {
|
if ( _layerInformations.empty() ) {
|
||||||
_layerInformations.setTechnology ( DataBase::getDB()->getTechnology() );
|
_layerInformations.setTechnology ( DataBase::getDB()->getTechnology() );
|
||||||
|
@ -333,6 +343,19 @@ namespace {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline ApParser::SegmentDirection ApParser::_getApSegDirection ( const char* value )
|
||||||
|
{
|
||||||
|
if ( *value == '\0' ) return DirectionUndefined;
|
||||||
|
|
||||||
|
if ( string("UP" ).compare(value) == 0 ) return DirectionUp;
|
||||||
|
if ( string("DOWN" ).compare(value) == 0 ) return DirectionDown;
|
||||||
|
if ( string("LEFT" ).compare(value) == 0 ) return DirectionLeft;
|
||||||
|
if ( string("RIGHT").compare(value) == 0 ) return DirectionRight;
|
||||||
|
|
||||||
|
return DirectionUndefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Net* ApParser::_getNet ( const char* apName )
|
Net* ApParser::_getNet ( const char* apName )
|
||||||
{
|
{
|
||||||
string hName = apName;
|
string hName = apName;
|
||||||
|
@ -559,9 +582,14 @@ namespace {
|
||||||
net = _safeGetNet ( fields[5] );
|
net = _safeGetNet ( fields[5] );
|
||||||
layerInfo = _getLayerInformation ( fields[4] );
|
layerInfo = _getLayerInformation ( fields[4] );
|
||||||
|
|
||||||
if ( layerInfo )
|
|
||||||
Contact::create ( net, layerInfo->getLayer(), XVIA, YVIA, WIDTH, HEIGHT );
|
if ( layerInfo ) {
|
||||||
else
|
DbU::Unit shrink = 0;
|
||||||
|
if ( not dynamic_cast<const RegularLayer*>(layerInfo->getLayer()) )
|
||||||
|
shrink = DbU::lambda(1.0);
|
||||||
|
|
||||||
|
Contact::create ( net, layerInfo->getLayer(), XVIA, YVIA, WIDTH-shrink, HEIGHT-shrink );
|
||||||
|
} else
|
||||||
_printError ( false, "Unknown layer name %s.", fields[4] );
|
_printError ( false, "Unknown layer name %s.", fields[4] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -572,6 +600,7 @@ namespace {
|
||||||
static DbU::Unit X1, Y1, X2, Y2, WIDTH;
|
static DbU::Unit X1, Y1, X2, Y2, WIDTH;
|
||||||
static Net* net;
|
static Net* net;
|
||||||
static LayerInformation* layerInfo;
|
static LayerInformation* layerInfo;
|
||||||
|
static SegmentDirection segDir;
|
||||||
|
|
||||||
vector<char*> fields = _splitString ( _rawLine+2, ',' );
|
vector<char*> fields = _splitString ( _rawLine+2, ',' );
|
||||||
if ( fields.size() < 8 )
|
if ( fields.size() < 8 )
|
||||||
|
@ -583,20 +612,33 @@ namespace {
|
||||||
Y2 = _getUnit ( fields[3] );
|
Y2 = _getUnit ( fields[3] );
|
||||||
WIDTH = _getUnit ( fields[4] );
|
WIDTH = _getUnit ( fields[4] );
|
||||||
net = _safeGetNet ( fields[5] );
|
net = _safeGetNet ( fields[5] );
|
||||||
|
segDir = _getApSegDirection ( fields[6] );
|
||||||
layerInfo = _getLayerInformation ( fields[7] );
|
layerInfo = _getLayerInformation ( fields[7] );
|
||||||
|
|
||||||
if ( layerInfo ) {
|
if ( layerInfo ) {
|
||||||
Segment* segment = NULL;
|
Segment* segment = NULL;
|
||||||
if ( X1 == X2 ) {
|
if ( (X1 == X2) and (Y1 == Y2) ) {
|
||||||
segment = Vertical::create ( net, layerInfo->getLayer(), X1, WIDTH, Y1, Y2 );
|
if ( segDir & DirectionVertical )
|
||||||
} else if ( Y1 == Y2 ) {
|
segment = Vertical::create ( net, layerInfo->getLayer(), X1, WIDTH, Y1, Y2 );
|
||||||
segment = Horizontal::create ( net, layerInfo->getLayer(), Y1, WIDTH, X1, X2 );
|
else
|
||||||
} else {
|
segment = Horizontal::create ( net, layerInfo->getLayer(), Y1, WIDTH, X1, X2 );
|
||||||
_printError ( false, "Segment neither horizontal nor vertical." );
|
} else {
|
||||||
|
if ( X1 == X2 ) {
|
||||||
|
segment = Vertical::create ( net, layerInfo->getLayer(), X1, WIDTH, Y1, Y2 );
|
||||||
|
if ( segDir & DirectionHorizontal )
|
||||||
|
_printWarning ( "Inconsistent direction on Horizontal segment (neither UP nor DOWN)." );
|
||||||
|
} else if ( Y1 == Y2 ) {
|
||||||
|
segment = Horizontal::create ( net, layerInfo->getLayer(), Y1, WIDTH, X1, X2 );
|
||||||
|
if ( segDir & DirectionVertical )
|
||||||
|
_printWarning ( "Inconsistent direction on Horizontal segment (neither LEFT nor RIGHT)." );
|
||||||
|
} else {
|
||||||
|
_printError ( false, "Segment neither horizontal nor vertical." );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ( layerInfo->isConnector()) {
|
if ( layerInfo->isConnector()) {
|
||||||
if ( not net->isExternal() ) {
|
if ( not net->isExternal() ) {
|
||||||
_printWarning ( "External component on non-external net %s", getString(net->getName()).c_str() );
|
if ( _state->isLogical() )
|
||||||
|
_printWarning ( "External component on non-external net %s", getString(net->getName()).c_str() );
|
||||||
net->setExternal ( true );
|
net->setExternal ( true );
|
||||||
}
|
}
|
||||||
NetExternalComponents::setExternal(segment);
|
NetExternalComponents::setExternal(segment);
|
||||||
|
@ -624,6 +666,7 @@ namespace {
|
||||||
static Name ROT_M = "ROT_M";
|
static Name ROT_M = "ROT_M";
|
||||||
static Name SY_RM = "SY_RM";
|
static Name SY_RM = "SY_RM";
|
||||||
static Name SY_RP = "SY_RP";
|
static Name SY_RP = "SY_RP";
|
||||||
|
static Name padreal = "padreal";
|
||||||
|
|
||||||
vector<char*> fields = _splitString ( _rawLine+2, ',' );
|
vector<char*> fields = _splitString ( _rawLine+2, ',' );
|
||||||
if ( fields.size() < 5 )
|
if ( fields.size() < 5 )
|
||||||
|
@ -658,7 +701,7 @@ namespace {
|
||||||
instance->setPlacementStatus ( Instance::PlacementStatus::FIXED );
|
instance->setPlacementStatus ( Instance::PlacementStatus::FIXED );
|
||||||
} else {
|
} else {
|
||||||
Catalog::State* instanceState = _framework->getCatalog()->getState ( masterCellName );
|
Catalog::State* instanceState = _framework->getCatalog()->getState ( masterCellName );
|
||||||
if ( !instanceState || (!instanceState->isFeed()) ) {
|
if ( (masterCellName != padreal) and ( not instanceState or (not instanceState->isFeed()) ) ) {
|
||||||
_printError ( false
|
_printError ( false
|
||||||
, "No logical instance associated to physical instance %s."
|
, "No logical instance associated to physical instance %s."
|
||||||
, getString(instanceName).c_str()
|
, getString(instanceName).c_str()
|
||||||
|
@ -740,10 +783,9 @@ namespace {
|
||||||
if ( catalogProperty == NULL )
|
if ( catalogProperty == NULL )
|
||||||
throw Error ( "Missing CatalogProperty in cell %s.\n" , getString(cell->getName()).c_str() );
|
throw Error ( "Missing CatalogProperty in cell %s.\n" , getString(cell->getName()).c_str() );
|
||||||
|
|
||||||
Catalog::State *state = catalogProperty->getState ();
|
_state = catalogProperty->getState ();
|
||||||
|
_state->setPhysical ( true );
|
||||||
state->setPhysical ( true );
|
if ( _state->isFlattenLeaf() ) _cell->setFlattenLeaf ( true );
|
||||||
if ( state->isFlattenLeaf() ) _cell->setFlattenLeaf ( true );
|
|
||||||
|
|
||||||
IoFile fileStream ( cellPath );
|
IoFile fileStream ( cellPath );
|
||||||
fileStream.open ( "r" );
|
fileStream.open ( "r" );
|
||||||
|
|
|
@ -905,7 +905,8 @@ association_element
|
||||||
);
|
);
|
||||||
|
|
||||||
for ( unsigned int i=0 ; i < __ys->_masterNets.size() ; i++ )
|
for ( unsigned int i=0 ; i < __ys->_masterNets.size() ; i++ )
|
||||||
if ( !__ys->_masterNets[i]->isGlobal() )
|
if ( not __ys->_masterNets[i]->isGlobal()
|
||||||
|
or (__ys->_masterNets[i]->getName() != __ys->_instanceNets[i]->getName()) )
|
||||||
__ys->_instance->getPlug ( __ys->_masterNets[i] )->setNet ( __ys->_instanceNets[i] );
|
__ys->_instance->getPlug ( __ys->_masterNets[i] )->setNet ( __ys->_instanceNets[i] );
|
||||||
|
|
||||||
__ys->_masterPort = true;
|
__ys->_masterPort = true;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
#include "hurricane/Cell.h"
|
||||||
#include "crlcore/Environment.h"
|
#include "crlcore/Environment.h"
|
||||||
#include "crlcore/AllianceLibrary.h"
|
#include "crlcore/AllianceLibrary.h"
|
||||||
#include "crlcore/Catalog.h"
|
#include "crlcore/Catalog.h"
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
namespace CRL {
|
namespace CRL {
|
||||||
|
|
||||||
|
using Hurricane::Cell;
|
||||||
class RoutingGauge;
|
class RoutingGauge;
|
||||||
class CellGauge;
|
class CellGauge;
|
||||||
|
|
||||||
|
@ -68,6 +68,10 @@ namespace CRL {
|
||||||
inline bool isOBSTACLE ( const char* name );
|
inline bool isOBSTACLE ( const char* name );
|
||||||
inline bool isOBSTACLE ( const string& name );
|
inline bool isOBSTACLE ( const string& name );
|
||||||
inline bool isOBSTACLE ( const Name& name );
|
inline bool isOBSTACLE ( const Name& name );
|
||||||
|
inline bool isPad ( const char* name );
|
||||||
|
inline bool isPad ( const string& name );
|
||||||
|
inline bool isPad ( const Name& name );
|
||||||
|
inline bool isPad ( const Cell* );
|
||||||
// Accessors.
|
// Accessors.
|
||||||
inline Environment* getEnvironment ();
|
inline Environment* getEnvironment ();
|
||||||
inline Catalog* getCatalog ();
|
inline Catalog* getCatalog ();
|
||||||
|
@ -138,6 +142,10 @@ namespace CRL {
|
||||||
inline bool AllianceFramework::isOBSTACLE ( const char* name ) { return _environment.isOBSTACLE(name); }
|
inline bool AllianceFramework::isOBSTACLE ( const char* name ) { return _environment.isOBSTACLE(name); }
|
||||||
inline bool AllianceFramework::isOBSTACLE ( const string& name ) { return isOBSTACLE(name.c_str()); }
|
inline bool AllianceFramework::isOBSTACLE ( const string& name ) { return isOBSTACLE(name.c_str()); }
|
||||||
inline bool AllianceFramework::isOBSTACLE ( const Name& name ) { return isOBSTACLE(getString(name)); }
|
inline bool AllianceFramework::isOBSTACLE ( const Name& name ) { return isOBSTACLE(getString(name)); }
|
||||||
|
inline bool AllianceFramework::isPad ( const char* name ) { return _environment.isPad(name); }
|
||||||
|
inline bool AllianceFramework::isPad ( const string& name ) { return isPad(name.c_str()); }
|
||||||
|
inline bool AllianceFramework::isPad ( const Name& name ) { return isPad(getString(name)); }
|
||||||
|
inline bool AllianceFramework::isPad ( const Cell* cell ) { return isPad(cell->getName()); }
|
||||||
inline Environment* AllianceFramework::getEnvironment () { return &_environment; }
|
inline Environment* AllianceFramework::getEnvironment () { return &_environment; }
|
||||||
inline Catalog* AllianceFramework::getCatalog () { return &_catalog; }
|
inline Catalog* AllianceFramework::getCatalog () { return &_catalog; }
|
||||||
inline const Name& AllianceFramework::getParentLibraryName
|
inline const Name& AllianceFramework::getParentLibraryName
|
||||||
|
|
|
@ -62,6 +62,7 @@ namespace CRL {
|
||||||
inline const std::string& getGROUND () const;
|
inline const std::string& getGROUND () const;
|
||||||
inline const std::string& getCLOCK () const;
|
inline const std::string& getCLOCK () const;
|
||||||
inline const std::string& getOBSTACLE () const;
|
inline const std::string& getOBSTACLE () const;
|
||||||
|
inline const std::string& getPad () const;
|
||||||
inline const std::string& getCATALOG () const;
|
inline const std::string& getCATALOG () const;
|
||||||
inline SearchPath& getLIBRARIES ();
|
inline SearchPath& getLIBRARIES ();
|
||||||
|
|
||||||
|
@ -70,6 +71,7 @@ namespace CRL {
|
||||||
bool isGROUND ( const char* name ) const;
|
bool isGROUND ( const char* name ) const;
|
||||||
bool isCLOCK ( const char* name ) const;
|
bool isCLOCK ( const char* name ) const;
|
||||||
bool isOBSTACLE ( const char* name ) const;
|
bool isOBSTACLE ( const char* name ) const;
|
||||||
|
bool isPad ( const char* name ) const;
|
||||||
|
|
||||||
// Modifiers.
|
// Modifiers.
|
||||||
void loadFromXml ( const std::string& path="", bool warnNotFound=true );
|
void loadFromXml ( const std::string& path="", bool warnNotFound=true );
|
||||||
|
@ -87,6 +89,7 @@ namespace CRL {
|
||||||
void setGROUND ( const char* value );
|
void setGROUND ( const char* value );
|
||||||
void setCLOCK ( const char* value );
|
void setCLOCK ( const char* value );
|
||||||
void setOBSTACLE ( const char* value );
|
void setOBSTACLE ( const char* value );
|
||||||
|
void setPad ( const char* value );
|
||||||
inline void setCATALOG ( const char* value );
|
inline void setCATALOG ( const char* value );
|
||||||
inline void setWORKING_LIBRARY ( const char* value );
|
inline void setWORKING_LIBRARY ( const char* value );
|
||||||
void addSYSTEM_LIBRARY ( const char* value, unsigned int mode=Append );
|
void addSYSTEM_LIBRARY ( const char* value, unsigned int mode=Append );
|
||||||
|
@ -110,12 +113,14 @@ namespace CRL {
|
||||||
std::string _GROUND;
|
std::string _GROUND;
|
||||||
std::string _CLOCK;
|
std::string _CLOCK;
|
||||||
std::string _OBSTACLE;
|
std::string _OBSTACLE;
|
||||||
|
std::string _pad;
|
||||||
std::string _CATALOG;
|
std::string _CATALOG;
|
||||||
SearchPath _LIBRARIES;
|
SearchPath _LIBRARIES;
|
||||||
regex_t _PowerRegex;
|
regex_t _PowerRegex;
|
||||||
regex_t _GroundRegex;
|
regex_t _GroundRegex;
|
||||||
regex_t _ClockRegex;
|
regex_t _ClockRegex;
|
||||||
regex_t _ObstacleRegex;
|
regex_t _ObstacleRegex;
|
||||||
|
regex_t _padRegex;
|
||||||
bool _inConstructor;
|
bool _inConstructor;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -140,6 +145,7 @@ namespace CRL {
|
||||||
inline const std::string& Environment::getGROUND () const { return _GROUND; }
|
inline const std::string& Environment::getGROUND () const { return _GROUND; }
|
||||||
inline const std::string& Environment::getCLOCK () const { return _CLOCK; }
|
inline const std::string& Environment::getCLOCK () const { return _CLOCK; }
|
||||||
inline const std::string& Environment::getOBSTACLE () const { return _OBSTACLE; }
|
inline const std::string& Environment::getOBSTACLE () const { return _OBSTACLE; }
|
||||||
|
inline const std::string& Environment::getPad () const { return _pad; }
|
||||||
inline const std::string& Environment::getCATALOG () const { return _CATALOG; }
|
inline const std::string& Environment::getCATALOG () const { return _CATALOG; }
|
||||||
inline SearchPath& Environment::getLIBRARIES () { return _LIBRARIES; }
|
inline SearchPath& Environment::getLIBRARIES () { return _LIBRARIES; }
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ namespace CRL {
|
||||||
using Hurricane::Name;
|
using Hurricane::Name;
|
||||||
using Hurricane::StandardPrivateProperty;
|
using Hurricane::StandardPrivateProperty;
|
||||||
using Hurricane::DBo;
|
using Hurricane::DBo;
|
||||||
|
using Hurricane::Record;
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
@ -110,19 +111,29 @@ namespace CRL {
|
||||||
|
|
||||||
class MeasuresDatas {
|
class MeasuresDatas {
|
||||||
public:
|
public:
|
||||||
MeasuresDatas ();
|
MeasuresDatas ();
|
||||||
|
inline std::string _getTypeName () const;
|
||||||
|
inline std::string _getString () const;
|
||||||
|
inline Record* _getRecord () const;
|
||||||
public:
|
public:
|
||||||
MeasuresSet _measures;
|
MeasuresSet _measures;
|
||||||
|
private:
|
||||||
|
MeasuresDatas ( const MeasuresDatas& );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
inline std::string MeasuresDatas::_getTypeName () const { return "MeasuresDatas"; }
|
||||||
|
inline std::string MeasuresDatas::_getString () const { return "<MeasuresDatas>"; }
|
||||||
|
inline Record* MeasuresDatas::_getRecord () const { return NULL; }
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// Class : "CRL::Measures".
|
// Class : "CRL::Measures".
|
||||||
|
|
||||||
|
|
||||||
class Measures {
|
class Measures {
|
||||||
public:
|
public:
|
||||||
typedef StandardPrivateProperty<MeasuresDatas> Extension;
|
typedef StandardPrivateProperty<MeasuresDatas*> Extension;
|
||||||
public:
|
public:
|
||||||
template<typename Data> friend inline void addMeasure ( DBo*, const Name&, const Data&, unsigned int width=8 );
|
template<typename Data> friend inline void addMeasure ( DBo*, const Name&, const Data&, unsigned int width=8 );
|
||||||
template<typename Data> friend inline const Measure<Data>* getMeasure ( DBo*, const Name& );
|
template<typename Data> friend inline const Measure<Data>* getMeasure ( DBo*, const Name& );
|
||||||
|
@ -136,7 +147,7 @@ namespace CRL {
|
||||||
inline void addMeasure ( DBo* object, const Name& name, const Data& data, unsigned int width )
|
inline void addMeasure ( DBo* object, const Name& name, const Data& data, unsigned int width )
|
||||||
{
|
{
|
||||||
Measures::Extension* extension = Measures::_getOrCreate ( object );
|
Measures::Extension* extension = Measures::_getOrCreate ( object );
|
||||||
extension->getValue()._measures.insert ( std::make_pair(name,new Measure<Data>(name,data,width)) );
|
extension->getValue()->_measures.insert ( std::make_pair(name,new Measure<Data>(name,data,width)) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -144,9 +155,9 @@ namespace CRL {
|
||||||
inline const Measure<Data>* getMeasure ( DBo* object, const Name& name )
|
inline const Measure<Data>* getMeasure ( DBo* object, const Name& name )
|
||||||
{
|
{
|
||||||
Measures::Extension* extension = Measures::_getOrCreate ( object );
|
Measures::Extension* extension = Measures::_getOrCreate ( object );
|
||||||
MeasuresSet::iterator imeasure = extension->getValue()._measures.find(name);
|
MeasuresSet::iterator imeasure = extension->getValue()->_measures.find(name);
|
||||||
|
|
||||||
if ( imeasure != extension->getValue()._measures.end() )
|
if ( imeasure != extension->getValue()->_measures.end() )
|
||||||
return static_cast< Measure<Data>* >( (*imeasure).second );
|
return static_cast< Measure<Data>* >( (*imeasure).second );
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -156,4 +167,7 @@ namespace CRL {
|
||||||
} // End of CRL namespace.
|
} // End of CRL namespace.
|
||||||
|
|
||||||
|
|
||||||
|
INSPECTOR_P_SUPPORT(CRL::MeasuresDatas);
|
||||||
|
|
||||||
|
|
||||||
#endif // __STATISTICS_PROPERTY__
|
#endif // __STATISTICS_PROPERTY__
|
||||||
|
|
|
@ -207,6 +207,18 @@ inline std::string getString<const Constant::Direction*>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<>
|
||||||
|
inline std::string getString<Constant::Direction>
|
||||||
|
( Constant::Direction direction )
|
||||||
|
{
|
||||||
|
switch ( direction ) {
|
||||||
|
case Constant::Horizontal: return "Horizontal";
|
||||||
|
case Constant::Vertical: return "Vertical";
|
||||||
|
}
|
||||||
|
return ( "Unknown Constant::Direction" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
IOSTREAM_POINTER_SUPPORT(Constant::Direction);
|
IOSTREAM_POINTER_SUPPORT(Constant::Direction);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace CRL {
|
||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
Name StandardPrivateProperty<MeasuresDatas>::_name = "CRL::Measures";
|
Name StandardPrivateProperty<MeasuresDatas*>::_name = "CRL::Measures";
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
@ -120,7 +120,7 @@ namespace CRL {
|
||||||
{
|
{
|
||||||
Extension* extension = Extension::get ( object );
|
Extension* extension = Extension::get ( object );
|
||||||
if ( extension != NULL )
|
if ( extension != NULL )
|
||||||
return &extension->getValue()._measures;
|
return &extension->getValue()->_measures;
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ namespace CRL {
|
||||||
{
|
{
|
||||||
Extension* extension = Extension::get ( object );
|
Extension* extension = Extension::get ( object );
|
||||||
if ( extension == NULL ) {
|
if ( extension == NULL ) {
|
||||||
extension = Extension::create ();
|
extension = Extension::create ( new MeasuresDatas() );
|
||||||
object->put ( extension );
|
object->put ( extension );
|
||||||
}
|
}
|
||||||
return extension;
|
return extension;
|
||||||
|
|
Loading…
Reference in New Issue