lefexport: Make it useful for real processes
Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
e1c5366fef
commit
2f1caca812
|
@ -119,7 +119,7 @@ namespace {
|
||||||
|
|
||||||
|
|
||||||
int LefDriver::getUnits () { return _units; }
|
int LefDriver::getUnits () { return _units; }
|
||||||
double LefDriver::toLefUnits ( DbU::Unit u ) { return DbU::getLambda(u)/**getUnits()*/; }
|
double LefDriver::toLefUnits ( DbU::Unit u ) { return DbU::toMicrons(u)/**getUnits()*/; }
|
||||||
DbU::Unit LefDriver::getSliceHeight () { return _sliceHeight; }
|
DbU::Unit LefDriver::getSliceHeight () { return _sliceHeight; }
|
||||||
DbU::Unit LefDriver::getPitchWidth () { return _pitchWidth; };
|
DbU::Unit LefDriver::getPitchWidth () { return _pitchWidth; };
|
||||||
inline AllianceFramework* LefDriver::getFramework () { return _framework; }
|
inline AllianceFramework* LefDriver::getFramework () { return _framework; }
|
||||||
|
@ -144,9 +144,13 @@ namespace {
|
||||||
_pitchWidth = cg->getPitch ();
|
_pitchWidth = cg->getPitch ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_units = DbU::toGrid(DbU::fromMicrons(1.0));
|
||||||
|
|
||||||
_status = lefwInitCbk ( _lefStream );
|
_status = lefwInitCbk ( _lefStream );
|
||||||
if ( _status != 0 ) return;
|
if ( _status != 0 ) return;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
lefwSetVersionCbk ( _versionCbk );
|
lefwSetVersionCbk ( _versionCbk );
|
||||||
lefwSetBusBitCharsCbk ( _busBitCharsCbk );
|
lefwSetBusBitCharsCbk ( _busBitCharsCbk );
|
||||||
lefwSetDividerCharCbk ( _dividerCharCbk );
|
lefwSetDividerCharCbk ( _dividerCharCbk );
|
||||||
|
@ -207,7 +211,7 @@ namespace {
|
||||||
_status = lefwLayerRoutingPitch ( toLefUnits(lg->getPitch()) );
|
_status = lefwLayerRoutingPitch ( toLefUnits(lg->getPitch()) );
|
||||||
if ( _status != 0 ) return _status;
|
if ( _status != 0 ) return _status;
|
||||||
|
|
||||||
_status = lefwLayerRoutingSpacing ( toLefUnits(lg->getPitch()-lg->getWireWidth()-DbU::lambda(1.0)) );
|
_status = lefwLayerRoutingSpacing ( toLefUnits(lg->getPitch()-lg->getWireWidth()/*-DbU::lambda(1.0)*/) );
|
||||||
if ( _status != 0 ) return _status;
|
if ( _status != 0 ) return _status;
|
||||||
|
|
||||||
return _status = lefwEndLayerRouting ( layerName.c_str() );
|
return _status = lefwEndLayerRouting ( layerName.c_str() );
|
||||||
|
@ -491,7 +495,7 @@ namespace {
|
||||||
int status = 0;
|
int status = 0;
|
||||||
for ( size_t ilayer=0 ; ilayer<rg.size() ; ++ilayer ) {
|
for ( size_t ilayer=0 ; ilayer<rg.size() ; ++ilayer ) {
|
||||||
if ( ilayer > 0 ) {
|
if ( ilayer > 0 ) {
|
||||||
status = driver->_driveCutLayer ( technology->getCutBelow(rg[ilayer]->getLayer()) );
|
status = driver->_driveCutLayer ( technology->getCutBelow(rg[ilayer]->getLayer(), false) );
|
||||||
if ( status != 0 ) return driver->checkStatus(status);
|
if ( status != 0 ) return driver->checkStatus(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -566,7 +570,7 @@ namespace {
|
||||||
// The driver puts it before UNITS, which seems to displease Cadence Encounter.
|
// The driver puts it before UNITS, which seems to displease Cadence Encounter.
|
||||||
// So, as long as it doesn't prevent Encounter to works, disable it.
|
// So, as long as it doesn't prevent Encounter to works, disable it.
|
||||||
LefDriver* driver = (LefDriver*)udata;
|
LefDriver* driver = (LefDriver*)udata;
|
||||||
return driver->checkStatus ( lefwManufacturingGrid ( LefDriver::toLefUnits(DbU::fromLambda(0.5)) ) );
|
return driver->checkStatus ( lefwManufacturingGrid ( LefDriver::toLefUnits(DbU::fromGrid(1.0)) ) );
|
||||||
#else
|
#else
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
@ -604,10 +608,12 @@ namespace {
|
||||||
int status = 0;
|
int status = 0;
|
||||||
for ( size_t ilayer=1 ; ilayer<rg.size() ; ++ilayer ) {
|
for ( size_t ilayer=1 ; ilayer<rg.size() ; ++ilayer ) {
|
||||||
const Layer* topLayer = rg[ilayer]->getLayer();
|
const Layer* topLayer = rg[ilayer]->getLayer();
|
||||||
const Layer* bottomLayer = topLayer->getMetalBelow();
|
const Layer* bottomLayer = topLayer->getMetalBelow(false);
|
||||||
const Layer* cutLayer = topLayer->getCutBelow();
|
const Layer* cutLayer = topLayer->getCutBelow(false);
|
||||||
const Layer* viaLayer = technology->getViaBetween ( topLayer, bottomLayer );
|
const Layer* viaLayer = technology->getViaBetween ( topLayer, bottomLayer );
|
||||||
|
|
||||||
|
if ( !viaLayer ) continue;
|
||||||
|
|
||||||
status = lefwStartVia ( getString(viaLayer->getName()).c_str(), "DEFAULT" );
|
status = lefwStartVia ( getString(viaLayer->getName()).c_str(), "DEFAULT" );
|
||||||
if ( status != 0 ) return driver->checkStatus(status);
|
if ( status != 0 ) return driver->checkStatus(status);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue