diff --git a/.gitignore b/.gitignore
index b00fe4f6..ed40a9fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,7 @@ documentation/UsersGuide/UsersGuide-raw.tex
documentation/UsersGuide/UsersGuide.tex
documentation/UsersGuide/UsersGuide.aux
documentation/UsersGuide/UsersGuide.log
+documentation/UsersGuide/UsersGuide.dvi
documentation/UsersGuide/UsersGuide.pdf
documentation/UsersGuide/UsersGuide.out
documentation/UsersGuide/UsersGuide.toc
diff --git a/crlcore/src/crlcore/helpers/Alliance.py b/crlcore/src/crlcore/helpers/Alliance.py
index bac3a2d6..07eed78c 100644
--- a/crlcore/src/crlcore/helpers/Alliance.py
+++ b/crlcore/src/crlcore/helpers/Alliance.py
@@ -4,6 +4,7 @@ import os.path
import sys
import Hurricane
from Hurricane import DbU
+from Hurricane import DataBase
from Hurricane import Layer
import CRL
from CRL import Environment
@@ -97,7 +98,7 @@ def loadRoutingGaugesTable ( routingGaugesTable, fromFile ):
for gaugeName in routingGaugesTable.keys():
gaugeDatas = routingGaugesTable[gaugeName]
- technology = Hurricane.getDataBase().getTechnology()
+ technology = DataBase.getDB().getTechnology()
gauge = RoutingGauge.create(gaugeName)
entryNo = 0
@@ -171,7 +172,7 @@ def loadAllianceConfig ( table, fromFile ):
loadTechno = False
af = AllianceFramework.get()
- db = Hurricane.getDataBase()
+ db = DataBase.getDB()
technology = db.getTechnology()
if not technology:
loadTechno = True
@@ -189,7 +190,7 @@ def loadAllianceConfig ( table, fromFile ):
def loadCompatXml ():
af = AllianceFramework.get()
- db = Hurricane.getDataBase()
+ db = DataBase.getDB()
technology = Hurricane.Technology.create(db,'Alliance')
env = af.getEnvironment()
diff --git a/crlcore/src/crlcore/helpers/RealTechnology.py b/crlcore/src/crlcore/helpers/RealTechnology.py
index c2bb6bf6..df0b780a 100644
--- a/crlcore/src/crlcore/helpers/RealTechnology.py
+++ b/crlcore/src/crlcore/helpers/RealTechnology.py
@@ -7,6 +7,7 @@ import string
import traceback
import Hurricane
from Hurricane import DbU
+from Hurricane import DataBase
from Hurricane import BasicLayer
from helpers import ErrorMessage
@@ -102,7 +103,7 @@ def load ( realPath ):
confGlobals = globals()
execfile(realPath,confGlobals)
- technology = Hurricane.getDataBase().getTechnology()
+ technology = DataBase.getDB().getTechnology()
for symbol, loader in tables:
if not confGlobals.has_key(symbol):
diff --git a/crlcore/src/crlcore/helpers/SymbolicTechnology.py b/crlcore/src/crlcore/helpers/SymbolicTechnology.py
index d3642192..27b3aede 100644
--- a/crlcore/src/crlcore/helpers/SymbolicTechnology.py
+++ b/crlcore/src/crlcore/helpers/SymbolicTechnology.py
@@ -7,6 +7,7 @@ import string
import traceback
import Hurricane
from Hurricane import DbU
+from Hurricane import DataBase
from Hurricane import Layer
from Hurricane import BasicLayer
from Hurricane import DiffusionLayer
@@ -282,7 +283,7 @@ def load ( symbolicPath ):
confGlobals = globals()
execfile(symbolicPath,confGlobals)
- db = Hurricane.getDataBase()
+ db = DataBase.getDB()
technology = db.getTechnology()
for symbol, loader in tables:
diff --git a/cumulus/src/ClockTree.py b/cumulus/src/ClockTree.py
index ca33e59d..fc641300 100755
--- a/cumulus/src/ClockTree.py
+++ b/cumulus/src/ClockTree.py
@@ -9,6 +9,7 @@ try:
import Cfg
import Hurricane
from Hurricane import DbU
+ from Hurricane import Transformation
from Hurricane import Box
from Hurricane import Path
from Hurricane import Occurrence
@@ -118,7 +119,7 @@ class HTree ( object ):
self.bufferCell = self.framework.getCell( 'buf_x2', CRL.Catalog.State.Logical )
self.cellGauge = self.framework.getCellGauge()
self.routingGauge = self.framework.getRoutingGauge()
- self.topBuffer = Instance( self.cell, 'ck_htree', self.bufferCell )
+ self.topBuffer = Instance.create( self.cell, 'ck_htree', self.bufferCell )
self.cloneds = [ self.cell ]
self.plugToRp = {}
self._createChildNet( self.topBuffer, 'ck_htree' )
@@ -153,63 +154,63 @@ class HTree ( object ):
return
def _createChildNet ( self, ibuffer, tag ):
- childNet = Net( self.cell, tag )
- childNet.setType( Hurricane.TypeCLOCK )
+ childNet = Net.create( self.cell, tag )
+ childNet.setType( Net.Type.CLOCK )
getPlugByName(ibuffer, 'q').setNet( childNet )
return
def _createContact ( self, net, x, y ):
- return Contact( net
- , self.routingGauge.getContactLayer(self.horizontalDepth)
- , x, y
- , self.routingGauge.getLayerGauge(self.horizontalDepth).getViaWidth()
- , self.routingGauge.getLayerGauge(self.horizontalDepth).getViaWidth()
- )
+ return Contact.create( net
+ , self.routingGauge.getContactLayer(self.horizontalDepth)
+ , x, y
+ , self.routingGauge.getLayerGauge(self.horizontalDepth).getViaWidth()
+ , self.routingGauge.getLayerGauge(self.horizontalDepth).getViaWidth()
+ )
def _createHorizontal ( self, source, target, y ):
- return Horizontal( source
- , target
- , self.routingGauge.getRoutingLayer(self.horizontalDepth)
- , y
- , self.routingGauge.getLayerGauge(self.horizontalDepth).getWireWidth()
- )
+ return Horizontal.create( source
+ , target
+ , self.routingGauge.getRoutingLayer(self.horizontalDepth)
+ , y
+ , self.routingGauge.getLayerGauge(self.horizontalDepth).getWireWidth()
+ )
def _createVertical ( self, source, target, x ):
- return Vertical( source
- , target
- , self.routingGauge.getRoutingLayer(self.verticalDepth)
- , x
- , self.routingGauge.getLayerGauge(self.verticalDepth).getWireWidth()
- )
+ return Vertical.create( source
+ , target
+ , self.routingGauge.getRoutingLayer(self.verticalDepth)
+ , x
+ , self.routingGauge.getLayerGauge(self.verticalDepth).getWireWidth()
+ )
def _rpAccess ( self, rp, net, flags=0 ):
- contact1 = Contact( rp, self.routingGauge.getContactLayer(0), 0, 0 )
+ contact1 = Contact.create( rp, self.routingGauge.getContactLayer(0), 0, 0 )
if flags & HTree.HAccess: stopDepth = self.horizontalDepth
else: stopDepth = self.verticalDepth
for depth in range(1,stopDepth):
- contact2 = Contact( net
- , self.routingGauge.getContactLayer(depth)
- , contact1.getX()
- , contact1.getY()
- , self.routingGauge.getLayerGauge(depth).getViaWidth()
- , self.routingGauge.getLayerGauge(depth).getViaWidth()
- )
+ contact2 = Contact.create( net
+ , self.routingGauge.getContactLayer(depth)
+ , contact1.getX()
+ , contact1.getY()
+ , self.routingGauge.getLayerGauge(depth).getViaWidth()
+ , self.routingGauge.getLayerGauge(depth).getViaWidth()
+ )
if self.routingGauge.getLayerGauge(depth).getDirection() == RoutingLayerGauge.Horizontal:
- Horizontal( contact1
- , contact2
- , self.routingGauge.getRoutingLayer(depth)
- , contact1.getY()
- , self.routingGauge.getLayerGauge(depth).getWireWidth()
- )
+ Horizontal.create( contact1
+ , contact2
+ , self.routingGauge.getRoutingLayer(depth)
+ , contact1.getY()
+ , self.routingGauge.getLayerGauge(depth).getWireWidth()
+ )
else:
- Vertical( contact1
- , contact2
- , self.routingGauge.getRoutingLayer(depth)
- , contact1.getX()
- , self.routingGauge.getLayerGauge(depth).getWireWidth()
- )
+ Vertical.create( contact1
+ , contact2
+ , self.routingGauge.getRoutingLayer(depth)
+ , contact1.getX()
+ , self.routingGauge.getLayerGauge(depth).getWireWidth()
+ )
contact1 = contact2
return contact1
@@ -244,13 +245,13 @@ class HTree ( object ):
xslice = self.toXCellGrid(x)
yslice = self.toYCellGrid(y)
- transformation = Hurricane.OrientationID
+ transformation = Transformation.Orientation.ID
if (yslice / self.cellGauge.getSliceHeight()) % 2 != 0:
- transformation = Hurricane.OrientationMY
+ transformation = Transformation.Orientation.MY
yslice += self.cellGauge.getSliceHeight()
- instance.setTransformation ( Hurricane.Transformation(xslice, yslice, transformation) )
- instance.setPlacementStatus( Hurricane.PlacementStatusFIXED )
+ instance.setTransformation ( Transformation(xslice, yslice, transformation) )
+ instance.setPlacementStatus( Instance.PlacementStatus.FIXED )
return
def getTreeDepth ( self ):
@@ -288,10 +289,10 @@ class HTree ( object ):
return self.addDeepPlug( headPlug.getMasterNet(), tailPath )
masterCell = headInstance.getMasterCell()
- masterNet = Net( masterCell, topNet.getName() )
+ masterNet = Net.create( masterCell, topNet.getName() )
masterNet.setExternal ( True )
- masterNet.setType ( Hurricane.TypeCLOCK )
- masterNet.setDirection( Hurricane.DirectionIN )
+ masterNet.setType ( Net.Type.CLOCK )
+ masterNet.setDirection( Net.Direction.IN )
headPlug = headInstance.getPlug( masterNet )
if not headPlug:
raise ErrorMessage( 3, 'Plug not created for %s on instance %s of %s' \
@@ -306,7 +307,7 @@ class HTree ( object ):
UpdateSession.open()
leafConnects = []
- hyperMasterClock = HyperNet( Occurrence(self.masterClock) )
+ hyperMasterClock = HyperNet.create( Occurrence(self.masterClock) )
for plugOccurrence in hyperMasterClock.getLeafPlugOccurrences():
position = plugOccurrence.getBoundingBox().getCenter()
leafBuffer = self.getLeafBufferUnder( position )
@@ -363,10 +364,10 @@ class HTreeNode ( object ):
self.area = area
self.prefix = prefix
- self.blBuffer = Instance( self.topTree.cell, 'ck_htree'+self.prefix+'_bl_ins', self.topTree.bufferCell )
- self.brBuffer = Instance( self.topTree.cell, 'ck_htree'+self.prefix+'_br_ins', self.topTree.bufferCell )
- self.tlBuffer = Instance( self.topTree.cell, 'ck_htree'+self.prefix+'_tl_ins', self.topTree.bufferCell )
- self.trBuffer = Instance( self.topTree.cell, 'ck_htree'+self.prefix+'_tr_ins', self.topTree.bufferCell )
+ self.blBuffer = Instance.create( self.topTree.cell, 'ck_htree'+self.prefix+'_bl_ins', self.topTree.bufferCell )
+ self.brBuffer = Instance.create( self.topTree.cell, 'ck_htree'+self.prefix+'_br_ins', self.topTree.bufferCell )
+ self.tlBuffer = Instance.create( self.topTree.cell, 'ck_htree'+self.prefix+'_tl_ins', self.topTree.bufferCell )
+ self.trBuffer = Instance.create( self.topTree.cell, 'ck_htree'+self.prefix+'_tr_ins', self.topTree.bufferCell )
self.ckNet = getPlugByName(self.sourceBuffer, 'q').getNet()
getPlugByName(self.blBuffer, 'i').setNet( self.ckNet )
getPlugByName(self.brBuffer, 'i').setNet( self.ckNet )
diff --git a/cumulus/src/placeandroute.py b/cumulus/src/placeandroute.py
index ab840fce..c359c1ee 100644
--- a/cumulus/src/placeandroute.py
+++ b/cumulus/src/placeandroute.py
@@ -104,7 +104,7 @@ def pyPlaceCentric ( cell, instance ) :
Ty = New_Ymin - instance.getAbutmentBox().getYMin()
instance.setTransformation ( Transformation ( Tx, Ty ).getTransformation ( instance.getTransformation() ) )
- instance.setPlacementStatus ( PlacementStatusPLACED )
+ instance.setPlacementStatus ( Instance.PlacementStatus.PLACED )
UpdateSession.close()
@@ -168,8 +168,6 @@ def pyRouteCk ( cell, netCk ) :
def pyAlimVerticalRail ( cell, xcoord ) :
'''x is in pitch, it is where the vertical alimentation call back are placed'''
- print 'pyAlimVerticalRail'
-
global PITCH, SLICE
global standard_instances_list, nb_alims_verticales, nb_lignes, standard_instances_masque
global nb_vdd_pins, nb_vss_pins
@@ -212,12 +210,12 @@ def pyAlimVerticalRail ( cell, xcoord ) :
nb_alims_verticales += 1
# get the opposite of orientation ID=>MY MY=>ID
- if orientation in [OrientationID, OrientationMX] :
- inv_orientation = OrientationMY
- orientation = OrientationID
- elif orientation in [OrientationMY, OrientationR2] :
- inv_orientation = OrientationID
- orientation = OrientationMY
+ if orientation in [Transformation.Orientation.ID, Transformation.Orientation.MX] :
+ inv_orientation = Transformation.Orientation.MY
+ orientation = Transformation.Orientation.ID
+ elif orientation in [Transformation.Orientation.MY, Transformation.Orientation.R2] :
+ inv_orientation = Transformation.Orientation.ID
+ orientation = Transformation.Orientation.MY
else :
raise ErrorMessage(2,"AlimVerticalRail : Strawberry.")
@@ -258,7 +256,7 @@ def pyAlimVerticalRail ( cell, xcoord ) :
place ( Powmid, int(x), int(y), my_orientation )
# place pins (connectors) in metal3 on top and bottom
- metal3 = getDataBase().getTechnology().getLayer( "METAL3" )
+ metal3 = DataBase.getDB().getTechnology().getLayer( "METAL3" )
powerNet = None
for net in cell.getPowerNets():
@@ -275,7 +273,7 @@ def pyAlimVerticalRail ( cell, xcoord ) :
groundNet = net
if not groundNet:
raise ErrorMessage(2,"AlimVerticalRail : no Ground Net found !")
-
+
pin_height = 10
pin_width = 10
pin_x1 = xcoord * DbU_lambda(PITCH) + DbU_lambda(10)
@@ -286,21 +284,21 @@ def pyAlimVerticalRail ( cell, xcoord ) :
# Top
if standard_instances_masque[nb_lignes-1][xcoord] == FREE :
pin_name = str(powerNet.getName()) + "." + str(nb_vdd_pins)
- pin = Pin ( powerNet, pin_name, 1, 2, metal3, pin_x1, pin_y1, DbU_lambda(pin_width), DbU_lambda(pin_height) )
+ pin = Pin.create ( powerNet, pin_name, 1, 2, metal3, pin_x1, pin_y1, DbU_lambda(pin_width), DbU_lambda(pin_height) )
nb_vdd_pins += 1
pin_name = str(groundNet.getName()) + "." + str(nb_vss_pins)
- pin = Pin ( groundNet, pin_name, 1, 2, metal3, pin_x2, pin_y1, DbU_lambda(pin_width), DbU_lambda(pin_height) )
+ pin = Pin.create ( groundNet, pin_name, 1, 2, metal3, pin_x2, pin_y1, DbU_lambda(pin_width), DbU_lambda(pin_height) )
nb_vss_pins += 1
# Bottom
if standard_instances_masque[0][xcoord] == FREE :
pin_name = str(powerNet.getName()) + "." + str(nb_vdd_pins)
- pin = Pin ( powerNet, pin_name, 2 , 2, metal3, pin_x1, pin_y2, DbU_lambda(pin_width), DbU_lambda(pin_height) )
+ pin = Pin.create ( powerNet, pin_name, 2 , 2, metal3, pin_x1, pin_y2, DbU_lambda(pin_width), DbU_lambda(pin_height) )
nb_vdd_pins += 1
pin_name = str(groundNet.getName()) + "." + str(nb_vss_pins)
- pin = Pin ( groundNet, pin_name, 2 , 2, metal3, pin_x2, pin_y2, DbU_lambda(pin_width), DbU_lambda(pin_height) )
+ pin = Pin.create ( groundNet, pin_name, 2 , 2, metal3, pin_x2, pin_y2, DbU_lambda(pin_width), DbU_lambda(pin_height) )
nb_vss_pins += 1
UpdateSession.close()
@@ -342,10 +340,10 @@ def pyAlimHorizontalRail ( cell, ycoord ) :
raise ErrorMessage(2,err)
# get layers
- metal4 = getDataBase().getTechnology().getLayer ( "METAL4" )
- via1 = getDataBase().getTechnology().getLayer ( "VIA12" )
- via2 = getDataBase().getTechnology().getLayer ( "VIA23" )
- via3 = getDataBase().getTechnology().getLayer ( "VIA34" )
+ metal4 = DataBase.getDB().getTechnology().getLayer ( "METAL4" )
+ via1 = DataBase.getDB().getTechnology().getLayer ( "VIA12" )
+ via2 = DataBase.getDB().getTechnology().getLayer ( "VIA23" )
+ via3 = DataBase.getDB().getTechnology().getLayer ( "VIA34" )
# Know if it is vdd or vss
string = getVddVss ( cell, ycoord )
@@ -361,26 +359,26 @@ def pyAlimHorizontalRail ( cell, ycoord ) :
net = cell.getNet ( "vdd" )
pin_name = str(net.getName()) + "." + str(nb_vdd_pins)
- pin1 = Pin ( net, pin_name, 4, 2, metal4, pin_x1, pin_y, pin_width, pin_height )
+ pin1 = Pin.create ( net, pin_name, 4, 2, metal4, pin_x1, pin_y, pin_width, pin_height )
nb_vdd_pins += 1
pin_name = str(net.getName()) + "." + str(nb_vdd_pins)
- pin2 = Pin ( net, pin_name, 3, 2, metal4, pin_x2, pin_y, pin_width, pin_height )
+ pin2 = Pin.create ( net, pin_name, 3, 2, metal4, pin_x2, pin_y, pin_width, pin_height )
nb_vdd_pins += 1
else :
net = cell.getNet ( "vss" )
pin_name = str(net.getName()) + "." + str(nb_vss_pins)
- pin1 = Pin ( net, pin_name, 4, 2, metal4, pin_x1, pin_y, pin_width, pin_height )
+ pin1 = Pin.create ( net, pin_name, 4, 2, metal4, pin_x1, pin_y, pin_width, pin_height )
nb_vss_pins += 1
pin_name = str(net.getName()) + "." + str(nb_vss_pins)
- pin2 = Pin ( net, pin_name, 3, 2, metal4, pin_x2, pin_y, pin_width, pin_height )
+ pin2 = Pin.create ( net, pin_name, 3, 2, metal4, pin_x2, pin_y, pin_width, pin_height )
nb_vss_pins += 1
# Create horizontal rail
- rail_horizontal = Horizontal ( pin1 , pin2 , metal4 , pin_y, pin_height, 0 , 0 )
+ rail_horizontal = Horizontal.create ( pin1 , pin2 , metal4 , pin_y, pin_height, 0 , 0 )
power_hur_cell = CRL.AllianceFramework.get().getCell ( "powmid_x0", CRL.Catalog.State.Views )
Width_power = power_hur_cell.getAbutmentBox().getWidth()
@@ -393,8 +391,8 @@ def pyAlimHorizontalRail ( cell, ycoord ) :
if standard_instances_masque[ycoord][i] == POWER :
contact_side = DbU_lambda(RING_WIDTH) - DbU_lambda(1.0)
- if string == "vdd" : contact3 = Contact ( rail_horizontal, via3, i*DbU_lambda(PITCH) + DbU_lambda(10), 0, contact_side, DbU_lambda(2) )
- else : contact3 = Contact ( rail_horizontal, via3, i*DbU_lambda(PITCH) + DbU_lambda(25), 0, contact_side, DbU_lambda(2) )
+ if string == "vdd" : contact3 = Contact.create ( rail_horizontal, via3, i*DbU_lambda(PITCH) + DbU_lambda(10), 0, contact_side, DbU_lambda(2) )
+ else : contact3 = Contact.create ( rail_horizontal, via3, i*DbU_lambda(PITCH) + DbU_lambda(25), 0, contact_side, DbU_lambda(2) )
i += nb_pitchs
i+=1
@@ -428,7 +426,7 @@ def pyAlimConnectors ( cell ) :
+ "Please place some instances before the placement of alim connectors.\n"
raise ErrorMessage(2,err)
- metal1 = getDataBase().getTechnology().getLayer("METAL1")
+ metal1 = DataBase.getDB().getTechnology().getLayer("METAL1")
string = getVddVss ( cell, 0 )
if re.search ( "vdd", string ) :
@@ -468,23 +466,23 @@ def pyAlimConnectors ( cell ) :
# Ligne impaire
if i % 2 :
pin_name = str(netImpair.getName()) + "." + str(nb_inv_pins)
- pin1 = Pin ( netImpair, pin_name, 4, 2, metal1, pin_x1, pin_y, pin_width, pin_height )
+ pin1 = Pin.create ( netImpair, pin_name, 4, 2, metal1, pin_x1, pin_y, pin_width, pin_height )
nb_inv_pins += 1
pin_name = str(netImpair.getName()) + "." + str(nb_inv_pins)
- pin2 = Pin ( netImpair, pin_name, 3, 2, metal1, pin_x2, pin_y, pin_width, pin_height )
+ pin2 = Pin.create ( netImpair, pin_name, 3, 2, metal1, pin_x2, pin_y, pin_width, pin_height )
nb_inv_pins += 1
- Horizontal ( pin1, pin2, metal1, pin1.getY(), pin_height )
+ Horizontal.create ( pin1, pin2, metal1, pin1.getY(), pin_height )
# Ligne paire
else :
pin_name = str(netPair.getName()) + "." + str(nb_string_pins)
- pin1 = Pin ( netPair, pin_name, 4, 2, metal1, pin_x1, pin_y, pin_width, pin_height )
+ pin1 = Pin.create ( netPair, pin_name, 4, 2, metal1, pin_x1, pin_y, pin_width, pin_height )
nb_string_pins += 1
pin_name = str(netPair.getName()) + "." + str(nb_string_pins)
- pin2 = Pin ( netPair, pin_name, 3, 2, metal1, pin_x2, pin_y, pin_width, pin_height )
+ pin2 = Pin.create ( netPair, pin_name, 3, 2, metal1, pin_x2, pin_y, pin_width, pin_height )
nb_string_pins += 1
- Horizontal ( pin1, pin2, metal1, pin1.getY(), pin_height )
+ Horizontal.create ( pin1, pin2, metal1, pin1.getY(), pin_height )
if re.search ( "vdd", string ) :
nb_vdd_pins = nb_string_pins
@@ -651,11 +649,11 @@ def pyPadNorth ( cell, core, args ) :
ins.setTransformation ( Transformation ( _x - _difx
, _y - _dify
- , OrientationID
+ , Transformation.Orientation.ID
)
)
- ins.setPlacementStatus ( PlacementStatusFIXED )
+ ins.setPlacementStatus ( Instance.PlacementStatus.FIXED )
UpdateSession.close()
@@ -728,16 +726,16 @@ def pyPadSouth ( cell, core, args ) :
# avoir x y apres orientation
box = ins.getMasterCell().getAbutmentBox()
- _difx = Transformation ( 0, 0, OrientationMY ).getBox ( box ).getXMin()
- _dify = Transformation ( 0, 0, OrientationMY ).getBox ( box ).getYMin()
+ _difx = Transformation ( 0, 0, Transformation.Orientation.MY ).getBox ( box ).getXMin()
+ _dify = Transformation ( 0, 0, Transformation.Orientation.MY ).getBox ( box ).getYMin()
ins.setTransformation ( Transformation ( _x - _difx
, _y - _dify
- , OrientationMY
+ , Transformation.Orientation.MY
)
)
- ins.setPlacementStatus ( PlacementStatusFIXED )
+ ins.setPlacementStatus ( Instance.PlacementStatus.FIXED )
UpdateSession.close()
@@ -819,11 +817,11 @@ def pyPadEast ( cell, core, args ) :
ins.setTransformation ( Transformation ( _x - _difx
, _y - _dify
- , OrientationYR
+ , Transformation.Orientation.YR
)
)
- ins.setPlacementStatus ( PlacementStatusFIXED )
+ ins.setPlacementStatus ( Instance.PlacementStatus.FIXED )
UpdateSession.close()
@@ -902,11 +900,11 @@ def pyPadWest ( cell, core, args ) :
ins.setTransformation ( Transformation ( _x - _difx
, _y - _dify
- , OrientationR1
+ , Transformation.Orientation.R1
)
)
- ins.setPlacementStatus ( PlacementStatusFIXED )
+ ins.setPlacementStatus ( Instance.PlacementStatus.FIXED )
UpdateSession.close()
@@ -922,7 +920,7 @@ def pyPowerRing ( cell, core, n ) :
global pad_north, pad_south, pad_east, pad_west
global RING_INTERVAL, RING_WIDTH
- db = getDataBase()
+ db = DataBase.getDB()
topRoutingLayerName = Cfg.getParamString('katabatic.topRoutingLayer', 'METAL4').asString()
topRoutingLayer = db.getTechnology().getLayer( topRoutingLayerName )
@@ -1117,25 +1115,25 @@ def pyPowerRing ( cell, core, n ) :
for i in range ( 0, 2*n+1, 2 ) :
- contact1 = Contact ( vss, cCoronaLayer, init_Xmin - decalage*i, init_Ymin - decalage*i, contact_side, contact_side )
- contact2 = Contact ( vss, cCoronaLayer, init_Xmin - decalage*i, init_Ymax + decalage*i, contact_side, contact_side )
- contact3 = Contact ( vss, cCoronaLayer, init_Xmax + decalage*i, init_Ymax + decalage*i, contact_side, contact_side )
- contact4 = Contact ( vss, cCoronaLayer, init_Xmax + decalage*i, init_Ymin - decalage*i, contact_side, contact_side )
+ contact1 = Contact.create ( vss, cCoronaLayer, init_Xmin - decalage*i, init_Ymin - decalage*i, contact_side, contact_side )
+ contact2 = Contact.create ( vss, cCoronaLayer, init_Xmin - decalage*i, init_Ymax + decalage*i, contact_side, contact_side )
+ contact3 = Contact.create ( vss, cCoronaLayer, init_Xmax + decalage*i, init_Ymax + decalage*i, contact_side, contact_side )
+ contact4 = Contact.create ( vss, cCoronaLayer, init_Xmax + decalage*i, init_Ymin - decalage*i, contact_side, contact_side )
- vertical_west_vss.append ( Vertical ( contact1, contact2, vCoronaLayer, init_Xmin - decalage*i, DbU_lambda(RING_WIDTH) ) )
- vertical_east_vss.append ( Vertical ( contact3, contact4, vCoronaLayer, init_Xmax + decalage*i, DbU_lambda(RING_WIDTH) ) )
- horizontal_south_vss.append ( Horizontal ( contact1, contact4, hCoronaLayer, init_Ymin - decalage*i, DbU_lambda(RING_WIDTH) ) )
- horizontal_north_vss.append ( Horizontal ( contact2, contact3, hCoronaLayer, init_Ymax + decalage*i, DbU_lambda(RING_WIDTH) ) )
+ vertical_west_vss.append ( Vertical.create ( contact1, contact2, vCoronaLayer, init_Xmin - decalage*i, DbU_lambda(RING_WIDTH) ) )
+ vertical_east_vss.append ( Vertical.create ( contact3, contact4, vCoronaLayer, init_Xmax + decalage*i, DbU_lambda(RING_WIDTH) ) )
+ horizontal_south_vss.append ( Horizontal.create ( contact1, contact4, hCoronaLayer, init_Ymin - decalage*i, DbU_lambda(RING_WIDTH) ) )
+ horizontal_north_vss.append ( Horizontal.create ( contact2, contact3, hCoronaLayer, init_Ymax + decalage*i, DbU_lambda(RING_WIDTH) ) )
if i != 2*n :
- contact1 = Contact ( vdd, cCoronaLayer, init_Xmin - decalage* ( i + 1 ), init_Ymin - decalage*( i + 1 ) , contact_side, contact_side )
- contact2 = Contact ( vdd, cCoronaLayer, init_Xmin - decalage* ( i + 1 ), init_Ymax + decalage*( i + 1 ) , contact_side, contact_side )
- contact3 = Contact ( vdd, cCoronaLayer, init_Xmax + decalage* ( i + 1 ), init_Ymax + decalage*( i + 1 ) , contact_side, contact_side )
- contact4 = Contact ( vdd, cCoronaLayer, init_Xmax + decalage* ( i + 1 ), init_Ymin - decalage*( i + 1 ) , contact_side, contact_side )
- vertical_west_vdd.append ( Vertical ( contact1, contact2, vCoronaLayer, init_Xmin - decalage* ( i + 1 ), DbU_lambda(RING_WIDTH) ) )
- vertical_east_vdd.append ( Vertical ( contact3, contact4, vCoronaLayer, init_Xmax + decalage* ( i + 1 ), DbU_lambda(RING_WIDTH) ) )
- horizontal_south_vdd.append ( Horizontal ( contact1, contact4, hCoronaLayer, init_Ymin - decalage* ( i + 1 ), DbU_lambda(RING_WIDTH) ) )
- horizontal_north_vdd.append ( Horizontal ( contact2, contact3, hCoronaLayer, init_Ymax + decalage* ( i + 1 ), DbU_lambda(RING_WIDTH) ) )
+ contact1 = Contact.create ( vdd, cCoronaLayer, init_Xmin - decalage* ( i + 1 ), init_Ymin - decalage*( i + 1 ) , contact_side, contact_side )
+ contact2 = Contact.create ( vdd, cCoronaLayer, init_Xmin - decalage* ( i + 1 ), init_Ymax + decalage*( i + 1 ) , contact_side, contact_side )
+ contact3 = Contact.create ( vdd, cCoronaLayer, init_Xmax + decalage* ( i + 1 ), init_Ymax + decalage*( i + 1 ) , contact_side, contact_side )
+ contact4 = Contact.create ( vdd, cCoronaLayer, init_Xmax + decalage* ( i + 1 ), init_Ymin - decalage*( i + 1 ) , contact_side, contact_side )
+ vertical_west_vdd.append ( Vertical.create ( contact1, contact2, vCoronaLayer, init_Xmin - decalage* ( i + 1 ), DbU_lambda(RING_WIDTH) ) )
+ vertical_east_vdd.append ( Vertical.create ( contact3, contact4, vCoronaLayer, init_Xmax + decalage* ( i + 1 ), DbU_lambda(RING_WIDTH) ) )
+ horizontal_south_vdd.append ( Horizontal.create ( contact1, contact4, hCoronaLayer, init_Ymin - decalage* ( i + 1 ), DbU_lambda(RING_WIDTH) ) )
+ horizontal_north_vdd.append ( Horizontal.create ( contact2, contact3, hCoronaLayer, init_Ymax + decalage* ( i + 1 ), DbU_lambda(RING_WIDTH) ) )
# MACRO pour les directions d'access des pins
UNDEFINED = 0
@@ -1158,9 +1156,9 @@ def pyPowerRing ( cell, core, n ) :
# Creer un contact a la place du pin
if (allowedDepth > 2) and \
- re.search ( "METAL4", element_layer_name ) : old_contact = Contact ( vss, metal4, _x, _y , element.getHeight(), element.getHeight() )
- elif re.search ( "METAL1", element_layer_name ) : old_contact = Contact ( vss, metal1, _x, _y , element.getHeight(), element.getHeight() )
- elif re.search ( "METAL3", element_layer_name ) : old_contact = Contact ( vss, metal3, _x, _y , element.getHeight(), element.getHeight() )
+ re.search ( "METAL4", element_layer_name ) : old_contact = Contact.create ( vss, metal4, _x, _y , element.getHeight(), element.getHeight() )
+ elif re.search ( "METAL1", element_layer_name ) : old_contact = Contact.create ( vss, metal1, _x, _y , element.getHeight(), element.getHeight() )
+ elif re.search ( "METAL3", element_layer_name ) : old_contact = Contact.create ( vss, metal3, _x, _y , element.getHeight(), element.getHeight() )
else :
raise ErrorMessage(2,"wrong layer of pin in the west of core : %s.\n" % element_layer_name)
@@ -1179,13 +1177,13 @@ def pyPowerRing ( cell, core, n ) :
contact_side = element.getHeight() - DbU_lambda(1.0)
if (allowedDepth > 2) and re.search( "METAL4", element_layer_name ) :
- contact = Contact ( vss, via3 , contact_x , _y , contact_side , contact_side )
- horizontal = Horizontal ( contact, old_contact , metal4 , _y , element.getHeight() )
+ contact = Contact.create ( vss, via3 , contact_x , _y , contact_side , contact_side )
+ horizontal = Horizontal.create ( contact, old_contact , metal4 , _y , element.getHeight() )
old_contact = contact
else :
- contact_via1 = Contact ( vss, via1 , contact_x , _y , contact_side , contact_side )
- contact_via2 = Contact ( vss, via2 , contact_x , _y , contact_side , contact_side )
- horizontal = Horizontal ( contact_via1 , old_contact , metal1 , _y , element.getHeight() )
+ contact_via1 = Contact.create ( vss, via1 , contact_x , _y , contact_side , contact_side )
+ contact_via2 = Contact.create ( vss, via2 , contact_x , _y , contact_side , contact_side )
+ horizontal = Horizontal.create ( contact_via1 , old_contact , metal1 , _y , element.getHeight() )
old_contact = contact_via1
# Connection du cote de l'est
@@ -1203,13 +1201,13 @@ def pyPowerRing ( cell, core, n ) :
contact_side = element.getHeight() - DbU_lambda(1.0)
if (allowedDepth > 2) and re.search( "METAL4", element_layer_name ) :
- contact = Contact ( vss, via3 , contact_x , _y , contact_side, contact_side )
- horizontal = Horizontal ( contact, old_contact , metal4 , _y , element.getHeight() )
+ contact = Contact.create ( vss, via3 , contact_x , _y , contact_side, contact_side )
+ horizontal = Horizontal.create ( contact, old_contact , metal4 , _y , element.getHeight() )
old_contact = contact
else :
- contact_via1 = Contact ( vss, via1 , contact_x , _y , contact_side , contact_side )
- contact_via2 = Contact ( vss, via2 , contact_x , _y , contact_side , contact_side )
- horizontal = Horizontal ( contact_via1 , old_contact , metal1 , _y , element.getHeight() )
+ contact_via1 = Contact.create ( vss, via1 , contact_x , _y , contact_side , contact_side )
+ contact_via2 = Contact.create ( vss, via2 , contact_x , _y , contact_side , contact_side )
+ horizontal = Horizontal.create ( contact_via1 , old_contact , metal1 , _y , element.getHeight() )
old_contact = contact_via1
# Connection du cote du nord
@@ -1226,8 +1224,8 @@ def pyPowerRing ( cell, core, n ) :
contact_y = init_Ymax + ( decalage*2 )*i # y du contact a creer
if re.search ( "METAL3", element_layer_name ) :
- contact = Contact ( vss, via3, _x, contact_y, element.getHeight(), element.getHeight() )
- vertical = Vertical ( contact, old_contact, metal3, _x, DbU_lambda(RING_WIDTH) )
+ contact = Contact.create ( vss, via3, _x, contact_y, element.getHeight(), element.getHeight() )
+ vertical = Vertical.create ( contact, old_contact, metal3, _x, DbU_lambda(RING_WIDTH) )
old_contact = contact
else :
raise ErrorMessage(2,"wrong layer of pin in the west of core : %s.\n"% element_layer_name)
@@ -1246,8 +1244,8 @@ def pyPowerRing ( cell, core, n ) :
contact_y = init_Ymin - ( decalage*2 )*i # x du contact a creer
if re.search ( "METAL3", element_layer_name ) :
- contact = Contact ( vss, via3, _x, contact_y, element.getHeight(), element.getHeight() )
- vertical = Vertical ( contact, old_contact, metal3, _x, DbU_lambda(RING_WIDTH) )
+ contact = Contact.create ( vss, via3, _x, contact_y, element.getHeight(), element.getHeight() )
+ vertical = Vertical.create ( contact, old_contact, metal3, _x, DbU_lambda(RING_WIDTH) )
old_contact = contact
else :
raise ErrorMessage(2,"wrong layer of pin in the west of core : %s."%element_layer_name)
@@ -1268,9 +1266,9 @@ def pyPowerRing ( cell, core, n ) :
# Creer un contact a la place du pin
if (allowedDepth > 2) and \
- re.search ( "METAL4", element_layer_name ) : old_contact = Contact ( vdd, metal4, _x, _y , element.getHeight(), element.getHeight() )
- elif re.search ( "METAL1", element_layer_name ) : old_contact = Contact ( vdd, metal1, _x, _y , element.getHeight(), element.getHeight() )
- elif re.search ( "METAL3", element_layer_name ) : old_contact = Contact ( vdd, metal3, _x, _y , element.getHeight(), element.getHeight() )
+ re.search ( "METAL4", element_layer_name ) : old_contact = Contact.create ( vdd, metal4, _x, _y , element.getHeight(), element.getHeight() )
+ elif re.search ( "METAL1", element_layer_name ) : old_contact = Contact.create ( vdd, metal1, _x, _y , element.getHeight(), element.getHeight() )
+ elif re.search ( "METAL3", element_layer_name ) : old_contact = Contact.create ( vdd, metal3, _x, _y , element.getHeight(), element.getHeight() )
else :
raise ErrorMessage(2,"wrong layer of pin in the west of core : %s."%element_layer_name)
@@ -1289,13 +1287,13 @@ def pyPowerRing ( cell, core, n ) :
contact_side = element.getHeight() - DbU_lambda(1.0)
if (allowedDepth > 2) and re.search( "METAL4", element_layer_name ) :
- contact = Contact ( vdd, via3, contact_x, _y, contact_side, contact_side )
- horizontal = Horizontal ( contact, old_contact, metal4, _y, element.getHeight() )
+ contact = Contact.create ( vdd, via3, contact_x, _y, contact_side, contact_side )
+ horizontal = Horizontal.create ( contact, old_contact, metal4, _y, element.getHeight() )
old_contact = contact
else :
- contact_via1 = Contact ( vdd, via1, contact_x, _y, contact_side, contact_side )
- contact_via2 = Contact ( vdd, via2, contact_x, _y, contact_side, contact_side )
- horizontal = Horizontal ( contact_via1, old_contact, metal1, _y, element.getHeight() )
+ contact_via1 = Contact.create ( vdd, via1, contact_x, _y, contact_side, contact_side )
+ contact_via2 = Contact.create ( vdd, via2, contact_x, _y, contact_side, contact_side )
+ horizontal = Horizontal.create ( contact_via1, old_contact, metal1, _y, element.getHeight() )
old_contact = contact_via1
# Connection du cote de l'est
@@ -1313,13 +1311,13 @@ def pyPowerRing ( cell, core, n ) :
contact_side = element.getHeight() - DbU_lambda(1.0)
if (allowedDepth > 2) and re.search( "METAL4", element_layer_name ) :
- contact = Contact ( vdd, via3 , contact_x , _y , contact_side , contact_side )
- horizontal = Horizontal ( contact, old_contact , metal4 , _y , element.getHeight() )
+ contact = Contact.create ( vdd, via3 , contact_x , _y , contact_side , contact_side )
+ horizontal = Horizontal.create ( contact, old_contact , metal4 , _y , element.getHeight() )
old_contact = contact
else :
- contact_via1 = Contact ( vdd, via1, contact_x, _y, contact_side, contact_side )
- contact_via2 = Contact ( vdd, via2, contact_x, _y, contact_side, contact_side )
- horizontal = Horizontal ( contact_via1, old_contact, metal1, _y, element.getHeight() )
+ contact_via1 = Contact.create ( vdd, via1, contact_x, _y, contact_side, contact_side )
+ contact_via2 = Contact.create ( vdd, via2, contact_x, _y, contact_side, contact_side )
+ horizontal = Horizontal.create ( contact_via1, old_contact, metal1, _y, element.getHeight() )
old_contact = contact_via1
# Connection du cote du nord
@@ -1336,8 +1334,8 @@ def pyPowerRing ( cell, core, n ) :
contact_y = init_Ymax + decalage + ( decalage*2 )*i # x du contact a creer
if re.search ( "METAL3", element_layer_name ) :
- contact = Contact ( vdd, via3, _x, contact_y, element.getHeight(), element.getHeight() )
- vertical = Vertical ( contact, old_contact, metal3, _x, DbU_lambda(RING_WIDTH) )
+ contact = Contact.create ( vdd, via3, _x, contact_y, element.getHeight(), element.getHeight() )
+ vertical = Vertical.create ( contact, old_contact, metal3, _x, DbU_lambda(RING_WIDTH) )
old_contact = contact
else :
raise ErrorMessage(2,"wrong layer of pin in the west of core : %s."%element_layer_name)
@@ -1356,8 +1354,8 @@ def pyPowerRing ( cell, core, n ) :
contact_y = init_Ymin - decalage - ( decalage*2 )*i # x du contact a creer
if re.search ( "METAL3", element_layer_name ) :
- contact = Contact ( vdd, via3, _x, contact_y, element.getHeight(), element.getHeight() )
- vertical = Vertical ( contact, old_contact, metal3, _x, DbU_lambda(RING_WIDTH) )
+ contact = Contact.create ( vdd, via3, _x, contact_y, element.getHeight(), element.getHeight() )
+ vertical = Vertical.create ( contact, old_contact, metal3, _x, DbU_lambda(RING_WIDTH) )
old_contact = contact
else :
raise ErrorMessage(2,"wrong layer of pin in the west of core : %s."%element_layer_name)
@@ -1384,11 +1382,11 @@ def pyPowerRing ( cell, core, n ) :
X = pad_inst.getTransformation().getX ( element.getX(), element.getY() )
Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() )
- Contact ( vss, via2, X, Y, height, height )
- contactPad = Contact ( vss, via1, X, Y, height, height )
- Horizontal ( contactPad, vertical_east_vss[-1], metal1, Y, DbU_lambda ( RING_WIDTH ) )
- Contact ( vss, via1, vertical_east_vss[-1].getX(), Y, height, height )
- Contact ( vss, via2, vertical_east_vss[-1].getX(), Y, height, height )
+ Contact.create ( vss, via2, X, Y, height, height )
+ contactPad = Contact.create ( vss, via1, X, Y, height, height )
+ Horizontal.create ( contactPad, vertical_east_vss[-1], metal1, Y, DbU_lambda ( RING_WIDTH ) )
+ Contact.create ( vss, via1, vertical_east_vss[-1].getX(), Y, height, height )
+ Contact.create ( vss, via2, vertical_east_vss[-1].getX(), Y, height, height )
for element in NetExternalComponents.get ( pad_inst.getMasterCell().getNet("vddi") ):
layer = element.getLayer()
@@ -1400,10 +1398,10 @@ def pyPowerRing ( cell, core, n ) :
Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() )
#Contact ( vdd, via2, X, Y, height, height )
- contactPad = Contact ( vdd, via1, X, Y, height, height )
- Horizontal ( contactPad, vertical_east_vdd[-1], metal1, Y, DbU_lambda ( RING_WIDTH ) )
- Contact ( vdd, via1, vertical_east_vdd[-1].getX(), Y, height, height )
- Contact ( vdd, via2, vertical_east_vdd[-1].getX(), Y, height, height )
+ contactPad = Contact.create ( vdd, via1, X, Y, height, height )
+ Horizontal.create ( contactPad, vertical_east_vdd[-1], metal1, Y, DbU_lambda ( RING_WIDTH ) )
+ Contact.create ( vdd, via1, vertical_east_vdd[-1].getX(), Y, height, height )
+ Contact.create ( vdd, via2, vertical_east_vdd[-1].getX(), Y, height, height )
for pad_inst in pad_west :
if isInternalPowerPad ( pad_inst ) or isExternalPowerPad ( pad_inst ) \
@@ -1419,10 +1417,10 @@ def pyPowerRing ( cell, core, n ) :
Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() )
#Contact ( vss, via2, X, Y, height, height )
- contactPad = Contact ( vss, via1, X, Y, height, height )
- Horizontal ( contactPad, vertical_west_vss[-1], metal1, Y, DbU_lambda ( RING_WIDTH ) )
- Contact ( vss, via1, vertical_west_vss[-1].getX(), Y, height, height )
- Contact ( vss, via2, vertical_west_vss[-1].getX(), Y, height, height )
+ contactPad = Contact.create ( vss, via1, X, Y, height, height )
+ Horizontal.create ( contactPad, vertical_west_vss[-1], metal1, Y, DbU_lambda ( RING_WIDTH ) )
+ Contact.create ( vss, via1, vertical_west_vss[-1].getX(), Y, height, height )
+ Contact.create ( vss, via2, vertical_west_vss[-1].getX(), Y, height, height )
for element in NetExternalComponents.get ( pad_inst.getMasterCell().getNet("vddi") ):
layer = element.getLayer()
@@ -1434,10 +1432,10 @@ def pyPowerRing ( cell, core, n ) :
Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() )
#Contact ( vdd, via2, X, Y, height, height )
- contactPad = Contact ( vdd, via1, X, Y, height, height )
- Horizontal ( contactPad, vertical_west_vdd[-1], metal1, Y, DbU_lambda ( RING_WIDTH ) )
- Contact ( vdd, via1, vertical_west_vdd[-1].getX(), Y, height, height )
- Contact ( vdd, via2, vertical_west_vdd[-1].getX(), Y, height, height )
+ contactPad = Contact.create ( vdd, via1, X, Y, height, height )
+ Horizontal.create ( contactPad, vertical_west_vdd[-1], metal1, Y, DbU_lambda ( RING_WIDTH ) )
+ Contact.create ( vdd, via1, vertical_west_vdd[-1].getX(), Y, height, height )
+ Contact.create ( vdd, via2, vertical_west_vdd[-1].getX(), Y, height, height )
for pad_inst in pad_north :
if isInternalPowerPad ( pad_inst ) or isExternalPowerPad ( pad_inst ) \
@@ -1452,15 +1450,15 @@ def pyPowerRing ( cell, core, n ) :
X = pad_inst.getTransformation().getX ( element.getX(), element.getY() )
Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() )
- Contact ( vss, via1, X, Y, height, height )
- #Contact ( vss, via2, X, Y, height, height )
+ Contact.create ( vss, via1, X, Y, height, height )
+ #Contact.create ( vss, via2, X, Y, height, height )
- contactPad = Contact ( vss, metal1, X, Y, height, height )
- Vertical ( contactPad, horizontal_north_vss[-1], metal1, X , DbU_lambda ( RING_WIDTH ) )
- Contact ( vss, via1, X, horizontal_north_vss[-1].getY(), height, height )
+ contactPad = Contact.create ( vss, metal1, X, Y, height, height )
+ Vertical.create ( contactPad, horizontal_north_vss[-1], metal1, X , DbU_lambda ( RING_WIDTH ) )
+ Contact.create ( vss, via1, X, horizontal_north_vss[-1].getY(), height, height )
if allowedDepth > 2:
- Contact ( vss, via2, X, horizontal_north_vss[-1].getY(), height, height )
- Contact ( vss, via3, X, horizontal_north_vss[-1].getY(), height, height )
+ Contact.create ( vss, via2, X, horizontal_north_vss[-1].getY(), height, height )
+ Contact.create ( vss, via3, X, horizontal_north_vss[-1].getY(), height, height )
for element in NetExternalComponents.get ( pad_inst.getMasterCell().getNet("vddi") ):
layer = element.getLayer()
@@ -1471,15 +1469,15 @@ def pyPowerRing ( cell, core, n ) :
X = pad_inst.getTransformation().getX ( element.getX(), element.getY() )
Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() )
- Contact ( vdd, via1, X, Y, height, height )
- #Contact ( vdd, via2, X, Y, height, height )
+ Contact.create ( vdd, via1, X, Y, height, height )
+ #Contact.create ( vdd, via2, X, Y, height, height )
- contactPad = Contact ( vdd, metal1, X, Y, height, height )
- Vertical ( contactPad, horizontal_north_vdd[-1], metal1, X, DbU_lambda ( RING_WIDTH ) )
- Contact ( vdd, via1, X, horizontal_north_vdd[-1].getY(), height, height )
+ contactPad = Contact.create ( vdd, metal1, X, Y, height, height )
+ Vertical.create ( contactPad, horizontal_north_vdd[-1], metal1, X, DbU_lambda ( RING_WIDTH ) )
+ Contact.create ( vdd, via1, X, horizontal_north_vdd[-1].getY(), height, height )
if allowedDepth > 2:
- Contact ( vdd, via2, X, horizontal_north_vdd[-1].getY(), height, height )
- Contact ( vdd, via3, X, horizontal_north_vdd[-1].getY(), height, height )
+ Contact.create ( vdd, via2, X, horizontal_north_vdd[-1].getY(), height, height )
+ Contact.create ( vdd, via3, X, horizontal_north_vdd[-1].getY(), height, height )
for pad_inst in pad_south :
if isInternalPowerPad ( pad_inst ) or isExternalPowerPad ( pad_inst ) \
@@ -1494,15 +1492,15 @@ def pyPowerRing ( cell, core, n ) :
X = pad_inst.getTransformation().getX ( element.getX(), element.getY() )
Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() )
- Contact ( vss, via1, X, Y, height, height )
- #Contact ( vss, via2, X, Y, height, height )
+ Contact.create ( vss, via1, X, Y, height, height )
+ #Contact.create ( vss, via2, X, Y, height, height )
- contactPad = Contact ( vss, metal1, X, Y, height, height )
- Vertical ( contactPad, horizontal_south_vss[-1], metal1, X , DbU_lambda ( RING_WIDTH ) )
- Contact ( vss, via1, X, horizontal_south_vss[-1].getY(), height, height )
+ contactPad = Contact.create ( vss, metal1, X, Y, height, height )
+ Vertical.create ( contactPad, horizontal_south_vss[-1], metal1, X , DbU_lambda ( RING_WIDTH ) )
+ Contact.create ( vss, via1, X, horizontal_south_vss[-1].getY(), height, height )
if allowedDepth > 2:
- Contact ( vss, via2, X, horizontal_south_vss[-1].getY(), height, height )
- Contact ( vss, via3, X, horizontal_south_vss[-1].getY(), height, height )
+ Contact.create ( vss, via2, X, horizontal_south_vss[-1].getY(), height, height )
+ Contact.create ( vss, via3, X, horizontal_south_vss[-1].getY(), height, height )
for element in NetExternalComponents.get ( pad_inst.getMasterCell().getNet("vddi") ):
layer = element.getLayer()
@@ -1513,15 +1511,15 @@ def pyPowerRing ( cell, core, n ) :
X = pad_inst.getTransformation().getX ( element.getX(), element.getY() )
Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() )
- Contact ( vdd, via1, X, Y, height, height )
- #Contact ( vdd, via2, X, Y, height, height )
+ Contact.create ( vdd, via1, X, Y, height, height )
+ #Contact.create ( vdd, via2, X, Y, height, height )
- contactPad = Contact ( vdd, metal1, X, Y, height, height )
- Vertical ( contactPad, horizontal_south_vdd[-1], metal1, X , DbU_lambda ( RING_WIDTH ) )
- Contact ( vdd, via1, X, horizontal_south_vdd[-1].getY(), height, height )
+ contactPad = Contact.create ( vdd, metal1, X, Y, height, height )
+ Vertical.create ( contactPad, horizontal_south_vdd[-1], metal1, X , DbU_lambda ( RING_WIDTH ) )
+ Contact.create ( vdd, via1, X, horizontal_south_vdd[-1].getY(), height, height )
if allowedDepth > 2:
- Contact ( vdd, via2, X, horizontal_south_vdd[-1].getY(), height, height )
- Contact ( vdd, via3, X, horizontal_south_vdd[-1].getY(), height, height )
+ Contact.create ( vdd, via2, X, horizontal_south_vdd[-1].getY(), height, height )
+ Contact.create ( vdd, via3, X, horizontal_south_vdd[-1].getY(), height, height )
##################################### ###########################
@@ -1558,22 +1556,22 @@ def pyPowerRing ( cell, core, n ) :
# On calcule les differents points aux angles pour chaque net
X_point = cell_Xmin + Y
Y_point = cell_Ymin + Y
- contact = Contact ( NET, layer, X_point, Y_point, RING_HEIGHT, RING_HEIGHT )
+ contact = Contact.create ( NET, layer, X_point, Y_point, RING_HEIGHT, RING_HEIGHT )
points_0.append ( dict ( [ ['X',X_point], ['Y',Y_point], ['N',NET], ['L',layer], ['R',RING_HEIGHT], ['C',contact] ] ) )
X_point = cell_Xmin + Y
Y_point = cell_Ymin + ( cell_Ymax - Y )
- contact = Contact ( NET, layer, X_point, Y_point, RING_HEIGHT, RING_HEIGHT )
+ contact = Contact.create ( NET, layer, X_point, Y_point, RING_HEIGHT, RING_HEIGHT )
points_1.append ( dict ( [ ['X',X_point], ['Y',Y_point], ['N',NET], ['L',layer], ['R',RING_HEIGHT], ['C',contact] ] ) )
X_point = cell_Xmin + ( cell_Xmax - Y )
Y_point = cell_Ymin + ( cell_Ymax - Y )
- contact = Contact ( NET, layer, X_point, Y_point, RING_HEIGHT, RING_HEIGHT )
+ contact = Contact.create ( NET, layer, X_point, Y_point, RING_HEIGHT, RING_HEIGHT )
points_2.append ( dict ( [ ['X',X_point], ['Y',Y_point], ['N',NET], ['L',layer], ['R',RING_HEIGHT], ['C',contact] ] ) )
X_point = cell_Xmin + ( cell_Xmax - Y )
Y_point = cell_Ymin + Y
- contact = Contact ( NET, layer, X_point, Y_point, RING_HEIGHT, RING_HEIGHT )
+ contact = Contact.create ( NET, layer, X_point, Y_point, RING_HEIGHT, RING_HEIGHT )
points_3.append ( dict ( [ ['X',X_point], ['Y',Y_point], ['N',NET], ['L',layer], ['R',RING_HEIGHT], ['C',contact] ] ) )
# end of while
# end of while
@@ -1587,16 +1585,16 @@ def pyPowerRing ( cell, core, n ) :
if ins_pad == pad_north[0] :
for point in points_1 :
- contact = Contact ( point['N'], point['L'], X_pad, point['Y'], point['R'], point['R'] )
- Horizontal ( point['C'], contact, point['L'], point['Y'], point['R'] )
+ contact = Contact.create ( point['N'], point['L'], X_pad, point['Y'], point['R'], point['R'] )
+ Horizontal.create ( point['C'], contact, point['L'], point['Y'], point['R'] )
else :
for point in points_1 :
- Horizontal ( point['N'], point['L'], point['Y'], point['R'], old_X_pad, X_pad )
+ Horizontal.create ( point['N'], point['L'], point['Y'], point['R'], old_X_pad, X_pad )
if ins_pad == pad_north[-1] :
for point in points_2 :
- contact = Contact ( point['N'], point['L'], X_pad, point['Y'], point['R'], point['R'] )
- Horizontal ( contact, point['C'], point['L'], point['Y'], point['R'] )
+ contact = Contact.create ( point['N'], point['L'], X_pad, point['Y'], point['R'], point['R'] )
+ Horizontal.create ( contact, point['C'], point['L'], point['Y'], point['R'] )
old_X_pad = X_pad
@@ -1607,16 +1605,16 @@ def pyPowerRing ( cell, core, n ) :
if ins_pad == pad_east[0] :
for point in points_3 :
- contact = Contact ( point['N'], point['L'], point['X'], Y_pad, point['R'], point['R'] )
- Vertical ( point['C'], contact, point['L'], point['X'], point['R'] )
+ contact = Contact.create ( point['N'], point['L'], point['X'], Y_pad, point['R'], point['R'] )
+ Vertical.create ( point['C'], contact, point['L'], point['X'], point['R'] )
else :
for point in points_3 :
- Vertical ( point['N'], point['L'], point['X'], point['R'], old_Y_pad, Y_pad )
+ Vertical.create ( point['N'], point['L'], point['X'], point['R'], old_Y_pad, Y_pad )
if ins_pad == pad_east[-1] :
for point in points_2 :
- contact = Contact ( point['N'], point['L'], point['X'], Y_pad, point['R'], point['R'] )
- Vertical ( contact, point['C'], point['L'], point['X'], point['R'] )
+ contact = Contact.create ( point['N'], point['L'], point['X'], Y_pad, point['R'], point['R'] )
+ Vertical.create ( contact, point['C'], point['L'], point['X'], point['R'] )
old_Y_pad = Y_pad
@@ -1627,16 +1625,16 @@ def pyPowerRing ( cell, core, n ) :
if ins_pad == pad_south[0] :
for point in points_0 :
- contact = Contact ( point['N'], point['L'], X_pad, point['Y'], point['R'], point['R'] )
- Horizontal ( point['C'], contact, point['L'], point['Y'], point['R'] )
+ contact = Contact.create ( point['N'], point['L'], X_pad, point['Y'], point['R'], point['R'] )
+ Horizontal.create ( point['C'], contact, point['L'], point['Y'], point['R'] )
else :
for point in points_0 :
- Horizontal ( point['N'], point['L'], point['Y'], point['R'], old_X_pad, X_pad )
+ Horizontal.create ( point['N'], point['L'], point['Y'], point['R'], old_X_pad, X_pad )
if ins_pad == pad_south[-1] :
for point in points_3 :
- contact = Contact ( point['N'], point['L'], X_pad, point['Y'], point['R'], point['R'] )
- Horizontal ( contact, point['C'], point['L'], point['Y'], point['R'] )
+ contact = Contact.create ( point['N'], point['L'], X_pad, point['Y'], point['R'], point['R'] )
+ Horizontal.create ( contact, point['C'], point['L'], point['Y'], point['R'] )
old_X_pad = X_pad
@@ -1647,16 +1645,16 @@ def pyPowerRing ( cell, core, n ) :
if ins_pad == pad_west[0] :
for point in points_0 :
- contact = Contact ( point['N'], point['L'], point['X'], Y_pad, point['R'], point['R'] )
- Vertical ( point['C'], contact, point['L'], point['X'], point['R'] )
+ contact = Contact.create ( point['N'], point['L'], point['X'], Y_pad, point['R'], point['R'] )
+ Vertical.create ( point['C'], contact, point['L'], point['X'], point['R'] )
else :
for point in points_0 :
- Vertical ( point['N'], point['L'], point['X'], point['R'], old_Y_pad, Y_pad )
+ Vertical.create ( point['N'], point['L'], point['X'], point['R'], old_Y_pad, Y_pad )
if ins_pad == pad_west[-1] :
for point in points_1 :
- contact = Contact ( point['N'], point['L'], point['X'], Y_pad, point['R'], point['R'] )
- Vertical ( contact, point['C'], point['L'], point['X'], point['R'] )
+ contact = Contact.create ( point['N'], point['L'], point['X'], Y_pad, point['R'], point['R'] )
+ Vertical.create ( contact, point['C'], point['L'], point['X'], point['R'] )
old_Y_pad = Y_pad
@@ -1676,7 +1674,7 @@ def create_inst ( model, name, cell ) :
if not modelmastercell :
raise ErrorMessage(2,"Cannot create instance %s : model %s does not exist in the database."%(name,model))
- inst = Instance ( cell, name, modelmastercell )
+ inst = Instance.create ( cell, name, modelmastercell )
# Connection
plugGround = inst.getPlug ( iter(modelmastercell.getGroundNets()).next() )
@@ -1694,17 +1692,17 @@ def place ( inst, x, y, orientation ) :
raise ErrorMessage(2,"Layout : The instance of %s has not been created."%str(inst.getName()))
# Error : if the instance is already placed
- if inst.getPlacementStatus() == PlacementStatusFIXED :
+ if inst.getPlacementStatus() == Instance.PlacementStatus.FIXED :
raise ErrorMessage(2,"Placement : the instance %s is already placed."%str(inst.getName()))
UpdateSession.open()
## A COMPLETER POUR FAIRE DES PLACE AVEC TOUTES LES SYMETRIES ##
- if orientation == OrientationMY :
+ if orientation == Transformation.Orientation.MY :
y += inst.getAbutmentBox().getHeight()
inst.setTransformation ( Transformation ( x, y, orientation ) )
- inst.setPlacementStatus ( PlacementStatusFIXED )
+ inst.setPlacementStatus ( Instance.PlacementStatus.FIXED )
UpdateSession.close()
@@ -1737,7 +1735,7 @@ def getAllStandardInstances ( cell ) :
for element in cell.getInstances():
# FOR EACH PLACED or FIXED instance of the cell, we call getStandardInstances method
- if element.getPlacementStatus() != PlacementStatusUNPLACED :
+ if element.getPlacementStatus() != Instance.PlacementStatus.UNPLACED :
reference = getStandardInstances ( cell, element, element.getTransformation(), cell.getName() )
return reference
@@ -1752,7 +1750,7 @@ def getStandardInstances ( cell, inst, transformation, name_masterinst ) :
global standard_instances_masque, reference
# Si l'instance est PLACED ou FIXED
- if inst.getPlacementStatus() != PlacementStatusUNPLACED :
+ if inst.getPlacementStatus() != Instance.PlacementStatus.UNPLACED :
name = str ( inst.getMasterCell().getLibrary().getName() )
if inst.isLeaf() :
@@ -2057,22 +2055,22 @@ def createGrid ( my_tuple ) :
def CreateZ ( contact1, contact2 ) :
centerX = (contact1.getX() + contact2.getX() ) / 2
centerX = centerX - (centerX % DbU_lambda(5))
- zContact1 = Contact ( net, via5, centerX, contact1.getY(), DbU_lambda(11), DbU_lambda(11) )
- zContact2 = Contact ( net, via5, centerX, contact2.getY(), DbU_lambda(11), DbU_lambda(11) )
+ zContact1 = Contact.create ( net, via5, centerX, contact1.getY(), DbU_lambda(11), DbU_lambda(11) )
+ zContact2 = Contact.create ( net, via5, centerX, contact2.getY(), DbU_lambda(11), DbU_lambda(11) )
- Horizontal ( contact1, zContact1, metal6, contact1.getY(), DbU_lambda(12) )
- Vertical ( zContact1, zContact2, metal5, zContact1.getX(), DbU_lambda(12) )
- Horizontal ( zContact2, contact2, metal6, zContact2.getY(), DbU_lambda(12) )
+ Horizontal.create ( contact1, zContact1, metal6, contact1.getY(), DbU_lambda(12) )
+ Vertical.create ( zContact1, zContact2, metal5, zContact1.getX(), DbU_lambda(12) )
+ Horizontal.create ( zContact2, contact2, metal6, zContact2.getY(), DbU_lambda(12) )
def CreateN ( contact1, contact2 ) :
centerY = ( contact1.getY() + contact2.getY() ) / 2
centerY = centerY - ( centerY % DbU_lambda(5) )
- nContact1 = Contact ( net, via5, contact1.getX(), centerY, DbU_lambda(11), DbU_lambda(11) )
- nContact2 = Contact ( net, via5, contact2.getX(), centerY, DbU_lambda(11), DbU_lambda(11) )
+ nContact1 = Contact.create ( net, via5, contact1.getX(), centerY, DbU_lambda(11), DbU_lambda(11) )
+ nContact2 = Contact.create ( net, via5, contact2.getX(), centerY, DbU_lambda(11), DbU_lambda(11) )
- Vertical ( contact1, nContact1, metal5, contact1.getX(), DbU_lambda(12) )
- Horizontal ( nContact1, nContact2, metal6, nContact1.getY(), DbU_lambda(12) )
- Vertical ( nContact2, contact2, metal5, nContact2.getX(), DbU_lambda(12) )
+ Vertical.create ( contact1, nContact1, metal5, contact1.getX(), DbU_lambda(12) )
+ Horizontal.create ( nContact1, nContact2, metal6, nContact1.getY(), DbU_lambda(12) )
+ Vertical.create ( nContact2, contact2, metal5, nContact2.getX(), DbU_lambda(12) )
def FindPositionForContact ( position, contactlist1, contactlist2 ) :
def PositionIsInTargetRange ( position, target ) :
@@ -2117,9 +2115,9 @@ def createGrid ( my_tuple ) :
_Ymax = coreBox.getYMax()
ck_contact_list = []
- getNetInstances ( cell, net, Transformation ( 0, 0, OrientationID ) )
+ getNetInstances ( cell, net, Transformation ( 0, 0, Transformation.Orientation.ID ) )
- db = getDataBase()
+ db = DataBase.getDB()
via1 = db.getTechnology().getLayer ( "VIA12" )
via2 = db.getTechnology().getLayer ( "VIA23" )
via3 = db.getTechnology().getLayer ( "VIA34" )
@@ -2136,10 +2134,10 @@ def createGrid ( my_tuple ) :
gridBoundingBox.inflate ( DbU_lambda(15) )
#Create the Bounding Box grid
- NEContact = Contact ( net, via5, gridBoundingBox.getXMin(), gridBoundingBox.getYMax() , DbU_lambda(11), DbU_lambda(11) )
- NWContact = Contact ( net, via5, gridBoundingBox.getXMax(), gridBoundingBox.getYMax() , DbU_lambda(11), DbU_lambda(11) )
- SEContact = Contact ( net, via5, gridBoundingBox.getXMin(), gridBoundingBox.getYMin() , DbU_lambda(11), DbU_lambda(11) )
- SWContact = Contact ( net, via5, gridBoundingBox.getXMax(), gridBoundingBox.getYMin() , DbU_lambda(11), DbU_lambda(11) )
+ NEContact = Contact.create ( net, via5, gridBoundingBox.getXMin(), gridBoundingBox.getYMax() , DbU_lambda(11), DbU_lambda(11) )
+ NWContact = Contact.create ( net, via5, gridBoundingBox.getXMax(), gridBoundingBox.getYMax() , DbU_lambda(11), DbU_lambda(11) )
+ SEContact = Contact.create ( net, via5, gridBoundingBox.getXMin(), gridBoundingBox.getYMin() , DbU_lambda(11), DbU_lambda(11) )
+ SWContact = Contact.create ( net, via5, gridBoundingBox.getXMax(), gridBoundingBox.getYMin() , DbU_lambda(11), DbU_lambda(11) )
northSegment = Segment ( NEContact, NWContact, metal6, DbU_lambda(12) )
southSegment = Segment ( SEContact, SWContact, metal6, DbU_lambda(12) )
eastSegment = Segment ( NEContact, SEContact, metal5, DbU_lambda(12) )
@@ -2178,7 +2176,7 @@ def createGrid ( my_tuple ) :
elif x == gridBoundingBox.getXMax() :
gridContact = NEContact
else :
- gridContact = Contact(southSegment, via5, x, 0, DbU_lambda(11), DbU_lambda(11))
+ gridContact = Contact.create(southSegment, via5, x, 0, DbU_lambda(11), DbU_lambda(11))
southContacts.append(x)
elif y > gridBoundingBox.getYMax() :
@@ -2187,7 +2185,7 @@ def createGrid ( my_tuple ) :
elif x == gridBoundingBox.getXMax() :
gridBoundingBox = SEContact
else :
- gridContact = Contact(northSegment, via5, x, 0, DbU_lambda(11), DbU_lambda(11))
+ gridContact = Contact.create(northSegment, via5, x, 0, DbU_lambda(11), DbU_lambda(11))
northContacts.append(x)
else :
raise ErrorMessage(2,"RouteCK : bad pad placement.")
@@ -2200,7 +2198,7 @@ def createGrid ( my_tuple ) :
elif y == gridBoundingBox.getYMax() :
gridContact = NWContact
else :
- gridContact = Contact(eastSegment, via5, 0, y, DbU_lambda(11), DbU_lambda(11))
+ gridContact = Contact.create(eastSegment, via5, 0, y, DbU_lambda(11), DbU_lambda(11))
eastContacts.append(y)
elif x > gridBoundingBox.getXMax() :
if y == gridBoundingBox.getYMin() :
@@ -2208,7 +2206,7 @@ def createGrid ( my_tuple ) :
elif y == gridBoundingBox.getYMax() :
gridContact = SWContact
else :
- gridContact = Contact(westSegment, via5, 0, y, DbU_lambda(11), DbU_lambda(11))
+ gridContact = Contact.create(westSegment, via5, 0, y, DbU_lambda(11), DbU_lambda(11))
westContacts.append(y)
else :
raise ErrorMessage(2,"RouteCK : bad pad placement.")
@@ -2219,7 +2217,7 @@ def createGrid ( my_tuple ) :
]
raise ErrorMessage(2,message)
- compContact = Contact ( net, via5, x, y, DbU_lambda(11), DbU_lambda(11) )
+ compContact = Contact.create ( net, via5, x, y, DbU_lambda(11), DbU_lambda(11) )
Segment ( compContact, gridContact, layer , DbU_lambda(12) )
@@ -2244,8 +2242,8 @@ def createGrid ( my_tuple ) :
x = x - (x % DbU_lambda(5))
x = FindPositionForContact(x, northContacts, southContacts)
- contact1 = Contact ( southSegment, via5, x, 0, DbU_lambda(11), DbU_lambda(11))
- contact2 = Contact ( northSegment, via5, x, 0, DbU_lambda(11), DbU_lambda(11))
+ contact1 = Contact.create ( southSegment, via5, x, 0, DbU_lambda(11), DbU_lambda(11))
+ contact2 = Contact.create ( northSegment, via5, x, 0, DbU_lambda(11), DbU_lambda(11))
Segment ( contact1, contact2, metal5, DbU_lambda(12) )
@@ -2256,14 +2254,14 @@ def createGrid ( my_tuple ) :
y = y - ( y % DbU_lambda(5) )
y = FindPositionForContact ( y, eastContacts, westContacts )
- contact1 = Contact ( westSegment, via5, 0, y, DbU_lambda(11), DbU_lambda(11) )
- contact2 = Contact ( eastSegment, via5, 0, y, DbU_lambda(11), DbU_lambda(11) )
+ contact1 = Contact.create ( westSegment, via5, 0, y, DbU_lambda(11), DbU_lambda(11) )
+ contact2 = Contact.create ( eastSegment, via5, 0, y, DbU_lambda(11), DbU_lambda(11) )
horizontal = Segment ( contact1, contact2, metal6, DbU_lambda(12) )
yList.append ( y )
- for x in xList : Contact ( horizontal, via5, x, 0, DbU_lambda(11), DbU_lambda(11) )
+ for x in xList : Contact.create ( horizontal, via5, x, 0, DbU_lambda(11), DbU_lambda(11) )
# Connection to the grid
# Cette liste contient les contacts qui sont deja crees
@@ -2273,7 +2271,7 @@ def createGrid ( my_tuple ) :
for contact in ck_contact_list :
xContact = contact[0]
yContact = contact[1]
- plugContact = Contact ( net, via1 , xContact, yContact, via12Side, via12Side )
+ plugContact = Contact.create ( net, via1 , xContact, yContact, via12Side, via12Side )
#find the closest x,y on grid
xList.insert ( 0, gridBoundingBox.getXMin() )
yList.insert ( 0, gridBoundingBox.getYMin() )
@@ -2286,35 +2284,35 @@ def createGrid ( my_tuple ) :
xDistance = abs ( xTarget - xContact )
yDistance = abs ( yTarget - yContact )
- Contact(net, via2, xContact, yContact, via23Side, via23Side )
- Contact(net, via3, xContact, yContact, via34Side, via34Side )
- Contact(net, via4, xContact, yContact, via45Side, via45Side )
+ Contact.create(net, via2, xContact, yContact, via23Side, via23Side )
+ Contact.create(net, via3, xContact, yContact, via34Side, via34Side )
+ Contact.create(net, via4, xContact, yContact, via45Side, via45Side )
if xDistance != 0 or yDistance != 0 :
if ( xDistance <= yDistance + DbU_lambda(10) ): # test pour faire un horizontal
if xDistance != 0 :
if abs(xDistance) <= DbU_lambda(3) :
- gridContact = Contact ( net, metal5, xTarget, yContact, via56Side, via56Side )
+ gridContact = Contact.create ( net, metal5, xTarget, yContact, via56Side, via56Side )
layer = metal5
else :
- Contact ( net, via5, xContact, yContact, via56Side, via56Side )
- gridContact = Contact ( net, via5, xTarget, yContact, via56Side, via56Side )
+ Contact.create ( net, via5, xContact, yContact, via56Side, via56Side )
+ gridContact = Contact.create ( net, via5, xTarget, yContact, via56Side, via56Side )
layer = metal6
- Horizontal( gridContact, plugContact, layer, gridContact.getY(), DbU_lambda(2) )
+ Horizontal.create( gridContact, plugContact, layer, gridContact.getY(), DbU_lambda(2) )
else :
- gridContact = Contact ( net, via5, xTarget, yContact, via56Side, via56Side )
+ gridContact = Contact.create ( net, via5, xTarget, yContact, via56Side, via56Side )
else:
if yDistance != 0 :
if abs(yDistance) <= DbU_lambda(3) :
layer = metal6
- gridContact = Contact ( net, metal6, xContact, yTarget, via56Side, via56Side )
- Contact ( net, via5, xContact, yContact, via56Side, via56Side )
+ gridContact = Contact.create ( net, metal6, xContact, yTarget, via56Side, via56Side )
+ Contact.create ( net, via5, xContact, yContact, via56Side, via56Side )
else :
- gridContact = Contact ( net, via5, xContact, yTarget, via56Side, via56Side )
+ gridContact = Contact.create ( net, via5, xContact, yTarget, via56Side, via56Side )
layer = metal5
- Vertical ( gridContact, plugContact, layer, gridContact.getX(), DbU_lambda(2) )
+ Vertical.create ( gridContact, plugContact, layer, gridContact.getX(), DbU_lambda(2) )
else :
- gridContact = Contact ( net, via5, xContact, yTarget, via56Side, via56Side )
+ gridContact = Contact.create ( net, via5, xContact, yTarget, via56Side, via56Side )
del _Xmin
del _Ymin
@@ -2335,7 +2333,7 @@ def getNetInstances ( cell, net, transformation) :
# Si c est une instance de type leaf
if ins.isLeaf() :
- if ins.getPlacementStatus() == PlacementStatusUNPLACED :
+ if ins.getPlacementStatus() == Instance.PlacementStatus.UNPLACED :
raise ErrorMessage(2,"getNetInstances : instance %s is unplaced" % str(ins.getName()))
else :
if not isPad ( ins ) :
@@ -2382,7 +2380,7 @@ def getNetInstances ( cell, net, transformation) :
if ( not ck_contact_list ) : print "Error in function getNetInstances : no segment found"
else :
- if ins.getPlacementStatus() == PlacementStatusUNPLACED :
+ if ins.getPlacementStatus() == Instance.PlacementStatus.UNPLACED :
raise ErrorMessage(2,"getNetInstances : instance %s is unplaced" % str(ins.getName()))
else :
getNetInstances ( cell, plug.getMasterNet(), transformation.getTransformation ( ins.getTransformation () ))
@@ -2391,12 +2389,12 @@ def getNetInstances ( cell, net, transformation) :
def getNonCLayer ( layer ) :
'''This function returns the nonC layer corresponding to the one given as argument'''
- metal1 = getDataBase ().getTechnology ().getLayer ( "METAL1" )
- metal2 = getDataBase ().getTechnology ().getLayer ( "METAL2" )
- metal3 = getDataBase ().getTechnology ().getLayer ( "METAL3" )
- metal4 = getDataBase ().getTechnology ().getLayer ( "METAL4" )
- metal5 = getDataBase ().getTechnology ().getLayer ( "METAL5" )
- metal6 = getDataBase ().getTechnology ().getLayer ( "METAL6" )
+ metal1 = DataBase.getDB ().getTechnology ().getLayer ( "METAL1" )
+ metal2 = DataBase.getDB ().getTechnology ().getLayer ( "METAL2" )
+ metal3 = DataBase.getDB ().getTechnology ().getLayer ( "METAL3" )
+ metal4 = DataBase.getDB ().getTechnology ().getLayer ( "METAL4" )
+ metal5 = DataBase.getDB ().getTechnology ().getLayer ( "METAL5" )
+ metal6 = DataBase.getDB ().getTechnology ().getLayer ( "METAL6" )
if re.search ( "CMETAL1", str ( layer.getName() ) ) : return metal1
if re.search ( "CMETAL2", str ( layer.getName() ) ) : return metal2
@@ -2411,7 +2409,7 @@ def getNonCLayer ( layer ) :
def Segment ( component1, component2, layer, width ) :
'''This function creates a segment linking component1 and component2'''
- if component1.getX() == component2.getX() : return Vertical ( component1, component2, layer, component1.getX(), width )
- elif component1.getY() == component2.getY() : return Horizontal ( component1, component2, layer, component1.getY(), width )
+ if component1.getX() == component2.getX() : return Vertical.create ( component1, component2, layer, component1.getX(), width )
+ elif component1.getY() == component2.getY() : return Horizontal.create ( component1, component2, layer, component1.getY(), width )
else:
raise ErrorMessage(2,"Segment : the components must be horizontaly or verticaly aligned.")
diff --git a/documentation/UsersGuide/HTML_defs.rst b/documentation/UsersGuide/HTML_defs.rst
index 52e72cae..20b32315 100644
--- a/documentation/UsersGuide/HTML_defs.rst
+++ b/documentation/UsersGuide/HTML_defs.rst
@@ -52,6 +52,7 @@
.. |ControllerInspector_2| replace:: :raw-html:`
`
.. |ControllerInspector_3| replace:: :raw-html:``
.. |ControllerSettings_1| replace:: :raw-html:``
+.. |CoriolisSoftSchema| replace:: :raw-html:``
.. |BigMouse| image:: ./images/ComputerMouse.png
:scale: 25%
diff --git a/documentation/UsersGuide/LaTeX_defs.rst b/documentation/UsersGuide/LaTeX_defs.rst
index ed121b17..dc7e000c 100644
--- a/documentation/UsersGuide/LaTeX_defs.rst
+++ b/documentation/UsersGuide/LaTeX_defs.rst
@@ -53,6 +53,7 @@
.. |ControllerInspector_2| replace:: :raw-latex:`\begin{center}\includegraphics[width=.7\textwidth]{./images/Controller-Inspector-2.eps}\end{center}`
.. |ControllerInspector_3| replace:: :raw-latex:`\begin{center}\includegraphics[width=.7\textwidth]{./images/Controller-Inspector-3.eps}\end{center}`
.. |ControllerSettings_1| replace:: :raw-latex:`\begin{center}\includegraphics[width=.7\textwidth]{./images/Controller-Settings-1.eps}\end{center}`
+.. |CoriolisSoftSchema| replace:: :raw-latex:`\begin{center}\includegraphics[width=.7\textwidth]{./images/Coriolis-Soft-Schema.eps}\end{center}`
.. |BigMouse| image:: ./images/ComputerMouse.eps
:scale: 25%
diff --git a/documentation/UsersGuide/UsersGuide.aux b/documentation/UsersGuide/UsersGuide.aux
index 9e4ffbb1..a02d7b19 100644
--- a/documentation/UsersGuide/UsersGuide.aux
+++ b/documentation/UsersGuide/UsersGuide.aux
@@ -19,147 +19,166 @@
\@writefile{toc}{\select@language{english}}
\@writefile{lof}{\select@language{english}}
\@writefile{lot}{\select@language{english}}
+\@writefile{toc}{\contentsline {section}{Coriolis User's Guide}{1}{section*.1}}
\newlabel{coriolis-user-s-guide}{{}{1}{\relax }{section*.1}{}}
\newlabel{contents}{{}{1}{\relax }{section*.2}{}}
\HyPL@Entry{1<>}
-\@writefile{toc}{\contentsline {section}{Credits \& License}{2}{section*.3}}
+\@writefile{toc}{\contentsline {subsection}{Credits \& License}{2}{section*.3}}
\newlabel{credits-license}{{}{2}{\relax }{section*.3}{}}
\HyPL@Entry{2<>}
-\@writefile{toc}{\contentsline {section}{Release Notes}{3}{section*.4}}
+\@writefile{toc}{\contentsline {subsection}{Release Notes}{3}{section*.4}}
\newlabel{release-notes}{{}{3}{\relax }{section*.4}{}}
-\@writefile{toc}{\contentsline {subsection}{Release 1.0.1475}{3}{section*.5}}
+\@writefile{toc}{\contentsline {subsubsection}{Release 1.0.1475}{3}{section*.5}}
\newlabel{release-1-0-1475}{{}{3}{\relax }{section*.5}{}}
-\@writefile{toc}{\contentsline {subsection}{Release 1.0.1963}{3}{section*.6}}
+\@writefile{toc}{\contentsline {subsubsection}{Release 1.0.1963}{3}{section*.6}}
\newlabel{release-1-0-1963}{{}{3}{\relax }{section*.6}{}}
-\@writefile{toc}{\contentsline {subsection}{Release 1.0.2049}{3}{section*.7}}
+\@writefile{toc}{\contentsline {subsubsection}{Release 1.0.2049}{3}{section*.7}}
\newlabel{release-1-0-2049}{{}{3}{\relax }{section*.7}{}}
-\HyPL@Entry{3<>}
-\@writefile{toc}{\contentsline {subsection}{Release v2.0.0 (c0b9992)}{4}{section*.8}}
-\newlabel{release-v2-0-0-c0b9992}{{}{4}{\relax }{section*.8}{}}
+\@writefile{toc}{\contentsline {subsubsection}{Release v2.0.1}{3}{section*.8}}
+\newlabel{release-v2-0-1}{{}{3}{\relax }{section*.8}{}}
\gdef \LT@i {\LT@entry
{1}{114.85526pt}\LT@entry
{1}{303.50418pt}}
+\HyPL@Entry{3<>}
+\@writefile{toc}{\contentsline {subsection}{Installation}{4}{section*.9}}
+\newlabel{installation}{{}{4}{\relax }{section*.9}{}}
+\@writefile{toc}{\contentsline {subsubsection}{Fixed Directory Tree}{4}{section*.10}}
+\newlabel{fixed-directory-tree}{{}{4}{\relax }{section*.10}{}}
\HyPL@Entry{4<>}
-\@writefile{toc}{\contentsline {section}{Installation}{5}{section*.9}}
-\newlabel{installation}{{}{5}{\relax }{section*.9}{}}
-\@writefile{toc}{\contentsline {subsection}{Fixed Directory Tree}{5}{section*.10}}
-\newlabel{fixed-directory-tree}{{}{5}{\relax }{section*.10}{}}
+\@writefile{toc}{\contentsline {subsubsection}{Building Coriolis}{5}{section*.11}}
+\newlabel{building-coriolis}{{}{5}{\relax }{section*.11}{}}
+\@writefile{toc}{\contentsline {paragraph}{Additionnal Requirement under MacOS}{5}{section*.12}}
+\newlabel{additionnal-requirement-under-macos}{{}{5}{\relax }{section*.12}{}}
+\@writefile{toc}{\contentsline {subsubsection}{Packaging Coriolis}{5}{section*.13}}
+\newlabel{packaging-coriolis}{{}{5}{\relax }{section*.13}{}}
\HyPL@Entry{5<>}
-\@writefile{toc}{\contentsline {subsection}{Building Coriolis}{6}{section*.11}}
-\newlabel{building-coriolis}{{}{6}{\relax }{section*.11}{}}
-\@writefile{toc}{\contentsline {subsection}{Packaging Coriolis}{6}{section*.12}}
-\newlabel{packaging-coriolis}{{}{6}{\relax }{section*.12}{}}
-\@writefile{toc}{\contentsline {subsection}{Hooking up into Alliance}{6}{section*.13}}
-\newlabel{hooking-up-into-alliance}{{}{6}{\relax }{section*.13}{}}
+\@writefile{toc}{\contentsline {subsubsection}{Hooking up into Alliance}{6}{section*.14}}
+\newlabel{hooking-up-into-alliance}{{}{6}{\relax }{section*.14}{}}
+\@writefile{toc}{\contentsline {subsubsection}{Environment Helper}{6}{section*.15}}
+\newlabel{environment-helper}{{}{6}{\relax }{section*.15}{}}
\HyPL@Entry{6<>}
-\@writefile{toc}{\contentsline {subsection}{Environment Helper}{7}{section*.14}}
-\newlabel{environment-helper}{{}{7}{\relax }{section*.14}{}}
+\@writefile{toc}{\contentsline {subsection}{Documentation}{7}{section*.16}}
+\newlabel{documentation}{{}{7}{\relax }{section*.16}{}}
+\@writefile{toc}{\contentsline {subsubsection}{General Software Architecture}{7}{section*.17}}
+\newlabel{general-software-architecture}{{}{7}{\relax }{section*.17}{}}
+\@writefile{toc}{\contentsline {subsection}{Coriolis Configuration \& Initialisation}{7}{section*.18}}
+\newlabel{coriolis-configuration-initialisation}{{}{7}{\relax }{section*.18}{}}
\gdef \LT@ii {\LT@entry
{1}{49.60522pt}\LT@entry
{1}{165.90092pt}\LT@entry
{1}{217.76141pt}}
+\gdef \LT@iii {\LT@entry
+ {1}{49.60522pt}\LT@entry
+ {1}{165.90092pt}\LT@entry
+ {5}{217.76141pt}}
\HyPL@Entry{7<>}
-\@writefile{toc}{\contentsline {section}{Documentation}{8}{section*.15}}
-\newlabel{documentation}{{}{8}{\relax }{section*.15}{}}
-\@writefile{toc}{\contentsline {section}{Coriolis Configuration \& Initialisation}{8}{section*.16}}
-\newlabel{coriolis-configuration-initialisation}{{}{8}{\relax }{section*.16}{}}
-\@writefile{toc}{\contentsline {subsection}{Configuration Helpers}{8}{section*.17}}
-\newlabel{configuration-helpers}{{}{8}{\relax }{section*.17}{}}
-\@writefile{toc}{\contentsline {subsubsection}{Alliance Helper}{8}{section*.18}}
-\newlabel{id1}{{}{8}{\relax }{section*.18}{}}
-\newlabel{alliance-helper}{{}{8}{\relax }{section*.18}{}}
+\@writefile{toc}{\contentsline {subsubsection}{First Stage: Symbolic Technology Selection}{8}{section*.19}}
+\newlabel{first-stage-symbolic-technology-selection}{{}{8}{\relax }{section*.19}{}}
+\@writefile{toc}{\contentsline {subsubsection}{Second Stage: Technology Configuration Loading}{8}{section*.20}}
+\newlabel{second-stage-technology-configuration-loading}{{}{8}{\relax }{section*.20}{}}
+\@writefile{toc}{\contentsline {subsubsection}{Configuration Helpers}{8}{section*.21}}
+\newlabel{configuration-helpers}{{}{8}{\relax }{section*.21}{}}
+\@writefile{toc}{\contentsline {paragraph}{Alliance Helper}{8}{section*.22}}
+\newlabel{id1}{{}{8}{\relax }{section*.22}{}}
+\newlabel{alliance-helper}{{}{8}{\relax }{section*.22}{}}
\HyPL@Entry{8<>}
\HyPL@Entry{9<>}
-\@writefile{toc}{\contentsline {subsubsection}{Tools Configuration Helpers}{10}{section*.19}}
-\newlabel{tools-configuration-helpers}{{}{10}{\relax }{section*.19}{}}
+\@writefile{toc}{\contentsline {paragraph}{Tools Configuration Helpers}{10}{section*.23}}
+\newlabel{tools-configuration-helpers}{{}{10}{\relax }{section*.23}{}}
\HyPL@Entry{10<>}
-\@writefile{toc}{\contentsline {section}{CGT - The Graphical Interface}{11}{section*.20}}
-\newlabel{cgt-the-graphical-interface}{{}{11}{\relax }{section*.20}{}}
+\@writefile{toc}{\contentsline {subsubsection}{Hacking the Configuration Files}{11}{section*.24}}
+\newlabel{hacking-the-configuration-files}{{}{11}{\relax }{section*.24}{}}
\HyPL@Entry{11<>}
+\@writefile{toc}{\contentsline {subsection}{CGT - The Graphical Interface}{12}{section*.25}}
+\newlabel{cgt-the-graphical-interface}{{}{12}{\relax }{section*.25}{}}
\HyPL@Entry{12<>}
-\@writefile{toc}{\contentsline {section}{Viewer \& Tools}{13}{section*.21}}
-\newlabel{id2}{{}{13}{\relax }{section*.21}{}}
-\newlabel{viewer-tools}{{}{13}{\relax }{section*.21}{}}
-\@writefile{toc}{\contentsline {subsection}{Stratus Netlist Capture}{13}{section*.22}}
-\newlabel{stratus-netlist-capture}{{}{13}{\relax }{section*.22}{}}
-\@writefile{toc}{\contentsline {subsection}{The Hurricane Data-Base}{13}{section*.23}}
-\newlabel{the-hurricane-data-base}{{}{13}{\relax }{section*.23}{}}
+\@writefile{toc}{\contentsline {subsection}{Viewer \& Tools}{13}{section*.26}}
+\newlabel{id2}{{}{13}{\relax }{section*.26}{}}
+\newlabel{viewer-tools}{{}{13}{\relax }{section*.26}{}}
+\@writefile{toc}{\contentsline {subsubsection}{Stratus Netlist Capture}{13}{section*.27}}
+\newlabel{stratus-netlist-capture}{{}{13}{\relax }{section*.27}{}}
+\@writefile{toc}{\contentsline {subsubsection}{The Hurricane Data-Base}{13}{section*.28}}
+\newlabel{the-hurricane-data-base}{{}{13}{\relax }{section*.28}{}}
\HyPL@Entry{13<>}
-\@writefile{toc}{\contentsline {subsection}{Mauka -{}- Placer}{14}{section*.24}}
-\newlabel{mauka-placer}{{}{14}{\relax }{section*.24}{}}
-\@writefile{toc}{\contentsline {subsection}{Knik -{}- Global Router}{14}{section*.25}}
-\newlabel{knik-global-router}{{}{14}{\relax }{section*.25}{}}
-\@writefile{toc}{\contentsline {subsection}{Kite -{}- Detailed Router}{14}{section*.26}}
-\newlabel{kite-detailed-router}{{}{14}{\relax }{section*.26}{}}
-\gdef \LT@iii {\LT@entry
- {1}{170.48116pt}\LT@entry
- {1}{88.52501pt}\LT@entry
- {5}{587.85477pt}}
+\@writefile{toc}{\contentsline {subsubsection}{Mauka -{}- Placer}{14}{section*.29}}
+\newlabel{mauka-placer}{{}{14}{\relax }{section*.29}{}}
+\@writefile{toc}{\contentsline {subsubsection}{Knik -{}- Global Router}{14}{section*.30}}
+\newlabel{knik-global-router}{{}{14}{\relax }{section*.30}{}}
+\@writefile{toc}{\contentsline {subsubsection}{Kite -{}- Detailed Router}{14}{section*.31}}
+\newlabel{kite-detailed-router}{{}{14}{\relax }{section*.31}{}}
\HyPL@Entry{14<>}
-\@writefile{toc}{\contentsline {subsubsection}{Kite Configuration Parameters}{15}{section*.27}}
-\newlabel{kite-configuration-parameters}{{}{15}{\relax }{section*.27}{}}
-\@writefile{toc}{\contentsline {subsection}{Executing Python Scripts in Cgt}{15}{section*.28}}
-\newlabel{executing-python-scripts-in-cgt}{{}{15}{\relax }{section*.28}{}}
-\newlabel{python-scripts-in-cgt}{{}{15}{\relax }{section*.28}{}}
+\HyPL@Entry{15<>}
+\@writefile{toc}{\contentsline {paragraph}{Kite Configuration Parameters}{16}{section*.32}}
+\newlabel{kite-configuration-parameters}{{}{16}{\relax }{section*.32}{}}
\gdef \LT@iv {\LT@entry
+ {1}{181.77737pt}\LT@entry
+ {1}{102.323pt}\LT@entry
+ {5}{161.03175pt}}
+\gdef \LT@v {\LT@entry
{1}{85.57443pt}\LT@entry
{1}{93.96251pt}\LT@entry
{1}{253.3158pt}}
-\HyPL@Entry{15<>}
-\@writefile{toc}{\contentsline {subsection}{Printing \& Snapshots}{16}{section*.29}}
-\newlabel{printing-snapshots}{{}{16}{\relax }{section*.29}{}}
-\gdef \LT@v {\LT@entry
+\HyPL@Entry{16<>}
+\@writefile{toc}{\contentsline {subsubsection}{Executing Python Scripts in Cgt}{17}{section*.33}}
+\newlabel{executing-python-scripts-in-cgt}{{}{17}{\relax }{section*.33}{}}
+\newlabel{python-scripts-in-cgt}{{}{17}{\relax }{section*.33}{}}
+\@writefile{toc}{\contentsline {subsubsection}{Printing \& Snapshots}{17}{section*.34}}
+\newlabel{printing-snapshots}{{}{17}{\relax }{section*.34}{}}
+\gdef \LT@vi {\LT@entry
{1}{79.7221pt}\LT@entry
{1}{95.63461pt}\LT@entry
{1}{257.49603pt}}
-\HyPL@Entry{16<>}
-\@writefile{toc}{\contentsline {subsection}{Memento of Shortcuts in Graphic Mode}{17}{section*.30}}
-\newlabel{memento-of-shortcuts-in-graphic-mode}{{}{17}{\relax }{section*.30}{}}
-\gdef \LT@vi {\LT@entry
+\HyPL@Entry{17<>}
+\@writefile{toc}{\contentsline {subsubsection}{Memento of Shortcuts in Graphic Mode}{18}{section*.35}}
+\newlabel{memento-of-shortcuts-in-graphic-mode}{{}{18}{\relax }{section*.35}{}}
+\gdef \LT@vii {\LT@entry
{1}{160.86342pt}\LT@entry
{1}{252.89458pt}}
-\HyPL@Entry{17<>}
-\@writefile{toc}{\contentsline {subsection}{Cgt Command Line Options}{18}{section*.31}}
-\newlabel{cgt-command-line-options}{{}{18}{\relax }{section*.31}{}}
-\gdef \LT@vii {\LT@entry
- {1}{170.48116pt}\LT@entry
- {1}{88.52501pt}\LT@entry
- {5}{328.64403pt}}
\HyPL@Entry{18<>}
-\@writefile{toc}{\contentsline {subsection}{Miscellaneous Settings}{19}{section*.32}}
-\newlabel{miscellaneous-settings}{{}{19}{\relax }{section*.32}{}}
-\@writefile{toc}{\contentsline {section}{The Controller}{19}{section*.33}}
-\newlabel{id3}{{}{19}{\relax }{section*.33}{}}
-\newlabel{the-controller}{{}{19}{\relax }{section*.33}{}}
-\@writefile{toc}{\contentsline {subsection}{The Look Tab}{19}{section*.34}}
-\newlabel{id4}{{}{19}{\relax }{section*.34}{}}
-\newlabel{the-look-tab}{{}{19}{\relax }{section*.34}{}}
+\@writefile{toc}{\contentsline {subsubsection}{Cgt Command Line Options}{19}{section*.36}}
+\newlabel{cgt-command-line-options}{{}{19}{\relax }{section*.36}{}}
+\gdef \LT@viii {\LT@entry
+ {1}{191.80995pt}\LT@entry
+ {1}{98.55759pt}\LT@entry
+ {5}{164.79716pt}}
\HyPL@Entry{19<>}
-\@writefile{toc}{\contentsline {subsection}{The Filter Tab}{20}{section*.35}}
-\newlabel{id5}{{}{20}{\relax }{section*.35}{}}
-\newlabel{the-filter-tab}{{}{20}{\relax }{section*.35}{}}
+\@writefile{toc}{\contentsline {subsubsection}{Miscellaneous Settings}{20}{section*.37}}
+\newlabel{miscellaneous-settings}{{}{20}{\relax }{section*.37}{}}
+\@writefile{toc}{\contentsline {subsection}{The Controller}{20}{section*.38}}
+\newlabel{id3}{{}{20}{\relax }{section*.38}{}}
+\newlabel{the-controller}{{}{20}{\relax }{section*.38}{}}
\HyPL@Entry{20<>}
-\@writefile{toc}{\contentsline {subsection}{The Layers\&Go Tab}{21}{section*.36}}
-\newlabel{id6}{{}{21}{\relax }{section*.36}{}}
-\newlabel{the-layers-go-tab}{{}{21}{\relax }{section*.36}{}}
+\@writefile{toc}{\contentsline {subsubsection}{The Look Tab}{21}{section*.39}}
+\newlabel{id4}{{}{21}{\relax }{section*.39}{}}
+\newlabel{the-look-tab}{{}{21}{\relax }{section*.39}{}}
+\@writefile{toc}{\contentsline {subsubsection}{The Filter Tab}{21}{section*.40}}
+\newlabel{id5}{{}{21}{\relax }{section*.40}{}}
+\newlabel{the-filter-tab}{{}{21}{\relax }{section*.40}{}}
\HyPL@Entry{21<>}
-\@writefile{toc}{\contentsline {subsection}{The Netlist Tab}{22}{section*.37}}
-\newlabel{id7}{{}{22}{\relax }{section*.37}{}}
-\newlabel{the-netlist-tab}{{}{22}{\relax }{section*.37}{}}
+\@writefile{toc}{\contentsline {subsubsection}{The Layers\&Go Tab}{22}{section*.41}}
+\newlabel{id6}{{}{22}{\relax }{section*.41}{}}
+\newlabel{the-layers-go-tab}{{}{22}{\relax }{section*.41}{}}
\HyPL@Entry{22<>}
-\@writefile{toc}{\contentsline {subsection}{The Selection Tab}{23}{section*.38}}
-\newlabel{id8}{{}{23}{\relax }{section*.38}{}}
-\newlabel{the-selection-tab}{{}{23}{\relax }{section*.38}{}}
+\@writefile{toc}{\contentsline {subsubsection}{The Netlist Tab}{23}{section*.42}}
+\newlabel{id7}{{}{23}{\relax }{section*.42}{}}
+\newlabel{the-netlist-tab}{{}{23}{\relax }{section*.42}{}}
\HyPL@Entry{23<>}
-\@writefile{toc}{\contentsline {subsection}{The Inspector Tab}{24}{section*.39}}
-\newlabel{id9}{{}{24}{\relax }{section*.39}{}}
-\newlabel{the-inspector-tab}{{}{24}{\relax }{section*.39}{}}
+\@writefile{toc}{\contentsline {subsubsection}{The Selection Tab}{24}{section*.43}}
+\newlabel{id8}{{}{24}{\relax }{section*.43}{}}
+\newlabel{the-selection-tab}{{}{24}{\relax }{section*.43}{}}
\HyPL@Entry{24<>}
+\@writefile{toc}{\contentsline {subsubsection}{The Inspector Tab}{25}{section*.44}}
+\newlabel{id9}{{}{25}{\relax }{section*.44}{}}
+\newlabel{the-inspector-tab}{{}{25}{\relax }{section*.44}{}}
\HyPL@Entry{25<>}
-\@writefile{toc}{\contentsline {subsection}{The Settings Tab}{26}{section*.40}}
-\newlabel{id10}{{}{26}{\relax }{section*.40}{}}
-\newlabel{the-settings-tab}{{}{26}{\relax }{section*.40}{}}
\HyPL@Entry{26<>}
-\@writefile{toc}{\contentsline {section}{A complete Example: AM2901}{27}{section*.41}}
-\newlabel{a-complete-example-am2901}{{}{27}{\relax }{section*.41}{}}
+\@writefile{toc}{\contentsline {subsubsection}{The Settings Tab}{27}{section*.45}}
+\newlabel{id10}{{}{27}{\relax }{section*.45}{}}
+\newlabel{the-settings-tab}{{}{27}{\relax }{section*.45}{}}
+\HyPL@Entry{27<>}
+\@writefile{toc}{\contentsline {subsection}{Python Interface for Hurricane / Coriolis}{28}{section*.46}}
+\newlabel{python-interface-for-hurricane-coriolis}{{}{28}{\relax }{section*.46}{}}
+\newlabel{python-interface-to-coriolis}{{}{28}{\relax }{section*.46}{}}
+\@writefile{toc}{\contentsline {subsection}{A Simple Example: AM2901}{28}{section*.47}}
+\newlabel{a-simple-example-am2901}{{}{28}{\relax }{section*.47}{}}
\ttl@finishall
diff --git a/documentation/UsersGuide/UsersGuide.rst b/documentation/UsersGuide/UsersGuide.rst
index dbcd197b..9045d86e 100644
--- a/documentation/UsersGuide/UsersGuide.rst
+++ b/documentation/UsersGuide/UsersGuide.rst
@@ -429,7 +429,8 @@ are avalaibles here `Coriolis Tools Documentation`_.
mimic *as closely as possible* the C++ interface, so the documentation
applies to both languages with only minor syntactic changes.
-**General Software Architecture**
+General Software Architecture
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Coriolis| has been build with respect of the classical paradigm that the
computational instensive parts have been written in C++, and almost
@@ -441,6 +442,8 @@ two methods:
to very specific requirements such as shared functions between modules
or C++/|Python| secure bi-directional object deletion.
+|CoriolisSoftSchema|
+
Coriolis Configuration & Initialisation
=======================================
@@ -695,6 +698,44 @@ Taxonomy of the file:
#. ``DefaultValue``, the default value for that parameter.
+Hacking the Configuration Files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Asides from the symbols that gets used by the configuration helpers like
+:cb:`allianceConfig` or :cb:`parametersTable`, you can put pretty much anything
+in :cb:`/.coriolis2.conf` (that is, written in |Python|).
+
+For example: ::
+
+ # -*- Mode:Python -*-
+
+ defaultStyle = 'Alliance.Classic [black]'
+
+ # Regular Coriolis configuration.
+ parametersTable = \
+ ( ('misc.catchCore' , TypeBool , False )
+ , ('misc.info' , TypeBool , False )
+ , ('misc.paranoid' , TypeBool , False )
+ , ('misc.bug' , TypeBool , False )
+ , ('misc.logMode' , TypeBool , True )
+ , ('misc.verboseLevel1' , TypeBool , False )
+ , ('misc.verboseLevel2' , TypeBool , True )
+ , ('misc.traceLevel' , TypeInt , 1000 )
+ )
+
+ # Some ordinary Python script...
+ import os
+
+ print ' o Cleaning up ClockTree previous run.'
+ for fileName in os.listdir('.'):
+ if fileName.endswith('.ap') or (fileName.find('_clocked.') >= 0):
+ print ' - <%s>' % fileName
+ os.unlink(fileName)
+
+
+See `Python Interface to Coriolis`_ for more details those capabilities.
+
+
CGT - The Graphical Interface
=============================
@@ -871,11 +912,19 @@ the :cb:`kite.` prefix.
The |Katabatic| parameters control the layer assignment step.
+All the defaults value given below are from the default |Alliance| technology
+(:cb:`cmos` and :cb:`SxLib` cell gauge/routing gauge).
+
+-----------------------------------+------------------+----------------------------+
| Parameter Identifier | Type | Default |
+===================================+==================+============================+
| **Katabatic Parameters** |
+-----------------------------------+------------------+----------------------------+
+|``katabatic.topRoutingLayer`` | TypeString | :cb:`METAL5` |
+| +------------------+----------------------------+
+| | Define the highest metal layer that will be |
+| | used for routing (inclusive). |
++-----------------------------------+------------------+----------------------------+
|``katabatic.globalLengthThreshold``| TypeInt | :cb:`1450` |
| +------------------+----------------------------+
| | This parameter is used by a layer assignment |
@@ -897,12 +946,18 @@ The |Katabatic| parameters control the layer assignment step.
+-----------------------------------+------------------+----------------------------+
| **Knik Parameters** |
+-----------------------------------+------------------+----------------------------+
-| ``kite.edgeCapacity`` | TypePercentage | :cb:`85` |
+| ``kite.hTracksReservedLocal`` | TypeInt | :cb:`3` |
| +------------------+----------------------------+
-| | Adjust the maximum capacity of the global |
-| | router's edges. The GCells would be too |
-| | saturated for the detailed router if the edge |
-| | capacity is left to 100%. |
+| | To take account the tracks needed *inside* a |
+| | GCell to build the *local* routing, decrease |
+| | the capacity of the edges of the global |
+| | router. Horizontal and vertical locally |
+| | reserved capacity can be distinguished for |
+| | more accuracy. |
++-----------------------------------+------------------+----------------------------+
+| ``kite.vTracksReservedLocal`` | TypeInt | :cb:`3` |
+| +------------------+----------------------------+
+| | cf. ``kite.hTracksReservedLocal`` |
+-----------------------------------+------------------+----------------------------+
| **Kite Parameters** |
+-----------------------------------+------------------+----------------------------+
@@ -955,36 +1010,16 @@ Python/Stratus scripts can be executed either in text or graphical mode.
it must be reachable through the ``PYTHONPATH``. You may uses the
dotted module notation.
-A Python/Stratus script must contains a function called ``StratusScript``
+A Python/Stratus script must contains a function called ``ScriptMain()``
with one optional argument, the graphical editor into which it may be
-running (will be set to ``None`` in text mode).
-
-Asides for this requirement, the python script can contains anything valid
-in |Python|, so don't hesitate to use any package or extention.
+running (will be set to ``None`` in text mode). The Python interface to
+the editor (type: :cb:`CellViewer`) is limited to basic capabilities
+only.
Any script given on the command line will be run immediatly *after* the
initializations and *before* any other argument is processed.
-Small example of Python/Stratus script: ::
-
- from status import *
-
- def doSomething ():
- # ...
- return
-
- def StratusScript ( editor=None ):
- if globals().has_key ( "__editor" ): editor = __editor
- if editor: setEditor ( editor )
-
- doSomething()
- return
-
- if __name__ == "__main__" :
- StratusScript ()
-
-This script could be run directly with Python (thanks to the two last lines)
-or through |cgt| in both text and graphical modes.
+For more explanation on Python scripts see `Python Interface to Coriolis`_.
Printing & Snapshots
@@ -1372,6 +1407,49 @@ Here comes the description of the *Settings* tab.
|ControllerSettings_1|
+.. _Python Interface to Coriolis:
+
+Python Interface for |Hurricane| / |Coriolis|
+=============================================
+
+The (almost) complete interface of |Hurricane| is exported as a |Python| module
+and some part of the other components of |Coriolis| (each one in a separate
+module). The interface has been made to mirror as closely as possible the
+C++ one, so the C++ doxygen documentation could be used to write code with
+either languages.
+
+`Summary of the C++ Documentation `_
+
+A script could be run directly in text mode from the command line or through
+the graphical interface (see `Python Scripts in Cgt`_).
+
+Asides for this requirement, the python script can contains anything valid
+in |Python|, so don't hesitate to use any package or extention.
+
+Small example of Python/Stratus script: ::
+
+ from Hurricane import *
+ from Stratus import *
+
+ def doSomething ():
+ # ...
+ return
+
+ def ScriptMain ( editor=None ):
+ if globals().has_key( "__editor" ): editor = __editor
+ if editor: setEditor( editor )
+
+ doSomething()
+ return
+
+ if __name__ == "__main__" :
+ ScriptMain ()
+
+This script could be run directly with Python (thanks to the two last lines)
+or through |cgt| in both text and graphical modes through the :cb:`ScriptMain()`
+function.
+
+
A Simple Example: AM2901
========================
diff --git a/documentation/UsersGuide/WWW_defs.rst b/documentation/UsersGuide/WWW_defs.rst
index 4f988421..ac901a71 100644
--- a/documentation/UsersGuide/WWW_defs.rst
+++ b/documentation/UsersGuide/WWW_defs.rst
@@ -57,6 +57,7 @@
.. |ControllerInspector_2| replace:: :raw-html:``
.. |ControllerInspector_3| replace:: :raw-html:``
.. |ControllerSettings_1| replace:: :raw-html:``
+.. |CoriolisSoftSchema| replace:: :raw-html:``
.. |BigMouse| image:: https://soc-extras.lip6.fr/media/filer/2012/12/07/computermouse.png
:scale: 25%
diff --git a/documentation/UsersGuide/images/Coriolis-Soft-Schema.eps b/documentation/UsersGuide/images/Coriolis-Soft-Schema.eps
new file mode 100644
index 00000000..ffa352cf
--- /dev/null
+++ b/documentation/UsersGuide/images/Coriolis-Soft-Schema.eps
@@ -0,0 +1,449 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: Coriolis-Soft-Schema.fig
+%%Creator: fig2dev Version 3.2 Patchlevel 5
+%%CreationDate: Sun Jun 29 14:12:01 2014
+%%For: jpc@lepka (Jean-Paul Chaput)
+%%BoundingBox: 0 0 492 478
+%Magnification: 0.8000
+%%EndComments
+/MyAppDict 100 dict dup begin def
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 478 moveto 0 0 lineto 492 0 lineto 492 478 lineto closepath clip newpath
+-200.5 418.7 translate
+1 -1 scale
+
+% left30
+<<
+ /PatternType 1
+ /PaintType 2
+ /TilingType 2
+ /BBox [-2 -4 10 5]
+ /XStep 8
+ /YStep 4
+ /PaintProc
+ {
+ pop
+ newpath
+ .7 setlinewidth
+ -2 -1 moveto
+ 12 6 rlineto
+ stroke
+ } bind
+
+>>
+
+matrix
+makepattern
+/P1 exch def
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+10 setmiterlimit
+0 slj 0 slc
+ 0.04800 0.04800 sc
+%
+% Fig objects follow
+%
+%
+% here starts figure with depth 70
+% Polyline
+0 slj
+0 slc
+15.000 slw
+gs clippath
+4560 -27 m 4560 -315 l 4440 -315 l 4440 -27 l 4440 -27 l 4500 -267 l 4560 -27 l cp
+eoclip
+n 4500 4200 m
+ 4500 -300 l gs col21 s gr gr
+
+% arrowhead
+n 4560 -27 m 4500 -267 l 4440 -27 l 4560 -27 l cp gs col21 1.00 shd ef gr col21 s
+% Polyline
+gs clippath
+5160 -27 m 5160 -315 l 5040 -315 l 5040 -27 l 5040 -27 l 5100 -267 l 5160 -27 l cp
+eoclip
+n 5100 600 m
+ 5100 -300 l gs col21 s gr gr
+
+% arrowhead
+n 5160 -27 m 5100 -267 l 5040 -27 l 5160 -27 l cp gs col21 1.00 shd ef gr col21 s
+% Polyline
+gs clippath
+5010 3572 m 5010 3285 l 4890 3285 l 4890 3572 l 4890 3572 l 4950 3332 l 5010 3572 l cp
+eoclip
+n 4950 7800 m
+ 4950 3300 l gs col0 s gr gr
+
+% arrowhead
+n 5010 3572 m 4950 3332 l 4890 3572 l 5010 3572 l cp gs 0.00 setgray ef gr col0 s
+% Polyline
+gs clippath
+5160 1772 m 5160 1485 l 5040 1485 l 5040 1772 l 5040 1772 l 5100 1532 l 5160 1772 l cp
+eoclip
+n 5100 7800 m
+ 5100 1500 l gs col0 s gr gr
+
+% arrowhead
+n 5160 1772 m 5100 1532 l 5040 1772 l 5160 1772 l cp gs 0.00 setgray ef gr col0 s
+% Polyline
+gs clippath
+5460 5372 m 5460 5085 l 5340 5085 l 5340 5372 l 5340 5372 l 5400 5132 l 5460 5372 l cp
+eoclip
+n 5400 6000 m
+ 5400 5100 l gs col8 s gr gr
+
+% arrowhead
+n 5460 5372 m 5400 5132 l 5340 5372 l 5460 5372 l cp gs col8 1.00 shd ef gr col8 s
+% Polyline
+gs clippath
+5610 3572 m 5610 3285 l 5490 3285 l 5490 3572 l 5490 3572 l 5550 3332 l 5610 3572 l cp
+eoclip
+n 5550 6000 m
+ 5550 3300 l gs col8 s gr gr
+
+% arrowhead
+n 5610 3572 m 5550 3332 l 5490 3572 l 5610 3572 l cp gs col8 1.00 shd ef gr col8 s
+% Polyline
+gs clippath
+5760 1772 m 5760 1485 l 5640 1485 l 5640 1772 l 5640 1772 l 5700 1532 l 5760 1772 l cp
+eoclip
+n 5700 6000 m
+ 5700 1500 l gs col8 s gr gr
+
+% arrowhead
+n 5760 1772 m 5700 1532 l 5640 1772 l 5760 1772 l cp gs col8 1.00 shd ef gr col8 s
+% Polyline
+gs clippath
+5910 -27 m 5910 -315 l 5790 -315 l 5790 -27 l 5790 -27 l 5850 -267 l 5910 -27 l cp
+eoclip
+n 5850 6000 m
+ 5850 -300 l gs col8 s gr gr
+
+% arrowhead
+n 5910 -27 m 5850 -267 l 5790 -27 l 5910 -27 l cp gs col8 1.00 shd ef gr col8 s
+% Polyline
+gs clippath
+4860 5372 m 4860 5085 l 4740 5085 l 4740 5372 l 4740 5372 l 4800 5132 l 4860 5372 l cp
+eoclip
+n 4800 7800 m
+ 4800 5100 l gs col0 s gr gr
+
+% arrowhead
+n 4860 5372 m 4800 5132 l 4740 5372 l 4860 5372 l cp gs 0.00 setgray ef gr col0 s
+% Polyline
+gs clippath
+4710 7172 m 4710 6885 l 4590 6885 l 4590 7172 l 4590 7172 l 4650 6932 l 4710 7172 l cp
+eoclip
+n 4650 7800 m
+ 4650 6900 l gs col0 s gr gr
+
+% arrowhead
+n 4710 7172 m 4650 6932 l 4590 7172 l 4710 7172 l cp gs 0.00 setgray ef gr col0 s
+% Polyline
+gs clippath
+11428 8310 m 11715 8310 l 11715 8190 l 11428 8190 l 11428 8190 l 11668 8250 l 11428 8310 l cp
+eoclip
+n 10800 8250 m
+ 11700 8250 l gs col18 s gr gr
+
+% arrowhead
+n 11428 8310 m 11668 8250 l 11428 8190 l 11428 8310 l cp gs col18 1.00 shd ef gr col18 s
+% Polyline
+gs clippath
+11428 6510 m 11715 6510 l 11715 6390 l 11428 6390 l 11428 6390 l 11668 6450 l 11428 6510 l cp
+eoclip
+n 10800 6450 m
+ 11700 6450 l gs col18 s gr gr
+
+% arrowhead
+n 11428 6510 m 11668 6450 l 11428 6390 l 11428 6510 l cp gs col18 1.00 shd ef gr col18 s
+% Polyline
+gs clippath
+11428 4710 m 11715 4710 l 11715 4590 l 11428 4590 l 11428 4590 l 11668 4650 l 11428 4710 l cp
+eoclip
+n 7800 4650 m
+ 11700 4650 l gs col18 s gr gr
+
+% arrowhead
+n 11428 4710 m 11668 4650 l 11428 4590 l 11428 4710 l cp gs col18 1.00 shd ef gr col18 s
+% Polyline
+gs clippath
+11428 2910 m 11715 2910 l 11715 2790 l 11428 2790 l 11428 2790 l 11668 2850 l 11428 2910 l cp
+eoclip
+n 8400 2850 m
+ 11700 2850 l gs col18 s gr gr
+
+% arrowhead
+n 11428 2910 m 11668 2850 l 11428 2790 l 11428 2910 l cp gs col18 1.00 shd ef gr col18 s
+% Polyline
+gs clippath
+11428 1110 m 11715 1110 l 11715 990 l 11428 990 l 11428 990 l 11668 1050 l 11428 1110 l cp
+eoclip
+n 8400 1050 m
+ 11700 1050 l gs col18 s gr gr
+
+% arrowhead
+n 11428 1110 m 11668 1050 l 11428 990 l 11428 1110 l cp gs col18 1.00 shd ef gr col18 s
+% Polyline
+gs clippath
+11428 -689 m 11715 -690 l 11715 -810 l 11428 -809 l 11428 -809 l 11668 -749 l 11428 -689 l cp
+eoclip
+n 10800 -750 m
+ 11700 -750 l gs col18 s gr gr
+
+% arrowhead
+n 11428 -689 m 11668 -749 l 11428 -809 l 11428 -689 l cp gs col18 1.00 shd ef gr col18 s
+% Polyline
+gs clippath
+13528 5760 m 13815 5760 l 13815 5640 l 13528 5640 l 13528 5640 l 13768 5700 l 13528 5760 l cp
+eoclip
+n 12600 5700 m
+ 13800 5700 l gs col18 s gr gr
+
+% arrowhead
+n 13528 5760 m 13768 5700 l 13528 5640 l 13528 5760 l cp gs col18 1.00 shd ef gr col18 s
+% Polyline
+gs clippath
+12928 2760 m 13215 2760 l 13215 2640 l 12928 2640 l 12928 2640 l 13168 2700 l 12928 2760 l cp
+eoclip
+n 12600 2700 m
+ 13200 2700 l gs col18 s gr gr
+
+% arrowhead
+n 12928 2760 m 13168 2700 l 12928 2640 l 12928 2760 l cp gs col18 1.00 shd ef gr col18 s
+% Polyline
+gs clippath
+13560 872 m 13560 585 l 13440 585 l 13440 872 l 13440 872 l 13500 632 l 13560 872 l cp
+eoclip
+n 13500 1800 m
+ 13500 600 l gs col18 s gr gr
+
+% arrowhead
+n 13560 872 m 13500 632 l 13440 872 l 13560 872 l cp gs col18 1.00 shd ef gr col18 s
+% Polyline
+gs clippath
+14160 872 m 14160 585 l 14040 585 l 14040 872 l 14040 872 l 14100 632 l 14160 872 l cp
+eoclip
+n 14100 4800 m
+ 14100 600 l gs col18 s gr gr
+
+% arrowhead
+n 14160 872 m 14100 632 l 14040 872 l 14160 872 l cp gs col18 1.00 shd ef gr col18 s
+% here ends figure;
+%
+% here starts figure with depth 60
+% Polyline
+0 slj
+0 slc
+15.000 slw
+n 4200 7800 m 9000 7800 l 9000 8700 l 4200 8700 l
+ cp gs col7 1.00 shd ef gr gs col0 s gr
+% Polyline
+n 9000 7800 m 10800 7800 l 10800 8700 l 9000 8700 l
+ cp gs col7 0.00 shd ef gr gs col0 s gr
+% Polyline
+n 4200 4200 m 6000 4200 l 6000 5100 l 4200 5100 l
+ cp gs col7 1.00 shd ef gr gs col21 s gr
+% Polyline
+n 6000 4200 m 7800 4200 l 7800 5100 l 6000 5100 l
+ cp
+% Fill with pattern background color
+gs /DeviceRGB setcolorspace 0.56 0.00 0.56 setcolor fill gr
+
+% Fill with pattern pen color
+gs /DeviceRGB setcolorspace 0.56 0.00 0.56 P1 setpattern fill gr
+
+gs col21 s gr
+% Polyline
+n 4800 2400 m 6600 2400 l 6600 3300 l 4800 3300 l
+ cp gs col7 1.00 shd ef gr gs col21 s gr
+% Polyline
+n 6600 2400 m 8400 2400 l 8400 3300 l 6600 3300 l
+ cp
+% Fill with pattern background color
+gs /DeviceRGB setcolorspace 0.56 0.00 0.56 setcolor fill gr
+
+% Fill with pattern pen color
+gs /DeviceRGB setcolorspace 0.56 0.00 0.56 P1 setpattern fill gr
+
+gs col21 s gr
+% Polyline
+n 4800 600 m 6600 600 l 6600 1500 l 4800 1500 l
+ cp gs col7 1.00 shd ef gr gs col21 s gr
+% Polyline
+n 6600 600 m 8400 600 l 8400 1500 l 6600 1500 l
+ cp
+% Fill with pattern background color
+gs /DeviceRGB setcolorspace 0.56 0.00 0.56 setcolor fill gr
+
+% Fill with pattern pen color
+gs /DeviceRGB setcolorspace 0.56 0.00 0.56 P1 setpattern fill gr
+
+gs col21 s gr
+% Polyline
+n 9000 -1200 m 10800 -1200 l 10800 -300 l 9000 -300 l
+ cp
+% Fill with pattern background color
+gs /DeviceRGB setcolorspace 0.56 0.00 0.56 setcolor fill gr
+
+% Fill with pattern pen color
+gs /DeviceRGB setcolorspace 0.56 0.00 0.56 P1 setpattern fill gr
+
+gs col21 s gr
+% Polyline
+n 4200 -1200 m 9000 -1200 l 9000 -300 l 4200 -300 l
+ cp gs col7 1.00 shd ef gr gs col21 s gr
+% Polyline
+n 13200 1800 m 13800 1800 l 13800 3600 l 13200 3600 l
+ cp gs col7 1.00 shd ef gr gs col18 s gr
+% Polyline
+n 13800 4800 m 14400 4800 l 14400 6600 l 13800 6600 l
+ cp gs col7 1.00 shd ef gr gs col18 s gr
+% Polyline
+n 9000 6000 m 10800 6000 l 10800 6900 l 9000 6900 l
+ cp
+% Fill with pattern background color
+gs /DeviceRGB setcolorspace 0.00 0.00 0.56 setcolor fill gr
+
+% Fill with pattern pen color
+gs /DeviceRGB setcolorspace 0.00 0.00 0.56 P1 setpattern fill gr
+
+gs col8 s gr
+% Polyline
+n 4200 6000 m 9000 6000 l 9000 6900 l 4200 6900 l
+ cp gs col7 1.00 shd ef gr gs col8 s gr
+% Polyline
+n 11700 -1200 m 12600 -1200 l 12600 8700 l 11700 8700 l
+ cp gs col7 1.00 shd ef gr gs col18 s gr
+% Polyline
+n 12600 -1200 m 14400 -1200 l 14400 600 l 12600 600 l
+ cp gs col18 1.00 shd ef gr gs col18 s gr
+% here ends figure;
+%
+% here starts figure with depth 50
+/Times-Bold ff 400.00 scf sf
+6600 8400 m
+gs 1 -1 sc (Hurricane) dup sw pop 2 div neg 0 rm col0 sh gr
+/Times-Bold ff 300.00 scf sf
+9900 8400 m
+gs 1 -1 sc (Isobar) dup sw pop 2 div neg 0 rm col7 sh gr
+/Times-Bold ff 300.00 scf sf
+6900 4800 m
+gs 1 -1 sc (PyMauka) dup sw pop 2 div neg 0 rm col7 sh gr
+/Times-Bold ff 400.00 scf sf
+5100 4800 m
+gs 1 -1 sc (Mauka) dup sw pop 2 div neg 0 rm col21 sh gr
+/Times-Bold ff 400.00 scf sf
+5700 3000 m
+gs 1 -1 sc (Knik) dup sw pop 2 div neg 0 rm col21 sh gr
+/Times-Bold ff 300.00 scf sf
+7500 3000 m
+gs 1 -1 sc (PyKnik) dup sw pop 2 div neg 0 rm col7 sh gr
+/Times-Bold ff 400.00 scf sf
+5700 1200 m
+gs 1 -1 sc (Kite) dup sw pop 2 div neg 0 rm col21 sh gr
+/Times-Bold ff 300.00 scf sf
+7500 1200 m
+gs 1 -1 sc (PyKite) dup sw pop 2 div neg 0 rm col7 sh gr
+/Times-Bold ff 300.00 scf sf
+9900 -600 m
+gs 1 -1 sc (PyUnicorn) dup sw pop 2 div neg 0 rm col7 sh gr
+/Times-Bold ff 400.00 scf sf
+6600 -600 m
+gs 1 -1 sc (Unicorn) dup sw pop 2 div neg 0 rm col21 sh gr
+/Times-Bold ff 400.00 scf sf
+13650 2700 m
+gs 1 -1 sc 90.0 rot (Stratus) dup sw pop 2 div neg 0 rm col18 sh gr
+/Times-Bold ff 400.00 scf sf
+14250 5700 m
+gs 1 -1 sc 90.0 rot (Plugin) dup sw pop 2 div neg 0 rm col18 sh gr
+/Times-Bold ff 400.00 scf sf
+6600 6600 m
+gs 1 -1 sc (CRL Core) dup sw pop 2 div neg 0 rm col8 sh gr
+/Times-Bold ff 300.00 scf sf
+9975 6600 m
+gs 1 -1 sc (PyCRL) dup sw pop 2 div neg 0 rm col7 sh gr
+/Times-Bold ff 533.33 scf sf
+12375 3150 m
+gs 1 -1 sc 90.0 rot (Python) dup sw pop 2 div neg 0 rm col18 sh gr
+/Times-Bold ff 533.33 scf sf
+13650 -300 m
+gs 1 -1 sc 90.0 rot (cgt) dup sw pop 2 div neg 0 rm col7 sh gr
+% here ends figure;
+$F2psEnd
+rs
+end
+showpage
+%%Trailer
+%EOF
diff --git a/documentation/UsersGuide/images/Coriolis-Soft-Schema.fig b/documentation/UsersGuide/images/Coriolis-Soft-Schema.fig
new file mode 100644
index 00000000..c145d8a1
--- /dev/null
+++ b/documentation/UsersGuide/images/Coriolis-Soft-Schema.fig
@@ -0,0 +1,131 @@
+#FIG 3.2 Produced by xfig version 3.2.5a
+Landscape
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+6 4125 7725 10875 8775
+2 2 0 2 0 7 60 -1 20 0.000 0 0 -1 0 0 5
+ 4200 7800 9000 7800 9000 8700 4200 8700 4200 7800
+2 2 0 2 0 7 60 -1 0 0.000 0 0 -1 0 0 5
+ 9000 7800 10800 7800 10800 8700 9000 8700 9000 7800
+4 1 0 50 -1 2 24 0.0000 4 270 1815 6600 8400 Hurricane\001
+4 1 7 50 -1 2 18 0.0000 4 210 840 9900 8400 Isobar\001
+-6
+6 4125 4125 7875 5175
+2 2 0 2 21 7 60 -1 20 0.000 0 0 -1 0 0 5
+ 4200 4200 6000 4200 6000 5100 4200 5100 4200 4200
+2 2 0 2 21 21 60 -1 41 0.000 0 0 -1 0 0 5
+ 6000 4200 7800 4200 7800 5100 6000 5100 6000 4200
+4 1 7 50 -1 2 18 0.0000 4 270 1245 6900 4800 PyMauka\001
+4 1 21 50 -1 2 24 0.0000 4 270 1260 5100 4800 Mauka\001
+-6
+6 4725 2325 8475 3375
+2 2 0 2 21 7 60 -1 20 0.000 0 0 -1 0 0 5
+ 4800 2400 6600 2400 6600 3300 4800 3300 4800 2400
+2 2 0 2 21 21 60 -1 41 0.000 0 0 -1 0 0 5
+ 6600 2400 8400 2400 8400 3300 6600 3300 6600 2400
+4 1 21 50 -1 2 24 0.0000 4 270 885 5700 3000 Knik\001
+4 1 7 50 -1 2 18 0.0000 4 270 990 7500 3000 PyKnik\001
+-6
+6 4725 525 8475 1575
+2 2 0 2 21 7 60 -1 20 0.000 0 0 -1 0 0 5
+ 4800 600 6600 600 6600 1500 4800 1500 4800 600
+2 2 0 2 21 21 60 -1 41 0.000 0 0 -1 0 0 5
+ 6600 600 8400 600 8400 1500 6600 1500 6600 600
+4 1 21 50 -1 2 24 0.0000 4 270 750 5700 1200 Kite\001
+4 1 7 50 -1 2 18 0.0000 4 270 900 7500 1200 PyKite\001
+-6
+6 4125 -1275 10875 -225
+2 2 0 2 21 21 60 -1 41 0.000 0 0 -1 0 0 5
+ 9000 -1200 10800 -1200 10800 -300 9000 -300 9000 -1200
+2 2 0 2 21 7 60 -1 20 0.000 0 0 -1 0 0 5
+ 4200 -1200 9000 -1200 9000 -300 4200 -300 4200 -1200
+4 1 7 50 -1 2 18 0.0000 4 270 1395 9900 -600 PyUnicorn\001
+4 1 21 50 -1 2 24 0.0000 4 270 1440 6600 -600 Unicorn\001
+-6
+6 13125 1725 13875 3675
+2 2 0 2 18 7 60 -1 20 0.000 0 0 -1 0 0 5
+ 13200 1800 13800 1800 13800 3600 13200 3600 13200 1800
+4 1 18 50 -1 2 24 1.5708 4 270 1275 13650 2700 Stratus\001
+-6
+6 13725 4725 14475 6675
+2 2 0 2 18 7 60 -1 20 0.000 0 0 -1 0 0 5
+ 13800 4800 14400 4800 14400 6600 13800 6600 13800 4800
+4 1 18 50 -1 2 24 1.5708 4 360 1155 14250 5700 Plugin\001
+-6
+2 2 0 2 8 8 60 -1 41 0.000 0 0 -1 0 0 5
+ 9000 6000 10800 6000 10800 6900 9000 6900 9000 6000
+2 2 0 2 8 7 60 -1 20 0.000 0 0 -1 0 0 5
+ 4200 6000 9000 6000 9000 6900 4200 6900 4200 6000
+2 1 0 2 21 7 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 4500 4200 4500 -300
+2 1 0 2 21 7 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 5100 600 5100 -300
+2 1 0 2 0 7 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 4950 7800 4950 3300
+2 1 0 2 0 7 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 5100 7800 5100 1500
+2 1 0 2 8 7 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 5400 6000 5400 5100
+2 1 0 2 8 7 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 5550 6000 5550 3300
+2 1 0 2 8 7 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 5700 6000 5700 1500
+2 1 0 2 8 7 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 5850 6000 5850 -300
+2 1 0 2 0 7 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 4800 7800 4800 5100
+2 1 0 2 0 7 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 4650 7800 4650 6900
+2 2 0 2 18 7 60 -1 20 0.000 0 0 -1 0 0 5
+ 11700 -1200 12600 -1200 12600 8700 11700 8700 11700 -1200
+2 1 0 2 18 5 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 10800 8250 11700 8250
+2 1 0 2 18 5 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 10800 6450 11700 6450
+2 1 0 2 18 5 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 7800 4650 11700 4650
+2 1 0 2 18 5 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 8400 2850 11700 2850
+2 1 0 2 18 5 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 8400 1050 11700 1050
+2 1 0 2 18 5 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 10800 -750 11700 -750
+2 1 0 2 18 5 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 12600 5700 13800 5700
+2 1 0 2 18 5 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 12600 2700 13200 2700
+2 2 0 2 18 18 60 -1 20 0.000 0 0 -1 0 0 5
+ 12600 -1200 14400 -1200 14400 600 12600 600 12600 -1200
+2 1 0 2 18 5 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 13500 1800 13500 600
+2 1 0 2 18 5 70 -1 -1 0.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 14100 4800 14100 600
+4 1 8 50 -1 2 24 0.0000 4 270 1845 6600 6600 CRL Core\001
+4 1 7 50 -1 2 18 0.0000 4 270 975 9975 6600 PyCRL\001
+4 1 18 50 -1 2 32 1.5708 4 465 1650 12375 3150 Python\001
+4 1 7 50 -1 2 32 1.5708 4 450 690 13650 -300 cgt\001
diff --git a/documentation/UsersGuide/images/Coriolis-Soft-Schema.pdf b/documentation/UsersGuide/images/Coriolis-Soft-Schema.pdf
new file mode 100644
index 00000000..e8cc3f3b
Binary files /dev/null and b/documentation/UsersGuide/images/Coriolis-Soft-Schema.pdf differ
diff --git a/documentation/UsersGuide/images/Coriolis-Soft-Schema.png b/documentation/UsersGuide/images/Coriolis-Soft-Schema.png
new file mode 100644
index 00000000..dd128ec6
Binary files /dev/null and b/documentation/UsersGuide/images/Coriolis-Soft-Schema.png differ
diff --git a/documentation/examples/AM2901/design.py b/documentation/examples/AM2901/design.py
index 7ee53f77..1405d2ec 100755
--- a/documentation/examples/AM2901/design.py
+++ b/documentation/examples/AM2901/design.py
@@ -10,6 +10,8 @@ try:
from Hurricane import DbU
from Hurricane import UpdateSession
from Hurricane import Breakpoint
+ from Hurricane import Transformation
+ from Hurricane import Instance
import Viewer
import CRL
from helpers import ErrorMessage
@@ -37,7 +39,7 @@ except Exception, e:
def checkForUnplaceds ( cell ):
unplaceds = []
for instance in cell.getInstances():
- if instance.getPlacementStatus() == Hurricane.PlacementStatusUNPLACED:
+ if instance.getPlacementStatus() == Instance.PlacementStatus.UNPLACED:
unplaceds += [ instance ]
if unplaceds:
message = [ 'Some instances are still unplaceds:' ]
@@ -125,8 +127,8 @@ def ScriptMain ( cell=None ):
instanceCoeur = amd2901.getInstance( 'core' )
instanceCoeur.setTransformation(Hurricane.Transformation( (chipSide-coreSide)/2
, (chipSide-coreSide)/2
- , Hurricane.OrientationID ) )
- instanceCoeur.setPlacementStatus( Hurricane.PlacementStatusPLACED )
+ , Transformation.Orientation.ID ) )
+ instanceCoeur.setPlacementStatus( Instance.PlacementStatus.PLACED )
# Placing Pads
southPads = [ 'p_a3' , 'p_a2', 'p_a1', 'p_r0', 'p_vddick0', 'p_vssick0', 'p_a0' , 'p_i6', 'p_i8' , 'p_i7' , 'p_r3' ]
@@ -144,27 +146,27 @@ def ScriptMain ( cell=None ):
if key == 'south' :
xpad = abutmentBoxChip.getXMin() + padHeight + ipad*(padWidth)
ypad = abutmentBoxChip.getYMin() + padHeight
- pad.setTransformation( Hurricane.Transformation( xpad, ypad, Hurricane.OrientationMY) )
+ pad.setTransformation( Hurricane.Transformation( xpad, ypad, Transformation.Orientation.MY) )
# east
if key == 'east' :
xpad = abutmentBoxChip.getXMax() - padHeight
ypad = padHeight + padWidth + ipad*(padWidth)
- pad.setTransformation( Hurricane.Transformation( xpad, ypad, Hurricane.OrientationR3) )
+ pad.setTransformation( Hurricane.Transformation( xpad, ypad, Transformation.Orientation.R3) )
# north
if key == 'north' :
xpad = padHeight + ipad*(padWidth)
ypad = abutmentBoxChip.getYMax() - padHeight
- pad.setTransformation( Hurricane.Transformation( xpad, ypad, Hurricane.OrientationID) )
+ pad.setTransformation( Hurricane.Transformation( xpad, ypad, Transformation.Orientation.ID) )
# west
if key == 'west' :
xpad = padHeight
ypad = padHeight + ipad*(padWidth)
- pad.setTransformation( Hurricane.Transformation( xpad, ypad, Hurricane.OrientationR1) )
+ pad.setTransformation( Hurricane.Transformation( xpad, ypad, Transformation.Orientation.R1) )
- pad.setPlacementStatus( Hurricane.PlacementStatusPLACED )
+ pad.setPlacementStatus( Instance.PlacementStatus.PLACED )
except ErrorMessage, e:
print e; errorCode = e.code
diff --git a/hurricane/src/isobar/CMakeLists.txt b/hurricane/src/isobar/CMakeLists.txt
index af04e9ae..1a2e22c7 100644
--- a/hurricane/src/isobar/CMakeLists.txt
+++ b/hurricane/src/isobar/CMakeLists.txt
@@ -20,6 +20,7 @@
PyHorizontal.cpp
PyHurricane.cpp
PyHyperNet.cpp
+ PyPlacementStatus.cpp
PyInstance.cpp
PyInstanceCollection.cpp
PyMaterial.cpp
@@ -37,6 +38,8 @@
PyViaLayerCollection.cpp
PyLibrary.cpp
PyNet.cpp
+ PyNetType.cpp
+ PyNetDirection.cpp
PyNetCollection.cpp
PyNetExternalComponents.cpp
PyOccurrence.cpp
@@ -46,6 +49,8 @@
PyPad.cpp
PyPath.cpp
PyPin.cpp
+ PyPinPlacementStatus.cpp
+ PyPinDirection.cpp
PyPinCollection.cpp
PyPlug.cpp
PyPlugCollection.cpp
@@ -57,6 +62,7 @@
PySegmentCollection.cpp
PyTechnology.cpp
PyTransformation.cpp
+ PyOrientation.cpp
PyDbU.cpp
PyUpdateSession.cpp
PyVertical.cpp
@@ -76,6 +82,7 @@
hurricane/isobar/PyHorizontal.h
hurricane/isobar/PyHurricane.h
hurricane/isobar/PyHyperNet.h
+ hurricane/isobar/PyPlacementStatus.h
hurricane/isobar/PyInstance.h
hurricane/isobar/PyInstanceCollection.h
hurricane/isobar/PyMaterial.h
@@ -93,6 +100,8 @@
hurricane/isobar/PyViaLayer.h
hurricane/isobar/PyLibrary.h
hurricane/isobar/PyNet.h
+ hurricane/isobar/PyNetType.h
+ hurricane/isobar/PyNetDirection.h
hurricane/isobar/PyNetCollection.h
hurricane/isobar/PyNetExternalComponents.h
hurricane/isobar/PyOccurrence.h
@@ -102,6 +111,8 @@
hurricane/isobar/PyPad.h
hurricane/isobar/PyPath.h
hurricane/isobar/PyPin.h
+ hurricane/isobar/PyPinPlacementStatus.h
+ hurricane/isobar/PyPinDirection.h
hurricane/isobar/PyPinCollection.h
hurricane/isobar/PyPlug.h
hurricane/isobar/PyPlugCollection.h
@@ -113,6 +124,7 @@
hurricane/isobar/PySegmentCollection.h
hurricane/isobar/PyTechnology.h
hurricane/isobar/PyTransformation.h
+ hurricane/isobar/PyOrientation.h
hurricane/isobar/PyDbU.h
hurricane/isobar/PyUpdateSession.h
hurricane/isobar/PyVertical.h
diff --git a/hurricane/src/isobar/PyBasicLayer.cpp b/hurricane/src/isobar/PyBasicLayer.cpp
index 80ac60e5..aee67189 100644
--- a/hurricane/src/isobar/PyBasicLayer.cpp
+++ b/hurricane/src/isobar/PyBasicLayer.cpp
@@ -1,36 +1,7 @@
-
// -*- C++ -*-
//
-// This file is part of the Coriolis Project.
-// Copyright (C) Laboratoire LIP6 - Departement ASIM
-// Universite Pierre et Marie Curie
-//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2008-2014, All Rights Reserved
//
// +-----------------------------------------------------------------+
// | C O R I O L I S |
diff --git a/hurricane/src/isobar/PyBox.cpp b/hurricane/src/isobar/PyBox.cpp
index 75f6a591..a1c3a465 100644
--- a/hurricane/src/isobar/PyBox.cpp
+++ b/hurricane/src/isobar/PyBox.cpp
@@ -14,8 +14,6 @@
// +-----------------------------------------------------------------+
-
-
#include "hurricane/isobar/PyPoint.h"
#include "hurricane/isobar/PyBox.h"
@@ -58,6 +56,59 @@ extern "C" {
// Standart Destroy (Attribute).
DirectDestroyAttribute(PyBox_destroy, PyBox)
+
+
+ // ---------------------------------------------------------------
+ // Class Method : "PyBox_NEW ()"
+
+ static PyObject* PyBox_NEW (PyObject *module, PyObject *args) {
+ trace << "PyBox_NEW()" << endl;
+
+ Box* box = NULL;
+ PyBox* pyBox = NULL;
+
+ HTRY
+ PyObject* arg0;
+ PyObject* arg1;
+ PyObject* arg2;
+ PyObject* arg3;
+ __cs.init ("Box.Box");
+
+ if (! PyArg_ParseTuple(args,"|O&O&O&O&:Box.Box",
+ Converter, &arg0,
+ Converter, &arg1,
+ Converter, &arg2,
+ Converter, &arg3)) {
+ return NULL;
+ }
+
+ if (__cs.getObjectIds() == NO_ARG) { box = new Box (); }
+ else if ( __cs.getObjectIds() == POINT_ARG ) { box = new Box ( *PYPOINT_O(arg0) ); }
+ else if ( __cs.getObjectIds() == BOX_ARG ) { box = new Box ( *PYBOX_O(arg0) ); }
+ else if ( __cs.getObjectIds() == POINTS2_ARG ) { box = new Box ( *PYPOINT_O(arg0) , *PYPOINT_O(arg1) ); }
+ else if ( __cs.getObjectIds() == INTS2_ARG ) { box = new Box ( PyInt_AsLong(arg0) , PyInt_AsLong(arg1) ); }
+ else if ( __cs.getObjectIds() == INTS4_ARG ) {
+ box = new Box ( PyInt_AsLong(arg0), PyInt_AsLong(arg1), PyInt_AsLong(arg2) , PyInt_AsLong(arg3) );
+ } else {
+ PyErr_SetString(ConstructorError, "invalid number of parameters for Box constructor." );
+ return NULL;
+ }
+
+ pyBox = PyObject_NEW(PyBox, &PyTypeBox);
+ if (pyBox == NULL) return NULL;
+
+ pyBox->_object = box;
+ HCATCH
+
+ return ( (PyObject*)pyBox );
+ }
+
+
+ static int PyBox_Init ( PyBox* self, PyObject* args, PyObject* kwargs )
+ {
+ trace << "PyBox_Init(): " << (void*)self << endl;
+ return 0;
+ }
static PyObject* PyBox_getCenter ( PyBox *self ) {
@@ -370,7 +421,8 @@ extern "C" {
DirectDeleteMethod(PyBox_DeAlloc,PyBox)
- PyTypeObjectLinkPyType(Box)
+ PyTypeObjectLinkPyTypeNewInit(Box)
+//PyTypeObjectLinkPyType(Box)
#else // End of Python Module Code Part.
@@ -378,52 +430,6 @@ extern "C" {
// x=================================================================x
// | "PyBox" Shared Library Code Part |
// x=================================================================x
-
-
- // ---------------------------------------------------------------
- // Attribute Method : "PyBox_create ()"
-
- PyObject* PyBox_create (PyObject *module, PyObject *args) {
- trace << "PyBox_create()" << endl;
-
- Box* box = NULL;
- PyBox* pyBox = NULL;
-
- HTRY
- PyObject* arg0;
- PyObject* arg1;
- PyObject* arg2;
- PyObject* arg3;
- __cs.init ("Box.create");
-
- if (! PyArg_ParseTuple(args,"|O&O&O&O&:Box.create",
- Converter, &arg0,
- Converter, &arg1,
- Converter, &arg2,
- Converter, &arg3)) {
- return NULL;
- }
-
- if (__cs.getObjectIds() == NO_ARG) { box = new Box (); }
- else if ( __cs.getObjectIds() == POINT_ARG ) { box = new Box ( *PYPOINT_O(arg0) ); }
- else if ( __cs.getObjectIds() == BOX_ARG ) { box = new Box ( *PYBOX_O(arg0) ); }
- else if ( __cs.getObjectIds() == POINTS2_ARG ) { box = new Box ( *PYPOINT_O(arg0) , *PYPOINT_O(arg1) ); }
- else if ( __cs.getObjectIds() == INTS2_ARG ) { box = new Box ( PyInt_AsLong(arg0) , PyInt_AsLong(arg1) ); }
- else if ( __cs.getObjectIds() == INTS4_ARG ) {
- box = new Box ( PyInt_AsLong(arg0), PyInt_AsLong(arg1), PyInt_AsLong(arg2) , PyInt_AsLong(arg3) );
- } else {
- PyErr_SetString(ConstructorError, "invalid number of parameters for Box constructor." );
- return NULL;
- }
-
- pyBox = PyObject_NEW(PyBox, &PyTypeBox);
- if (pyBox == NULL) return NULL;
-
- pyBox->_object = box;
- HCATCH
-
- return ( (PyObject*)pyBox );
- }
diff --git a/hurricane/src/isobar/PyCell.cpp b/hurricane/src/isobar/PyCell.cpp
index 13347137..2085db15 100644
--- a/hurricane/src/isobar/PyCell.cpp
+++ b/hurricane/src/isobar/PyCell.cpp
@@ -1,17 +1,16 @@
-
// -*- C++ -*-
//
// This file is part of the Coriolis Software.
-// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved
+// Copyright (c) UPMC 2006-2014, All Rights Reserved
//
// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Jean-Paul CHAPUT |
-// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Module : "./PyCell.cpp" |
+// | C++ Module : "./PyCell.cpp" |
// +-----------------------------------------------------------------+
@@ -61,6 +60,29 @@ extern "C" {
// Standart Delete (Attribute).
DBoDestroyAttribute(PyCell_destroy,PyCell)
+
+ // ---------------------------------------------------------------
+ // Attribute Method : "PyCell_create ()"
+
+ PyObject* PyCell_create ( PyObject*, PyObject *args ) {
+ trace << "PyCell_create()" << endl;
+
+ char* name = NULL;
+ PyLibrary* pyLibrary = NULL;
+ Cell* cell = NULL;
+
+ HTRY
+ if (PyArg_ParseTuple(args,"O!s:Cell.create", &PyTypeLibrary, &pyLibrary, &name)) {
+ cell = Cell::create(PYLIBRARY_O(pyLibrary), Name(name));
+ } else {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Cell constructor.");
+ return NULL;
+ }
+ HCATCH
+
+ return PyCell_Link(cell);
+ }
+
// ---------------------------------------------------------------
// Attribute Method : "PyCell_getLibrary ()"
@@ -642,7 +664,9 @@ extern "C" {
// PyCell Attribute Method table.
PyMethodDef PyCell_Methods[] =
- { { "getLibrary" , (PyCFunction)PyCell_getLibrary , METH_NOARGS , "Returns the library owning the cell." }
+ { { "create" , (PyCFunction)PyCell_create , METH_VARARGS|METH_STATIC
+ , "Create a new cell." }
+ , { "getLibrary" , (PyCFunction)PyCell_getLibrary , METH_NOARGS , "Returns the library owning the cell." }
, { "getName" , (PyCFunction)PyCell_getName , METH_NOARGS , "Returns the name of the cell." }
, { "getInstance" , (PyCFunction)PyCell_getInstance , METH_VARARGS, "Returns the instance of name if it exists, else NULL." }
, { "getInstances" , (PyCFunction)PyCell_getInstances , METH_NOARGS , "Returns the locator of the collection of all instances called by the cell." } // getInstances
@@ -693,33 +717,8 @@ extern "C" {
// | "PyCell" Shared Library Code Part |
// x=================================================================x
- // ---------------------------------------------------------------
- // Attribute Method : "PyCell_create ()"
- PyObject* PyCell_create ( PyObject *module, PyObject *args ) {
- trace << "PyCell_create()" << endl;
-
- char* name = NULL;
- PyLibrary* pyLibrary = NULL;
- Cell* cell = NULL;
-
- HTRY
- if (PyArg_ParseTuple(args,"O!s:Cell.create", &PyTypeLibrary, &pyLibrary, &name)) {
- cell = Cell::create(PYLIBRARY_O(pyLibrary), Name(name));
- } else {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Cell constructor.");
- return NULL;
- }
- HCATCH
-
- return PyCell_Link(cell);
- }
-
// Link/Creation Method.
DBoLinkCreateMethod(Cell)
-
-
- // ---------------------------------------------------------------
- // PyCell Object Definitions.
PyTypeInheritedObjectDefinitions(Cell, Entity)
diff --git a/hurricane/src/isobar/PyContact.cpp b/hurricane/src/isobar/PyContact.cpp
index d67c919a..f24a0bd4 100644
--- a/hurricane/src/isobar/PyContact.cpp
+++ b/hurricane/src/isobar/PyContact.cpp
@@ -61,58 +61,9 @@ extern "C" {
// Standart destroy (Attribute).
DBoDestroyAttribute(PyContact_destroy, PyContact)
-
-
- static PyObject* PyContact_translate ( PyContact *self, PyObject* args ) {
- trace << "PyContact_translate ()" << endl;
-
- HTRY
- METHOD_HEAD ( "Contact.translate()" )
- DbU::Unit dx=0, dy=0;
- if (PyArg_ParseTuple(args,"ll:Contact.translate", &dx, &dy)) {
- contact->translate(dx, dy);
- } else {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Contact.translate()" );
- return NULL;
- }
- HCATCH
-
- Py_RETURN_NONE;
- }
-
-
- PyMethodDef PyContact_Methods[] =
- { { "destroy" , (PyCFunction)PyContact_destroy , METH_NOARGS
- , "Destroy associated hurricane object, the python object remains." }
- , { "getAnchorHook" , (PyCFunction)PyContact_getAnchorHook , METH_NOARGS , "Return the contact anchor hook." }
- , { "getWidth" , (PyCFunction)PyContact_getWidth , METH_NOARGS , "Return the contact width." }
- , { "getHalfWidth" , (PyCFunction)PyContact_getHalfWidth , METH_NOARGS , "Return the contact half width." }
- , { "getHeight" , (PyCFunction)PyContact_getHeight , METH_NOARGS , "Return the contact height." }
- , { "getHalfHeight" , (PyCFunction)PyContact_getHalfHeight , METH_NOARGS , "Return the contact half height." }
- , { "getDx" , (PyCFunction)PyContact_getDx , METH_NOARGS , "Return the contact dx value." }
- , { "getDy" , (PyCFunction)PyContact_getDy , METH_NOARGS , "Return the contact dy value." }
- , { "translate" , (PyCFunction)PyContact_translate , METH_VARARGS, "Translates the Contact of dx and dy." }
- , { "setX" , (PyCFunction)PyContact_setX , METH_VARARGS, "Sets the contact X value." }
- , { "setY" , (PyCFunction)PyContact_setY , METH_VARARGS, "Sets the contact Y value." }
- , { "setDx" , (PyCFunction)PyContact_setDx , METH_VARARGS, "Sets the contact dx value." }
- , { "setDy" , (PyCFunction)PyContact_setDy , METH_VARARGS, "Sets the contact dy value." }
- , {NULL, NULL, 0, NULL} /* sentinel */
- };
-
-
- DBoDeleteMethod(Contact)
- PyTypeObjectLinkPyType(Contact)
-
-
-#else // End of Python Module Code Part.
-
-
-// +=================================================================+
-// | "PyContact" Shared Library Code Part |
-// +=================================================================+
- PyObject* PyContact_create ( PyObject *module, PyObject *args ) {
+ static PyObject* PyContact_create ( PyObject*, PyObject *args ) {
trace << "PyContact_create()" << endl;
Contact* contact = NULL;
@@ -145,6 +96,57 @@ extern "C" {
}
+ static PyObject* PyContact_translate ( PyContact *self, PyObject* args ) {
+ trace << "PyContact_translate ()" << endl;
+
+ HTRY
+ METHOD_HEAD ( "Contact.translate()" )
+ DbU::Unit dx=0, dy=0;
+ if (PyArg_ParseTuple(args,"ll:Contact.translate", &dx, &dy)) {
+ contact->translate(dx, dy);
+ } else {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Contact.translate()" );
+ return NULL;
+ }
+ HCATCH
+
+ Py_RETURN_NONE;
+ }
+
+
+ PyMethodDef PyContact_Methods[] =
+ { { "create" , (PyCFunction)PyContact_create , METH_VARARGS|METH_STATIC
+ , "Create a new Contact." }
+ , { "destroy" , (PyCFunction)PyContact_destroy , METH_NOARGS
+ , "Destroy associated hurricane object, the python object remains." }
+ , { "getAnchorHook" , (PyCFunction)PyContact_getAnchorHook , METH_NOARGS , "Return the contact anchor hook." }
+ , { "getWidth" , (PyCFunction)PyContact_getWidth , METH_NOARGS , "Return the contact width." }
+ , { "getHalfWidth" , (PyCFunction)PyContact_getHalfWidth , METH_NOARGS , "Return the contact half width." }
+ , { "getHeight" , (PyCFunction)PyContact_getHeight , METH_NOARGS , "Return the contact height." }
+ , { "getHalfHeight" , (PyCFunction)PyContact_getHalfHeight , METH_NOARGS , "Return the contact half height." }
+ , { "getDx" , (PyCFunction)PyContact_getDx , METH_NOARGS , "Return the contact dx value." }
+ , { "getDy" , (PyCFunction)PyContact_getDy , METH_NOARGS , "Return the contact dy value." }
+ , { "translate" , (PyCFunction)PyContact_translate , METH_VARARGS, "Translates the Contact of dx and dy." }
+ , { "setX" , (PyCFunction)PyContact_setX , METH_VARARGS, "Sets the contact X value." }
+ , { "setY" , (PyCFunction)PyContact_setY , METH_VARARGS, "Sets the contact Y value." }
+ , { "setDx" , (PyCFunction)PyContact_setDx , METH_VARARGS, "Sets the contact dx value." }
+ , { "setDy" , (PyCFunction)PyContact_setDy , METH_VARARGS, "Sets the contact dy value." }
+ , {NULL, NULL, 0, NULL} /* sentinel */
+ };
+
+
+ DBoDeleteMethod(Contact)
+ PyTypeObjectLinkPyType(Contact)
+
+
+#else // End of Python Module Code Part.
+
+
+// +=================================================================+
+// | "PyContact" Shared Library Code Part |
+// +=================================================================+
+
+
// Link/Creation Method.
DBoLinkCreateMethod(Contact)
diff --git a/hurricane/src/isobar/PyDataBase.cpp b/hurricane/src/isobar/PyDataBase.cpp
index 2382208f..366faca8 100644
--- a/hurricane/src/isobar/PyDataBase.cpp
+++ b/hurricane/src/isobar/PyDataBase.cpp
@@ -1,8 +1,7 @@
-
// -*- C++ -*-
//
// This file is part of the Coriolis Software.
-// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved
+// Copyright (c) UPMC 2008-2014, All Rights Reserved
//
// +-----------------------------------------------------------------+
// | C O R I O L I S |
@@ -38,18 +37,31 @@ extern "C" {
#if defined(__PYTHON_MODULE__)
- PyObject* PyDataBase_getDB ( PyObject* module ) {
+ static PyObject* PyDataBase_create ( PyObject* ) {
+ trace << "PyDataBase_create()" << endl;
+
+ DataBase* db = NULL;
+
+ HTRY
+ db = DataBase::create();
+ HCATCH
+
+ return PyDataBase_Link(db);
+ }
+
+
+ static PyObject* PyDataBase_getDB ( PyObject* ) {
trace << "PyDataBase_getDB()" << endl;
DataBase* db = NULL;
HTRY
- db = DataBase::getDB ();
- if ( db == NULL )
- PyErr_SetString ( HurricaneError, "DataBase has not been created yet" );
+ db = DataBase::getDB();
+ if (db == NULL)
+ PyErr_SetString( HurricaneError, "DataBase.getDB(): DataBase has not been created yet" );
HCATCH
- return PyDataBase_Link ( db );
+ return PyDataBase_Link( db );
}
@@ -94,7 +106,11 @@ extern "C" {
// PyDataBase Attribute Method table.
PyMethodDef PyDataBase_Methods[] =
- { { "getTechnology" , (PyCFunction)PyDataBase_getTechnology , METH_NOARGS, "Return the Technology" }
+ { { "create" , (PyCFunction)PyDataBase_create , METH_NOARGS|METH_STATIC
+ , "Create the DataBase (only the first call created it)" }
+ , { "getDB" , (PyCFunction)PyDataBase_getDB , METH_NOARGS|METH_STATIC
+ , "Get the DataBase" }
+ , { "getTechnology" , (PyCFunction)PyDataBase_getTechnology , METH_NOARGS, "Return the Technology" }
, { "getRootLibrary", (PyCFunction)PyDataBase_getRootLibrary, METH_NOARGS, "Return the root library" }
, { "destroy" , (PyCFunction)PyDataBase_destroy , METH_NOARGS
, "Destroy associated hurricane object The python object remains." }
@@ -113,23 +129,8 @@ extern "C" {
// +=================================================================+
- PyObject* PyDataBase_create ( PyObject *module ) {
- trace << "PyDataBase_create()" << endl;
-
- DataBase* db = NULL;
-
- HTRY
- db = DataBase::create ();
- HCATCH
-
- return PyDataBase_Link(db);
- }
-
-
// Link/Creation Method.
DBoLinkCreateMethod(DataBase)
-
-
PyTypeObjectDefinitions(DataBase)
#endif // End of Shared Library Code Part.
diff --git a/hurricane/src/isobar/PyHorizontal.cpp b/hurricane/src/isobar/PyHorizontal.cpp
index e2083510..60b8bb1a 100644
--- a/hurricane/src/isobar/PyHorizontal.cpp
+++ b/hurricane/src/isobar/PyHorizontal.cpp
@@ -1,18 +1,17 @@
-// x-----------------------------------------------------------------x
-// | |
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2007-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
-// | Author : Sophie BELLOEIL |
-// | E-mail : Sophie.Belloeil@asim.lip6.fr |
+// | Author : Sophie BELLOEIL |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Module : "./PyHorizontal.cpp" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
-
-
+// | C++ Module : "./PyHorizontal.cpp" |
+// +-----------------------------------------------------------------+
#include "hurricane/isobar/PyNet.h"
@@ -22,7 +21,6 @@
namespace Isobar {
-
using namespace Hurricane;
@@ -59,66 +57,10 @@ extern "C" {
DBoDestroyAttribute(PyHorizontal_destroy, PyHorizontal)
- // ---------------------------------------------------------------
- // Attribute Method : "PyHorizontal_translate ()"
-
- static PyObject* PyHorizontal_translate ( PyHorizontal *self, PyObject* args ) {
- trace << "PyHorizontal_translate ()" << endl;
-
- HTRY
- METHOD_HEAD ( "Horizontal.translate()" )
- DbU::Unit dx=0, dy=0;
- if (PyArg_ParseTuple(args,"ll:Horizontal.translate", &dx, &dy)) {
- horizontal->translate(dx, dy);
- } else {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Horizontal.translate()" );
- return NULL;
- }
- HCATCH
-
- Py_RETURN_NONE;
- }
-
-
- // ---------------------------------------------------------------
- // PyHorizontal Attribute Method table.
-
- PyMethodDef PyHorizontal_Methods[] =
- { { "getY" , (PyCFunction)PyHorizontal_getY , METH_NOARGS , "Get the segment Y position." }
- , { "getDxSource", (PyCFunction)PyHorizontal_getDxSource, METH_NOARGS , "Get the segment source X offset." }
- , { "getDxTarget", (PyCFunction)PyHorizontal_getDxTarget, METH_NOARGS , "Get the segment target X offset." }
- , { "setY" , (PyCFunction)PyHorizontal_setY , METH_VARARGS, "Modify the segment Y position." }
- , { "setDxSource", (PyCFunction)PyHorizontal_setDxSource, METH_VARARGS, "Modify the segment source X offset." }
- , { "setDxTarget", (PyCFunction)PyHorizontal_setDxTarget, METH_VARARGS, "Modify the segment target X offset." }
- , { "translate" , (PyCFunction)PyHorizontal_translate , METH_VARARGS, "Translates the Horizontal segment of dx and dy." }
- , { "destroy" , (PyCFunction)PyHorizontal_destroy , METH_NOARGS
- , "destroy associated hurricane object, the python object remains." }
- , {NULL, NULL, 0, NULL} /* sentinel */
- };
-
-
-
-
- // x-------------------------------------------------------------x
- // | "PyHorizontal" Object Methods |
- // x-------------------------------------------------------------x
-
-
- DBoDeleteMethod(Horizontal)
- PyTypeObjectLinkPyType(Horizontal)
-
-
-#else // End of Python Module Code Part.
-
-
-// x=================================================================x
-// | "PyHorizontal" Shared Library Code Part |
-// x=================================================================x
-
// ---------------------------------------------------------------
// Attribute Method : "PyHorizontal_create ()"
- PyObject* PyHorizontal_create ( PyObject *module, PyObject *args ) {
+ static PyObject* PyHorizontal_create ( PyObject*, PyObject *args ) {
trace << "PyHorizontal_create()" << endl;
PyObject* arg0;
@@ -206,6 +148,65 @@ extern "C" {
}
+ // ---------------------------------------------------------------
+ // Attribute Method : "PyHorizontal_translate ()"
+
+ static PyObject* PyHorizontal_translate ( PyHorizontal *self, PyObject* args ) {
+ trace << "PyHorizontal_translate ()" << endl;
+
+ HTRY
+ METHOD_HEAD ( "Horizontal.translate()" )
+ DbU::Unit dx=0, dy=0;
+ if (PyArg_ParseTuple(args,"ll:Horizontal.translate", &dx, &dy)) {
+ horizontal->translate(dx, dy);
+ } else {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Horizontal.translate()" );
+ return NULL;
+ }
+ HCATCH
+
+ Py_RETURN_NONE;
+ }
+
+
+ // ---------------------------------------------------------------
+ // PyHorizontal Attribute Method table.
+
+ PyMethodDef PyHorizontal_Methods[] =
+ { { "create" , (PyCFunction)PyHorizontal_create , METH_VARARGS|METH_STATIC
+ , "Create a new Horizontal." }
+ , { "getY" , (PyCFunction)PyHorizontal_getY , METH_NOARGS , "Get the segment Y position." }
+ , { "getDxSource", (PyCFunction)PyHorizontal_getDxSource, METH_NOARGS , "Get the segment source X offset." }
+ , { "getDxTarget", (PyCFunction)PyHorizontal_getDxTarget, METH_NOARGS , "Get the segment target X offset." }
+ , { "setY" , (PyCFunction)PyHorizontal_setY , METH_VARARGS, "Modify the segment Y position." }
+ , { "setDxSource", (PyCFunction)PyHorizontal_setDxSource, METH_VARARGS, "Modify the segment source X offset." }
+ , { "setDxTarget", (PyCFunction)PyHorizontal_setDxTarget, METH_VARARGS, "Modify the segment target X offset." }
+ , { "translate" , (PyCFunction)PyHorizontal_translate , METH_VARARGS, "Translates the Horizontal segment of dx and dy." }
+ , { "destroy" , (PyCFunction)PyHorizontal_destroy , METH_NOARGS
+ , "destroy associated hurricane object, the python object remains." }
+ , {NULL, NULL, 0, NULL} /* sentinel */
+ };
+
+
+
+
+ // x-------------------------------------------------------------x
+ // | "PyHorizontal" Object Methods |
+ // x-------------------------------------------------------------x
+
+
+ DBoDeleteMethod(Horizontal)
+ PyTypeObjectLinkPyType(Horizontal)
+
+
+#else // End of Python Module Code Part.
+
+
+// x=================================================================x
+// | "PyHorizontal" Shared Library Code Part |
+// x=================================================================x
+
+
// Link/Creation Method.
DBoLinkCreateMethod(Horizontal)
diff --git a/hurricane/src/isobar/PyHurricane.cpp b/hurricane/src/isobar/PyHurricane.cpp
index 0e28b9dd..67134736 100644
--- a/hurricane/src/isobar/PyHurricane.cpp
+++ b/hurricane/src/isobar/PyHurricane.cpp
@@ -1,4 +1,3 @@
-
// -*- C++ -*-
//
// This file is part of the Coriolis Software.
@@ -22,6 +21,7 @@
#include "hurricane/isobar/PyPoint.h"
#include "hurricane/isobar/PyBox.h"
#include "hurricane/isobar/PyTransformation.h"
+#include "hurricane/isobar/PyOrientation.h"
#include "hurricane/isobar/PyDataBase.h"
#include "hurricane/isobar/PyLibrary.h"
#include "hurricane/isobar/PyEntity.h"
@@ -41,12 +41,17 @@
#include "hurricane/isobar/PyRegularLayerCollection.h"
#include "hurricane/isobar/PyViaLayerCollection.h"
#include "hurricane/isobar/PyPin.h"
+#include "hurricane/isobar/PyPinPlacementStatus.h"
+#include "hurricane/isobar/PyPinDirection.h"
#include "hurricane/isobar/PyPinCollection.h"
+#include "hurricane/isobar/PyPlacementStatus.h"
#include "hurricane/isobar/PyInstance.h"
#include "hurricane/isobar/PyInstanceCollection.h"
#include "hurricane/isobar/PyReference.h"
#include "hurricane/isobar/PyReferenceCollection.h"
#include "hurricane/isobar/PyNet.h"
+#include "hurricane/isobar/PyNetType.h"
+#include "hurricane/isobar/PyNetDirection.h"
#include "hurricane/isobar/PyNetCollection.h"
#include "hurricane/isobar/PyNetExternalComponents.h"
#include "hurricane/isobar/PyHyperNet.h"
@@ -472,36 +477,16 @@ extern "C" {
}
static PyMethodDef PyHurricane_Methods[] =
- { { "trace" , PyCommons_trace , METH_VARARGS, "Switch on/off the trace mode (for debugging)." }
- , { "DbU_db" , PyDbU_fromDb , METH_VARARGS, "Converts an integer to DbU::Unit (no scale factor)." }
- , { "DbU_grid" , PyDbU_fromGrid , METH_VARARGS, "Converts a founder grid to DbU::Unit." }
- , { "DbU_lambda" , PyDbU_fromLambda , METH_VARARGS, "Converts a symbolic (lambda) to DbU::Unit." }
- , { "DbU_getDb" , PyDbU_toDb , METH_VARARGS, "Converts a DbU::Unit to an integer value (no scale factor)." }
- , { "DbU_getGrid" , PyDbU_toGrid , METH_VARARGS, "Converts a DbU::Unit to a to grid founder." }
- , { "DbU_getLambda" , PyDbU_toLambda , METH_VARARGS, "Converts a DbU::Unit to a symbolic value (to lambda)." }
- , { "DbU_getPhysical" , PyDbU_toPhysical , METH_VARARGS, "Converts a DbU::Unit to a physical value." }
- , { "DbU_getOnPhysicalGrid" , PyDbU_getOnPhysicalGrid , METH_VARARGS, "Adjusts a DbU::Unit to physical grid." }
- , { "Point" , PyPoint_create , METH_VARARGS, "Creates a new Point." }
- , { "Box" , PyBox_create , METH_VARARGS, "Creates a new Box." }
- , { "Transformation" , PyTransformation_create , METH_VARARGS, "Creates a new Transformation." }
- , { "DataBase" , (PyCFunction)PyDataBase_create , METH_NOARGS , "Creates the DataBase." }
- , { "getDB" , (PyCFunction)PyDataBase_getDB , METH_NOARGS , "Gets the current DataBase." }
- , { "getDataBase" , (PyCFunction)PyDataBase_getDB , METH_NOARGS , "Gets the current DataBase." }
- , { "Library" , (PyCFunction)PyLibrary_create , METH_VARARGS, "Creates a new Library." }
-// , { "getLibrary" , (PyCFunction)PyLibrary_getLibrary , METH_NOARGS , "Gets the current Library." }
- , { "Reference" , (PyCFunction)PyReference_create , METH_VARARGS, "Creates a new Reference." }
- , { "Cell" , (PyCFunction)PyCell_create , METH_VARARGS, "Creates a new Cell." }
- , { "Instance" , (PyCFunction)PyInstance_create , METH_VARARGS, "Creates a new Instance." }
- , { "Net" , (PyCFunction)PyNet_create , METH_VARARGS, "Creates a new Net." }
- , { "HyperNet" , (PyCFunction)PyHyperNet_create , METH_VARARGS, "Creates a new HyperNet." }
- , { "Horizontal" , (PyCFunction)PyHorizontal_create , METH_VARARGS, "Creates a new Horizontal." }
- , { "Vertical" , (PyCFunction)PyVertical_create , METH_VARARGS, "Creates a new Vertical." }
- , { "Contact" , (PyCFunction)PyContact_create , METH_VARARGS, "Creates a new Contact." }
- , { "Pin" , (PyCFunction)PyPin_create , METH_VARARGS, "Creates a new Pin." }
- , { "Pad" , (PyCFunction)PyPad_create , METH_VARARGS, "Creates a new Pad." }
- , { "Path" , (PyCFunction)PyPath_create , METH_VARARGS, "Creates a new Path." }
- , { "Occurrence" , (PyCFunction)PyOccurrence_create , METH_VARARGS, "Creates a new Occurrence." }
- , {NULL, NULL, 0, NULL} /* sentinel */
+ { { "trace" , PyCommons_trace , METH_VARARGS, "Switch on/off the trace mode (for debugging)." }
+ , { "DbU_db" , PyDbU_fromDb , METH_VARARGS, "Converts an integer to DbU::Unit (no scale factor)." }
+ , { "DbU_grid" , PyDbU_fromGrid , METH_VARARGS, "Converts a founder grid to DbU::Unit." }
+ , { "DbU_lambda" , PyDbU_fromLambda , METH_VARARGS, "Converts a symbolic (lambda) to DbU::Unit." }
+ , { "DbU_getDb" , PyDbU_toDb , METH_VARARGS, "Converts a DbU::Unit to an integer value (no scale factor)." }
+ , { "DbU_getGrid" , PyDbU_toGrid , METH_VARARGS, "Converts a DbU::Unit to a to grid founder." }
+ , { "DbU_getLambda" , PyDbU_toLambda , METH_VARARGS, "Converts a DbU::Unit to a symbolic value (to lambda)." }
+ , { "DbU_getPhysical" , PyDbU_toPhysical , METH_VARARGS, "Converts a DbU::Unit to a physical value." }
+ , { "DbU_getOnPhysicalGrid", PyDbU_getOnPhysicalGrid, METH_VARARGS, "Adjusts a DbU::Unit to physical grid." }
+ , {NULL, NULL, 0, NULL} /* sentinel */
};
@@ -516,6 +501,7 @@ extern "C" {
PyPoint_LinkPyType ();
PyBox_LinkPyType ();
PyTransformation_LinkPyType ();
+ PyOrientation_LinkPyType ();
PyDataBase_LinkPyType ();
PyTechnology_LinkPyType ();
PyLibrary_LinkPyType ();
@@ -540,6 +526,8 @@ extern "C" {
PyNetCollection_LinkPyType ();
PyNetExternalComponents_LinkPyType ();
PyCellCollection_LinkPyType ();
+ PyPinPlacementStatus_LinkPyType ();
+ PyPinDirection_LinkPyType ();
PyPinCollection_LinkPyType ();
PySegmentCollection_LinkPyType ();
PyOccurrenceCollection_LinkPyType ();
@@ -547,8 +535,11 @@ extern "C" {
PyReferenceCollection_LinkPyType ();
PyCell_LinkPyType ();
PyInstance_LinkPyType ();
+ PyPlacementStatus_LinkPyType ();
PyReference_LinkPyType ();
PyNet_LinkPyType ();
+ PyNetType_LinkPyType ();
+ PyNetDirection_LinkPyType ();
PyHyperNet_LinkPyType ();
PyHook_LinkPyType ();
PyHookCollection_LinkPyType ();
@@ -570,6 +561,7 @@ extern "C" {
PYTYPE_READY ( DbU )
PYTYPE_READY ( Box )
PYTYPE_READY ( Transformation )
+ PYTYPE_READY ( Orientation )
PYTYPE_READY ( DataBase )
PYTYPE_READY ( Technology )
PYTYPE_READY ( Library )
@@ -589,14 +581,19 @@ extern "C" {
PYTYPE_READY ( ViaLayerCollectionLocator )
PYTYPE_READY ( Path )
PYTYPE_READY ( Occurrence )
+ PYTYPE_READY ( PlacementStatus )
PYTYPE_READY ( InstanceCollection )
PYTYPE_READY ( InstanceCollectionLocator )
PYTYPE_READY ( PlugCollection )
PYTYPE_READY ( PlugCollectionLocator )
+ PYTYPE_READY ( NetType )
+ PYTYPE_READY ( NetDirection )
PYTYPE_READY ( NetCollection )
PYTYPE_READY ( NetCollectionLocator )
PYTYPE_READY ( CellCollection )
PYTYPE_READY ( CellCollectionLocator )
+ PYTYPE_READY ( PinPlacementStatus )
+ PYTYPE_READY ( PinDirection )
PYTYPE_READY ( PinCollection )
PYTYPE_READY ( PinCollectionLocator )
PYTYPE_READY ( SegmentCollection )
@@ -687,6 +684,7 @@ extern "C" {
__cs.addType ( "db" , &PyTypeDataBase , "" , false );
__cs.addType ( "techno" , &PyTypeTechnology , "" , false );
__cs.addType ( "transfo" , &PyTypeTransformation , "" , false );
+ __cs.addType ( "orient" , &PyTypeOrientation , "" , false );
__cs.addType ( "vert" , &PyTypeVertical , "" , false, "segment" );
__cs.addType ( "path" , &PyTypePath , "" , false );
__cs.addType ( "occur" , &PyTypeOccurrence , "" , false );
@@ -704,6 +702,29 @@ extern "C" {
Py_INCREF ( &PyTypeDbU );
PyModule_AddObject ( module, "DbU" , (PyObject*)&PyTypeDbU );
+ Py_INCREF ( &PyTypePoint );
+ PyModule_AddObject ( module, "Box" , (PyObject*)&PyTypeBox );
+ Py_INCREF ( &PyTypePoint );
+ PyModule_AddObject ( module, "Point" , (PyObject*)&PyTypePoint );
+ Py_INCREF ( &PyTypeTransformation );
+ PyModule_AddObject ( module, "Transformation" , (PyObject*)&PyTypeTransformation );
+ Py_INCREF ( &PyTypePath );
+ PyModule_AddObject ( module, "Path" , (PyObject*)&PyTypePath );
+ Py_INCREF ( &PyTypeOccurrence );
+ PyModule_AddObject ( module, "Occurrence" , (PyObject*)&PyTypeOccurrence );
+
+ Py_INCREF ( &PyTypeDataBase );
+ PyModule_AddObject ( module, "DataBase" , (PyObject*)&PyTypeDataBase );
+ Py_INCREF ( &PyTypeLibrary );
+ PyModule_AddObject ( module, "Library" , (PyObject*)&PyTypeLibrary );
+ Py_INCREF ( &PyTypeNet );
+ PyModule_AddObject ( module, "Net" , (PyObject*)&PyTypeNet );
+ Py_INCREF ( &PyTypeHyperNet );
+ PyModule_AddObject ( module, "HyperNet" , (PyObject*)&PyTypeHyperNet );
+ Py_INCREF ( &PyTypeInstance );
+ PyModule_AddObject ( module, "Cell" , (PyObject*)&PyTypeCell );
+ Py_INCREF ( &PyTypeInstance );
+ PyModule_AddObject ( module, "Instance" , (PyObject*)&PyTypeInstance );
Py_INCREF ( &PyTypeTechnology );
PyModule_AddObject ( module, "Technology" , (PyObject*)&PyTypeTechnology );
Py_INCREF ( &PyTypeLayer );
@@ -730,23 +751,27 @@ extern "C" {
PyModule_AddObject ( module, "Breakpoint" , (PyObject*)&PyTypeBreakpoint );
Py_INCREF ( &PyTypeQuery );
PyModule_AddObject ( module, "Query" , (PyObject*)&PyTypeQuery );
+ Py_INCREF ( &PyTypeReference );
+ PyModule_AddObject ( module, "Reference" , (PyObject*)&PyTypeReference );
Py_INCREF ( &PyTypeHook );
PyModule_AddObject ( module, "Hook" , (PyObject*)&PyTypeHook );
Py_INCREF ( &PyTypeHookCollection );
PyModule_AddObject ( module, "HookCollection" , (PyObject*)&PyTypeHookCollection );
+ Py_INCREF ( &PyTypePlug );
+ PyModule_AddObject ( module, "PyPlug" , (PyObject*)&PyTypePlug );
Py_INCREF ( &PyTypeRoutingPad );
PyModule_AddObject ( module, "RoutingPad" , (PyObject*)&PyTypeRoutingPad );
Py_INCREF ( &PyTypeVertical );
- PyModule_AddObject ( module, "PyVertical" , (PyObject*)&PyTypeVertical );
+ PyModule_AddObject ( module, "Vertical" , (PyObject*)&PyTypeVertical );
Py_INCREF ( &PyTypeHorizontal );
- PyModule_AddObject ( module, "PyHorizontal" , (PyObject*)&PyTypeHorizontal );
+ PyModule_AddObject ( module, "Horizontal" , (PyObject*)&PyTypeHorizontal );
Py_INCREF ( &PyTypeContact );
- PyModule_AddObject ( module, "PyContact" , (PyObject*)&PyTypeContact );
- Py_INCREF ( &PyTypePlug );
- PyModule_AddObject ( module, "PyPlug" , (PyObject*)&PyTypePlug );
+ PyModule_AddObject ( module, "Contact" , (PyObject*)&PyTypeContact );
+ Py_INCREF ( &PyTypePin );
+ PyModule_AddObject ( module, "Pin" , (PyObject*)&PyTypePin );
Py_INCREF ( &PyTypePad );
- PyModule_AddObject ( module, "PyPad" , (PyObject*)&PyTypePad );
+ PyModule_AddObject ( module, "Pad" , (PyObject*)&PyTypePad );
PyObject* dictionnary = PyModule_GetDict ( module );
@@ -760,16 +785,16 @@ extern "C" {
PyDict_SetItemString ( dictionnary, "ProxyError" , ProxyError );
PyDict_SetItemString ( dictionnary, "HurricaneError" , HurricaneError );
- DbULoadConstants ( dictionnary );
- TransformationLoadConstants( dictionnary );
- NetLoadConstants ( dictionnary );
- InstanceLoadConstants ( dictionnary );
- PinLoadConstants ( dictionnary );
+ DbULoadConstants( dictionnary );
PyDbU_postModuleInit();
+ PyTransformation_postModuleInit();
PyLayer_postModuleInit();
PyBasicLayer_postModuleInit();
+ PyPin_postModuleInit();
PyRoutingPad_postModuleInit();
+ PyNet_postModuleInit();
+ PyInstance_postModuleInit();
trace << "Hurricane.so loaded " << (void*)&typeid(string) << endl;
}
diff --git a/hurricane/src/isobar/PyHyperNet.cpp b/hurricane/src/isobar/PyHyperNet.cpp
index 51ff8fc2..18eb4008 100644
--- a/hurricane/src/isobar/PyHyperNet.cpp
+++ b/hurricane/src/isobar/PyHyperNet.cpp
@@ -1,14 +1,13 @@
-
// -*- C++ -*-
//
// This file is part of the Coriolis Software.
-// Copyright (c) UPMC/LIP6 2007-2013, All Rights Reserved
+// Copyright (c) UPMC 2007-2014, All Rights Reserved
//
// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
-// | Author : Jean-Paul CHAPUT |
+// | Author : Damien DUPUIS |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== |
// | C++ Module : "./PyHyperNet.cpp" |
@@ -19,7 +18,6 @@
#include "hurricane/isobar/PyCell.h"
#include "hurricane/isobar/PyOccurrence.h"
#include "hurricane/isobar/PyOccurrenceCollection.h"
-
using namespace Hurricane;
@@ -44,6 +42,31 @@ extern "C" {
DirectDestroyAttribute(PyHyperNet_destroy, PyHyperNet)
+ static PyObject* PyHyperNet_create ( PyObject*, PyObject *args ) {
+ trace << "PyHyperNet_create()" << endl;
+
+ HyperNet* hyperNet = NULL;
+ PyObject* arg0;
+
+ if (! ParseOneArg ( "HyperNet.create()", args, ":occur", &arg0 )) {
+ PyErr_SetString(ConstructorError, "invalid number of parameters for HyperNet constructor." );
+ return ( NULL );
+ }
+
+ hyperNet = new HyperNet ( *PYOCCURRENCE_O(arg0) );
+
+ PyHyperNet* pyHyperNet;
+ pyHyperNet = PyObject_NEW(PyHyperNet, &PyTypeHyperNet);
+ if (pyHyperNet == NULL) return NULL;
+
+ HTRY
+ pyHyperNet->_object = hyperNet;
+ HCATCH
+
+ return ( (PyObject*)pyHyperNet );
+ }
+
+
static PyObject* PyHyperNet_getNetOccurrences(PyHyperNet *self)
{
trace << "PyHyperNet_getNetOccurrences()" << endl;
@@ -106,7 +129,9 @@ extern "C" {
PyMethodDef PyHyperNet_Methods[] =
- { { "getCell" , (PyCFunction)PyHyperNet_getCell , METH_NOARGS , "Returns the hyperNet cell." }
+ { { "create" , (PyCFunction)PyHyperNet_create , METH_VARARGS|METH_STATIC
+ , "Create a new HyperNet." }
+ , { "getCell" , (PyCFunction)PyHyperNet_getCell , METH_NOARGS , "Returns the hyperNet cell." }
, { "isValid" , (PyCFunction)PyHyperNet_isValid , METH_NOARGS , "Returns trus if the HyperNet isValid." }
, { "getNetOccurrences" , (PyCFunction)PyHyperNet_getNetOccurrences , METH_NOARGS
, "Returns the collection of Net occurrences" }
@@ -122,7 +147,7 @@ extern "C" {
PyTypeObjectLinkPyType(HyperNet)
-#else // End of Python Module Code Part.
+#else // Python Module Code Part.
// +=================================================================+
@@ -130,36 +155,10 @@ extern "C" {
// +=================================================================+
- PyObject* PyHyperNet_create ( PyObject *module, PyObject *args ) {
- trace << "PyHyperNet_create()" << endl;
-
- HyperNet* hyperNet = NULL;
- PyObject* arg0;
-
- if (! ParseOneArg ( "HyperNet.create()", args, ":occur", &arg0 )) {
- PyErr_SetString(ConstructorError, "invalid number of parameters for HyperNet constructor." );
- return ( NULL );
- }
-
- hyperNet = new HyperNet ( *PYOCCURRENCE_O(arg0) );
-
- PyHyperNet* pyHyperNet;
- pyHyperNet = PyObject_NEW(PyHyperNet, &PyTypeHyperNet);
- if (pyHyperNet == NULL) return NULL;
-
- HTRY
- pyHyperNet->_object = hyperNet;
- HCATCH
-
- return ( (PyObject*)pyHyperNet );
- }
-
-
PyTypeObjectDefinitions(HyperNet)
-#endif // End of Shared Library Code Part.
-
+#endif // Shared Library Code Part.
} // extern "C".
diff --git a/hurricane/src/isobar/PyInstance.cpp b/hurricane/src/isobar/PyInstance.cpp
index d6e4d1ff..b016dcdc 100644
--- a/hurricane/src/isobar/PyInstance.cpp
+++ b/hurricane/src/isobar/PyInstance.cpp
@@ -1,22 +1,25 @@
-// x-----------------------------------------------------------------x
-// | |
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2006-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Jean-Paul CHAPUT |
-// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Module : "./PyInstance.cpp" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Module : "./PyInstance.cpp" |
+// +-----------------------------------------------------------------+
+
#include "hurricane/isobar/PyBox.h"
#include "hurricane/isobar/PyTransformation.h"
#include "hurricane/isobar/PyLibrary.h"
#include "hurricane/isobar/PyCell.h"
#include "hurricane/isobar/PyInstance.h"
+#include "hurricane/isobar/PyPlacementStatus.h"
#include "hurricane/isobar/PyNet.h"
#include "hurricane/isobar/PyPlug.h"
#include "hurricane/isobar/PyPlugCollection.h"
@@ -48,23 +51,6 @@ extern "C" {
#if defined(__PYTHON_MODULE__)
- // x-------------------------------------------------------------x
- // | Global Constants Loading |
- // x-------------------------------------------------------------x
-
-
- extern void InstanceLoadConstants ( PyObject* dictionnary )
- {
- PyObject* constant;
-
- LOAD_CONSTANT ( Instance::PlacementStatus::UNPLACED, "PlacementStatusUNPLACED" )
- LOAD_CONSTANT ( Instance::PlacementStatus::PLACED , "PlacementStatusPLACED" )
- LOAD_CONSTANT ( Instance::PlacementStatus::FIXED , "PlacementStatusFIXED" )
- }
-
-
-
-
// x-------------------------------------------------------------x
// | "PyInstance" Local Functions |
// x-------------------------------------------------------------x
@@ -93,18 +79,59 @@ extern "C" {
// Standart Accessors (Attributes).
-
// Standart destroy (Attribute).
DBoDestroyAttribute(PyInstance_destroy,PyInstance)
-
-
-
// ---------------------------------------------------------------
// Attribute Method : "PyInstance_getName ()"
GetNameMethod(Instance, instance)
+ // ---------------------------------------------------------------
+ // Attribute Method : "PyInstance_create ()"
+
+ PyObject* PyInstance_create ( PyObject*, PyObject *args ) {
+ trace << "PyInstance_create ()" << endl;
+
+ Instance* instance = NULL;
+ PyObject* arg0;
+ PyObject* arg1;
+ PyObject* arg2;
+ PyObject* arg3;
+
+ HTRY
+ __cs.init ("Instance.create");
+ if ( ! PyArg_ParseTuple(args,"O&O&O&|O&:Instance.new"
+ ,Converter,&arg0
+ ,Converter,&arg1
+ ,Converter,&arg2
+ ,Converter,&arg3
+ )) {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Instance constructor." );
+ return NULL;
+ }
+
+ if ( __cs.getObjectIds() == ":ent:string:ent") {
+ instance = Instance::create(
+ PYCELL_O(arg0),
+ Name(PyString_AsString(arg1)),
+ PYCELL_O(arg2) );
+ } else if ( __cs.getObjectIds() == ":ent:string:ent:transfo") {
+ instance = Instance::create(
+ PYCELL_O(arg0),
+ Name(PyString_AsString(arg1)),
+ PYCELL_O(arg2),
+ *PYTRANSFORMATION_O(arg3),
+ Instance::PlacementStatus::PLACED);
+ } else {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Instance constructor." );
+ return NULL;
+ }
+ HCATCH
+
+ return PyInstance_Link ( instance );
+ }
+
// ---------------------------------------------------------------
// Attribute Method : "PyInstance_getMasterCell ()"
@@ -341,24 +368,25 @@ extern "C" {
// PyInstance Attribute Method table.
PyMethodDef PyInstance_Methods[] =
- { { "getName" , (PyCFunction)PyInstance_getName , METH_NOARGS , "Returns the instance name." }
+ { { "create" , (PyCFunction)PyInstance_create , METH_VARARGS|METH_STATIC
+ , "Create a new Instance." }
+ , { "getName" , (PyCFunction)PyInstance_getName , METH_NOARGS , "Returns the instance name." }
, { "getMasterCell" , (PyCFunction)PyInstance_getMasterCell , METH_NOARGS , "Returns the cell model referenced by the instance." }
, { "getTransformation" , (PyCFunction)PyInstance_getTransformation , METH_NOARGS , "Returns the transformation associated to the instance." }
, { "getPlacementStatus" , (PyCFunction)PyInstance_getPlacementStatus , METH_NOARGS , "Returns the placement status of the instance." }
, { "getPlug" , (PyCFunction)PyInstance_getPlug , METH_VARARGS, "Returns the plug associated to the if it exists or else NULL (if the net is not external)." }
- , { "getPlugs" , (PyCFunction)PyInstance_getPlugs , METH_NOARGS , "Returns the collection of instance plugs." }
- , { "getConnectedPlugs" , (PyCFunction)PyInstance_getConnectedPlugs , METH_NOARGS , "Returns the collection of instance plugs which are effectively connected." }
- , { "getUnconnectedPlugs", (PyCFunction)PyInstance_getUnconnectedPlugs, METH_NOARGS , "Returns the collection of instance plugs which are not connected." }
+ , { "getPlugs" , (PyCFunction)PyInstance_getPlugs , METH_NOARGS , "Returns the collection of instance plugs." }
+ , { "getConnectedPlugs" , (PyCFunction)PyInstance_getConnectedPlugs , METH_NOARGS , "Returns the collection of instance plugs which are effectively connected." }
+ , { "getUnconnectedPlugs" , (PyCFunction)PyInstance_getUnconnectedPlugs , METH_NOARGS , "Returns the collection of instance plugs which are not connected." }
, { "getAbutmentBox" , (PyCFunction)PyInstance_getAbutmentBox , METH_NOARGS , "Returns the abutment box of the instance, that is the abutment box of the master cell to which has been applied the instance transformation." }
, { "isTerminal" , (PyCFunction)PyInstance_isTerminal , METH_NOARGS , "Returns true if the instance is a terminal instance." }
, { "isLeaf" , (PyCFunction)PyInstance_isLeaf , METH_NOARGS , "Returns true if the instance is a leaf instance." }
- , { "isBound" , (PyCFunction)PyInstance_isPyBound , METH_NOARGS, "Returns true if the instance is bounded to the hurricane instance" }
+ , { "isBound" , (PyCFunction)PyInstance_isPyBound , METH_NOARGS , "Returns true if the instance is bounded to the hurricane instance" }
, { "setName" , (PyCFunction)PyInstance_setName , METH_VARARGS, "Allows to change the instance name." }
, { "setTransformation" , (PyCFunction)PyInstance_setTransformation , METH_VARARGS, "Allows to modify the instance transformation." }
, { "setPlacementStatus" , (PyCFunction)PyInstance_setPlacementStatus , METH_VARARGS, "Allows to modify the instance placement status." }
, { "setMasterCell" , (PyCFunction)PyInstance_setMasterCell , METH_VARARGS, "Allows to change the cell referenced by this instance." }
- , { "destroy" , (PyCFunction)PyInstance_destroy , METH_NOARGS
- , "Destroy associated hurricane object The python object remains." }
+ , { "destroy" , (PyCFunction)PyInstance_destroy , METH_NOARGS , "Destroy associated hurricane object The python object remains." }
, {NULL, NULL, 0, NULL} /* sentinel */
};
@@ -380,50 +408,6 @@ extern "C" {
// | "PyInstance" Shared Library Code Part |
// x=================================================================x
- // ---------------------------------------------------------------
- // Attribute Method : "PyInstance_new ()"
-
- PyObject* PyInstance_create ( PyObject *module, PyObject *args ) {
- trace << "PyInstance_create ()" << endl;
-
- Instance* instance = NULL;
- PyObject* arg0;
- PyObject* arg1;
- PyObject* arg2;
- PyObject* arg3;
-
- HTRY
- __cs.init ("Instance.create");
- if ( ! PyArg_ParseTuple(args,"O&O&O&|O&:Instance.new"
- ,Converter,&arg0
- ,Converter,&arg1
- ,Converter,&arg2
- ,Converter,&arg3
- )) {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Instance constructor." );
- return NULL;
- }
-
- if ( __cs.getObjectIds() == ":ent:string:ent") {
- instance = Instance::create(
- PYCELL_O(arg0),
- Name(PyString_AsString(arg1)),
- PYCELL_O(arg2) );
- } else if ( __cs.getObjectIds() == ":ent:string:ent:transfo") {
- instance = Instance::create(
- PYCELL_O(arg0),
- Name(PyString_AsString(arg1)),
- PYCELL_O(arg2),
- *PYTRANSFORMATION_O(arg3),
- Instance::PlacementStatus::PLACED);
- } else {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Instance constructor." );
- return NULL;
- }
- HCATCH
-
- return PyInstance_Link ( instance );
- }
// Link/Creation Method.
@@ -436,6 +420,14 @@ extern "C" {
PyTypeInheritedObjectDefinitions(Instance, Entity)
+ extern void PyInstance_postModuleInit ()
+ {
+ PyPlacementStatus_postModuleInit();
+
+ PyDict_SetItemString( PyTypeInstance.tp_dict, "PlacementStatus", (PyObject*)&PyTypePlacementStatus );
+ }
+
+
#endif // End of Shared Library Code Part.
diff --git a/hurricane/src/isobar/PyLibrary.cpp b/hurricane/src/isobar/PyLibrary.cpp
index 4773e96c..37d2ccdd 100644
--- a/hurricane/src/isobar/PyLibrary.cpp
+++ b/hurricane/src/isobar/PyLibrary.cpp
@@ -1,8 +1,7 @@
-
// -*- C++ -*-
//
// This file is part of the Coriolis Software.
-// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved
+// Copyright (c) UPMC 2008-2014, All Rights Reserved
//
// +-----------------------------------------------------------------+
// | C O R I O L I S |
@@ -40,6 +39,35 @@ extern "C" {
GetNameMethod(Library, lib)
+ static PyObject* PyLibrary_create ( PyObject *, PyObject *args ) {
+ trace << "PyLibrary_create()" << endl;
+
+ PyObject* arg0;
+ PyObject* arg1;
+ Library* library = NULL;
+
+ HTRY
+ __cs.init ("Library.create");
+ if (!PyArg_ParseTuple(args,"O&O&:Library.create", Converter, &arg0, Converter, &arg1)) {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Library constructor." );
+ return NULL;
+ }
+ if (__cs.getObjectIds() == ":db:string") {
+ DataBase* db = PYDATABASE_O(arg0);
+ library = Library::create(db, Name(PyString_AsString(arg1)));
+ } else if (__cs.getObjectIds() == ":library:string") {
+ Library* masterLibrary = PYLIBRARY_O(arg0);
+ library = Library::create(masterLibrary, Name(PyString_AsString(arg1)));
+ } else {
+ PyErr_SetString( ConstructorError, "invalid number of parameters for Library constructor." );
+ return NULL;
+ }
+ HCATCH
+
+ return PyLibrary_Link( library );
+ }
+
+
static PyObject* PyLibrary_getSubLibrary ( PyLibrary *self, PyObject* args ) {
trace << "PyLibrary_getLibrary ()" << endl;
@@ -107,8 +135,9 @@ extern "C" {
PyMethodDef PyLibrary_Methods[] =
- {
- { "getName" , (PyCFunction)PyLibrary_getName , METH_NOARGS , "Returns the name of the library." }
+ { { "create" , (PyCFunction)PyLibrary_create , METH_NOARGS|METH_STATIC
+ , "Creates a new library." }
+ , { "getName" , (PyCFunction)PyLibrary_getName , METH_NOARGS , "Returns the name of the library." }
, { "getLibrary", (PyCFunction)PyLibrary_getSubLibrary, METH_VARARGS, "Get the sub-library named " }
, { "getCell" , (PyCFunction)PyLibrary_getCell , METH_VARARGS, "Get the cell of name " }
, { "getCells" , (PyCFunction)PyLibrary_getCells , METH_NOARGS , "Returns the collection of all cells of the library." }
@@ -130,39 +159,8 @@ extern "C" {
// +=================================================================+
- PyObject* PyLibrary_create ( PyObject *module, PyObject *args ) {
- trace << "PyLibrary_create()" << endl;
-
- PyObject* arg0;
- PyObject* arg1;
- Library* library = NULL;
-
- HTRY
- __cs.init ("Library.create");
- if (!PyArg_ParseTuple(args,"O&O&:Library.create", Converter, &arg0, Converter, &arg1)) {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Library constructor." );
- return NULL;
- }
- if (__cs.getObjectIds() == ":db:string") {
- DataBase* db = PYDATABASE_O(arg0);
- library = Library::create(db, Name(PyString_AsString(arg1)));
- } else if (__cs.getObjectIds() == ":library:string") {
- Library* masterLibrary = PYLIBRARY_O(arg0);
- library = Library::create(masterLibrary, Name(PyString_AsString(arg1)));
- } else {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Library constructor." );
- return NULL;
- }
- HCATCH
-
- return PyLibrary_Link ( library );
- }
-
-
// Link/Creation Method.
DBoLinkCreateMethod(Library)
-
-
PyTypeObjectDefinitions(Library)
diff --git a/hurricane/src/isobar/PyNet.cpp b/hurricane/src/isobar/PyNet.cpp
index fae4db73..8fce246a 100644
--- a/hurricane/src/isobar/PyNet.cpp
+++ b/hurricane/src/isobar/PyNet.cpp
@@ -1,34 +1,33 @@
-// x-----------------------------------------------------------------x
-// | |
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2006-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
-// | Author : Sophie BELLOEIL |
-// | E-mail : Sophie.Belloeil@asim.lip6.fr |
+// | Author : Sophie BELLOEIL |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Module : "./PyNet.cpp" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
-
-
+// | C++ Module : "./PyNet.cpp" |
+// +-----------------------------------------------------------------+
#include "hurricane/isobar/PyNet.h"
+#include "hurricane/isobar/PyNetType.h"
+#include "hurricane/isobar/PyNetDirection.h"
#include "hurricane/isobar/PyCell.h"
#include "hurricane/isobar/PyPoint.h"
#include "hurricane/isobar/PyPlugCollection.h"
#include "hurricane/isobar/PySegmentCollection.h"
#include "hurricane/isobar/PyComponentCollection.h"
#include "hurricane/isobar/PyPinCollection.h"
-
#include "hurricane/Cell.h"
#include "hurricane/NetExternalComponents.h"
using namespace Hurricane;
-
namespace Isobar {
@@ -93,35 +92,11 @@ extern "C" {
}
-
-
- // x-------------------------------------------------------------x
- // | Global Constants Loading |
- // x-------------------------------------------------------------x
-
- extern void NetLoadConstants ( PyObject* dictionnary ) {
- PyObject* constant;
-
- LOAD_CONSTANT ( Net::Type::UNDEFINED , "TypeUNDEFINED" )
- LOAD_CONSTANT ( Net::Type::LOGICAL , "TypeLOGICAL" )
- LOAD_CONSTANT ( Net::Type::CLOCK , "TypeCLOCK" )
- LOAD_CONSTANT ( Net::Type::POWER , "TypePOWER" )
- LOAD_CONSTANT ( Net::Type::GROUND , "TypeGROUND" )
- LOAD_CONSTANT ( Net::Direction::UNDEFINED , "DirectionUNDEFINED" )
- LOAD_CONSTANT ( Net::Direction::IN , "DirectionIN" )
- LOAD_CONSTANT ( Net::Direction::OUT , "DirectionOUT" )
- LOAD_CONSTANT ( Net::Direction::INOUT , "DirectionINOUT" )
- LOAD_CONSTANT ( Net::Direction::TRISTATE , "DirectionTRISTATE" )
- }
-
-
-
// x-------------------------------------------------------------x
// | "PyNet" Attribute Methods |
// x-------------------------------------------------------------x
-
// Standart Accessors (Attributes).
DirectGetLongAttribute(PyNet_getX,getX,PyNet,Net)
DirectGetLongAttribute(PyNet_getY,getY,PyNet,Net)
@@ -141,11 +116,33 @@ extern "C" {
DBoDestroyAttribute(PyNet_destroy, PyNet)
+ // ---------------------------------------------------------------
+ // Attribute Method : "PyNet_getName ()"
+
+ GetNameMethod(Net, net)
// ---------------------------------------------------------------
- // Attribute Method : "PyNet_getName ()"
- GetNameMethod(Net, net)
+ // Attribute Method : "PyNet_create ()"
+
+ static PyObject* PyNet_create ( PyObject*, PyObject *args ) {
+ trace << "PyNet_create()" << endl;
+
+ char* name = NULL;
+ PyCell* pyCell = NULL;
+ Net* net = NULL;
+
+ HTRY
+ if (PyArg_ParseTuple(args,"O!s:Net.create", &PyTypeCell, &pyCell, &name)) {
+ net = Net::create(PYCELL_O(pyCell), Name(name));
+ } else {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Net constructor." );
+ return NULL;
+ }
+ HCATCH
+
+ return PyNet_Link(net);
+ }
// ---------------------------------------------------------------
@@ -449,7 +446,9 @@ extern "C" {
// PyNet Attribute Method table.
PyMethodDef PyNet_Methods[] =
- { { "getName" , (PyCFunction)PyNet_getName , METH_NOARGS , "Returns the net name." }
+ { { "create" , (PyCFunction)PyNet_create , METH_VARARGS|METH_STATIC
+ , "Create a new Net." }
+ , { "getName" , (PyCFunction)PyNet_getName , METH_NOARGS , "Returns the net name." }
, { "getType" , (PyCFunction)PyNet_getType , METH_NOARGS , "Returns the signal type (by default set to UNDEFINED)." }
, { "getDirection" , (PyCFunction)PyNet_getDirection , METH_NOARGS , "Returns the signal direction (by default set to UNDEFINED)." }
, { "getX" , (PyCFunction)PyNet_getX , METH_NOARGS , "Returns net abscissa." }
@@ -497,48 +496,22 @@ extern "C" {
// x=================================================================x
- // ---------------------------------------------------------------
- // Attribute Method : "PyNet_create ()"
-
- PyObject* PyNet_create ( PyObject *module, PyObject *args ) {
- trace << "PyNet_create()" << endl;
-
- char* name = NULL;
- PyCell* pyCell = NULL;
- Net* net = NULL;
-
- HTRY
- if (PyArg_ParseTuple(args,"O!s:Net.create", &PyTypeCell, &pyCell, &name)) {
- net = Net::create(PYCELL_O(pyCell), Name(name));
- } else {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Net constructor." );
- return NULL;
- }
- HCATCH
-
- return PyNet_Link(net);
- }
-
-
-
- // Link/Creation Method.
DBoLinkCreateMethod(Net)
-
-
-
-
- // ---------------------------------------------------------------
- // PyNet Object Definitions.
-
PyTypeInheritedObjectDefinitions(Net, Entity)
-# endif // End of Shared Library Code Part.
+ extern void PyNet_postModuleInit ()
+ {
+ PyNetType_postModuleInit();
+ PyNetDirection_postModuleInit();
+
+ PyDict_SetItemString( PyTypeNet.tp_dict, "Type" , (PyObject*)&PyTypeNetType );
+ PyDict_SetItemString( PyTypeNet.tp_dict, "Direction", (PyObject*)&PyTypeNetDirection );
+ }
-} // End of extern "C".
+# endif // Shared Library Code Part.
+} // extern "C".
-
-
-} // End of Isobar namespace.
+} // Isobar namespace.
diff --git a/hurricane/src/isobar/PyNetDirection.cpp b/hurricane/src/isobar/PyNetDirection.cpp
new file mode 100644
index 00000000..7fa93829
--- /dev/null
+++ b/hurricane/src/isobar/PyNetDirection.cpp
@@ -0,0 +1,110 @@
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2014-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
+// | C O R I O L I S |
+// | I s o b a r - Hurricane / Python Interface |
+// | |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
+// | =============================================================== |
+// | C++ Module : "./PyNetDirection.h" |
+// +-----------------------------------------------------------------+
+
+
+#include "hurricane/isobar/PyNetDirection.h"
+
+
+namespace Isobar {
+
+ using std::cerr;
+ using std::endl;
+ using std::hex;
+ using std::ostringstream;
+ using Hurricane::tab;
+ using Hurricane::in_trace;
+ using Hurricane::Error;
+ using Hurricane::Warning;
+ using Isobar::ProxyProperty;
+ using Isobar::ProxyError;
+ using Isobar::ConstructorError;
+ using Isobar::HurricaneError;
+ using Isobar::HurricaneWarning;
+ using Isobar::ParseOneArg;
+ using Isobar::ParseTwoArg;
+
+
+extern "C" {
+
+
+#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(NetDirection,netDirection,function)
+
+
+// +=================================================================+
+// | "PyNetDirection" Python Module Code Part |
+// +=================================================================+
+
+#if defined(__PYTHON_MODULE__)
+
+
+ // Standart Accessors (Attributes).
+
+
+ // Standart Destroy (Attribute).
+ // DBoDestroyAttribute(PyNetDirection_destroy,PyNetDirection)
+
+
+ PyMethodDef PyNetDirection_Methods[] =
+ { {NULL, NULL, 0, NULL} /* sentinel */
+ };
+//PyTypeObjectLinkPyType(Transformation::NetDirection)
+
+
+ PythonOnlyDeleteMethod(NetDirection)
+ DirectReprMethod(PyNetDirection_Repr, PyNetDirection, Net::Direction)
+ DirectStrMethod (PyNetDirection_Str, PyNetDirection, Net::Direction)
+ DirectCmpMethod (PyNetDirection_Cmp, IsPyNetDirection, PyNetDirection)
+ DirectHashMethod(PyNetDirection_Hash, PyNetDirection)
+
+ extern void PyNetDirection_LinkPyType() {
+ trace << "PyNetDirection_LinkType()" << endl;
+ PyTypeNetDirection.tp_dealloc = (destructor) PyNetDirection_DeAlloc;
+ PyTypeNetDirection.tp_compare = (cmpfunc) PyNetDirection_Cmp;
+ PyTypeNetDirection.tp_repr = (reprfunc) PyNetDirection_Repr;
+ PyTypeNetDirection.tp_str = (reprfunc) PyNetDirection_Str;
+ PyTypeNetDirection.tp_hash = (hashfunc) PyNetDirection_Hash;
+ PyTypeNetDirection.tp_methods = PyNetDirection_Methods;
+ }
+
+
+#else // End of Python Module Code Part.
+
+
+// +=================================================================+
+// | "PyNetDirection" Shared Library Code Part |
+// +=================================================================+
+
+ // Link/Creation Method.
+ PyTypeObjectDefinitions(NetDirection)
+
+
+ extern void PyNetDirection_postModuleInit ()
+ {
+ PyObject* constant;
+
+ LoadObjectConstant(PyTypeNetDirection.tp_dict,Net::Direction::UNDEFINED,"UNDEFINED");
+ LoadObjectConstant(PyTypeNetDirection.tp_dict,Net::Direction::IN ,"IN");
+ LoadObjectConstant(PyTypeNetDirection.tp_dict,Net::Direction::OUT ,"OUT");
+ LoadObjectConstant(PyTypeNetDirection.tp_dict,Net::Direction::INOUT ,"INOUT");
+ LoadObjectConstant(PyTypeNetDirection.tp_dict,Net::Direction::TRISTATE ,"TRISTATE");
+ }
+
+
+#endif // Shared Library Code Part.
+
+} // extern "C".
+
+} // Isobar namespace.
+
diff --git a/hurricane/src/isobar/PyNetType.cpp b/hurricane/src/isobar/PyNetType.cpp
new file mode 100644
index 00000000..6b2e9f3c
--- /dev/null
+++ b/hurricane/src/isobar/PyNetType.cpp
@@ -0,0 +1,109 @@
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2014-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
+// | C O R I O L I S |
+// | I s o b a r - Hurricane / Python Interface |
+// | |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
+// | =============================================================== |
+// | C++ Module : "./PyNetType.h" |
+// +-----------------------------------------------------------------+
+
+
+#include "hurricane/isobar/PyNetType.h"
+
+
+namespace Isobar {
+
+ using std::cerr;
+ using std::endl;
+ using std::hex;
+ using std::ostringstream;
+ using Hurricane::tab;
+ using Hurricane::in_trace;
+ using Hurricane::Error;
+ using Hurricane::Warning;
+ using Isobar::ProxyProperty;
+ using Isobar::ProxyError;
+ using Isobar::ConstructorError;
+ using Isobar::HurricaneError;
+ using Isobar::HurricaneWarning;
+ using Isobar::ParseOneArg;
+ using Isobar::ParseTwoArg;
+
+
+extern "C" {
+
+
+#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(NetType,catalog,function)
+
+
+// +=================================================================+
+// | "PyNetType" Python Module Code Part |
+// +=================================================================+
+
+#if defined(__PYTHON_MODULE__)
+
+
+ // Standart Accessors (Attributes).
+
+
+ // Standart Destroy (Attribute).
+ // DBoDestroyAttribute(PyNetType_destroy,PyNetType)
+
+
+ PyMethodDef PyNetType_Methods[] =
+ { {NULL, NULL, 0, NULL} /* sentinel */
+ };
+
+
+ PythonOnlyDeleteMethod(NetType)
+ DirectReprMethod(PyNetType_Repr, PyNetType, Net::Type)
+ DirectStrMethod (PyNetType_Str, PyNetType, Net::Type)
+ DirectCmpMethod (PyNetType_Cmp, IsPyNetType, PyNetType)
+ DirectHashMethod(PyNetType_Hash, PyNetType)
+
+ extern void PyNetType_LinkPyType() {
+ trace << "PyNetType_LinkType()" << endl;
+ PyTypeNetType.tp_dealloc = (destructor) PyNetType_DeAlloc;
+ PyTypeNetType.tp_compare = (cmpfunc) PyNetType_Cmp;
+ PyTypeNetType.tp_repr = (reprfunc) PyNetType_Repr;
+ PyTypeNetType.tp_str = (reprfunc) PyNetType_Str;
+ PyTypeNetType.tp_hash = (hashfunc) PyNetType_Hash;
+ PyTypeNetType.tp_methods = PyNetType_Methods;
+ }
+
+
+#else // End of Python Module Code Part.
+
+
+// +=================================================================+
+// | "PyNetType" Shared Library Code Part |
+// +=================================================================+
+
+ // Link/Creation Method.
+ PyTypeObjectDefinitions(NetType)
+
+
+ extern void PyNetType_postModuleInit ()
+ {
+ PyObject* constant;
+
+ LoadObjectConstant(PyTypeNetType.tp_dict,Net::Type::UNDEFINED,"UNDEFINED");
+ LoadObjectConstant(PyTypeNetType.tp_dict,Net::Type::LOGICAL ,"LOGICAL" );
+ LoadObjectConstant(PyTypeNetType.tp_dict,Net::Type::CLOCK ,"CLOCK" );
+ LoadObjectConstant(PyTypeNetType.tp_dict,Net::Type::POWER ,"POWER" );
+ LoadObjectConstant(PyTypeNetType.tp_dict,Net::Type::GROUND ,"GROUND" );
+ }
+
+
+#endif // Shared Library Code Part.
+
+} // extern "C".
+
+} // Isobar namespace.
+
diff --git a/hurricane/src/isobar/PyOccurrence.cpp b/hurricane/src/isobar/PyOccurrence.cpp
index 04cdf908..d218b7f2 100644
--- a/hurricane/src/isobar/PyOccurrence.cpp
+++ b/hurricane/src/isobar/PyOccurrence.cpp
@@ -58,6 +58,53 @@ extern "C" {
DirectDestroyAttribute(PyOccurrence_destroy, PyOccurrence)
+ // ---------------------------------------------------------------
+ // Attribute Method : "PyOccurrence_NEW ()"
+
+ PyObject* PyOccurrence_NEW ( PyObject *module, PyObject *args ) {
+ trace << "PyOccurrence_NEW()" << endl;
+
+ Occurrence* occurrence;
+ PyObject* arg0;
+ PyObject* arg1;
+
+ __cs.init ("Occurrence.Occurrence");
+ if ( ! PyArg_ParseTuple(args,"|O&O&:Occurrence.Occurrence"
+ ,Converter,&arg0
+ ,Converter,&arg1
+ )) {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Occurrence constructor. " );
+ return NULL;
+ }
+
+ PyOccurrence* pyOccurrence = NULL;
+ HTRY
+ if ( __cs.getObjectIds() == NO_ARG ) { occurrence = new Occurrence (); }
+ else if ( __cs.getObjectIds() == ENT_ARG ) { occurrence = new Occurrence ( PYENTITY_O(arg0) ); }
+ else if ( __cs.getObjectIds() == COMP_PATH_ARG) { occurrence = new Occurrence ( PYSEGMENT_O(arg0)
+ , *PYPATH_O(arg1) ); }
+ else if ( __cs.getObjectIds() == ENT_PATH_ARG ) { occurrence = new Occurrence ( PYENTITY_O(arg0)
+ , *PYPATH_O(arg1) ); }
+ else {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Occurrence constructor. " );
+ return ( NULL );
+ }
+
+ pyOccurrence = PyObject_NEW(PyOccurrence, &PyTypeOccurrence);
+ if (pyOccurrence == NULL) return NULL;
+
+ pyOccurrence->_object = occurrence;
+ HCATCH
+
+ return ( (PyObject*)pyOccurrence );
+ }
+
+
+ static int PyOccurrence_Init ( PyOccurrence* self, PyObject* args, PyObject* kwargs )
+ {
+ trace << "PyOccurrence_Init(): " << (void*)self << endl;
+ return 0;
+ }
// ---------------------------------------------------------------
@@ -195,7 +242,8 @@ extern "C" {
DirectDeleteMethod(PyOccurrence_DeAlloc,PyOccurrence)
- PyTypeObjectLinkPyType(Occurrence)
+ PyTypeObjectLinkPyTypeNewInit(Occurrence)
+//PyTypeObjectLinkPyType(Occurrence)
#else // End of Python Module Code Part.
@@ -205,47 +253,6 @@ extern "C" {
// | "PyOccurrence" Shared Library Code Part |
// x=================================================================x
- // ---------------------------------------------------------------
- // Attribute Method : "PyOccurrence_create ()"
-
- PyObject* PyOccurrence_create ( PyObject *module, PyObject *args ) {
- trace << "PyOccurrence_create()" << endl;
-
- Occurrence* occurrence;
- PyObject* arg0;
- PyObject* arg1;
-
- __cs.init ("Occurrence.create");
- if ( ! PyArg_ParseTuple(args,"|O&O&:Occurrence.create"
- ,Converter,&arg0
- ,Converter,&arg1
- )) {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Occurrence constructor. " );
- return NULL;
- }
-
- PyOccurrence* pyOccurrence = NULL;
- HTRY
- if ( __cs.getObjectIds() == NO_ARG ) { occurrence = new Occurrence (); }
- else if ( __cs.getObjectIds() == ENT_ARG ) { occurrence = new Occurrence ( PYENTITY_O(arg0) ); }
- else if ( __cs.getObjectIds() == COMP_PATH_ARG) { occurrence = new Occurrence ( PYSEGMENT_O(arg0)
- , *PYPATH_O(arg1) ); }
- else if ( __cs.getObjectIds() == ENT_PATH_ARG ) { occurrence = new Occurrence ( PYENTITY_O(arg0)
- , *PYPATH_O(arg1) ); }
- else {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Occurrence constructor. " );
- return ( NULL );
- }
-
- pyOccurrence = PyObject_NEW(PyOccurrence, &PyTypeOccurrence);
- if (pyOccurrence == NULL) return NULL;
-
- pyOccurrence->_object = occurrence;
- HCATCH
-
- return ( (PyObject*)pyOccurrence );
- }
-
// ---------------------------------------------------------------
diff --git a/hurricane/src/isobar/PyOrientation.cpp b/hurricane/src/isobar/PyOrientation.cpp
new file mode 100644
index 00000000..ef121364
--- /dev/null
+++ b/hurricane/src/isobar/PyOrientation.cpp
@@ -0,0 +1,117 @@
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2014-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
+// | C O R I O L I S |
+// | I s o b a r - Hurricane / Python Interface |
+// | |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
+// | =============================================================== |
+// | C++ Module : "./PyOrientation.h" |
+// +-----------------------------------------------------------------+
+
+
+#include "hurricane/isobar/PyOrientation.h"
+
+
+namespace Isobar {
+
+ using std::cerr;
+ using std::endl;
+ using std::hex;
+ using std::ostringstream;
+ using Hurricane::tab;
+ using Hurricane::in_trace;
+ using Hurricane::Error;
+ using Hurricane::Warning;
+ using Isobar::ProxyProperty;
+ using Isobar::ProxyError;
+ using Isobar::ConstructorError;
+ using Isobar::HurricaneError;
+ using Isobar::HurricaneWarning;
+ using Isobar::ParseOneArg;
+ using Isobar::ParseTwoArg;
+
+
+extern "C" {
+
+
+#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Orientation,catalog,function)
+
+
+// +=================================================================+
+// | "PyOrientation" Python Module Code Part |
+// +=================================================================+
+
+#if defined(__PYTHON_MODULE__)
+
+
+ // Standart Accessors (Attributes).
+
+
+ // Standart Destroy (Attribute).
+ // DBoDestroyAttribute(PyOrientation_destroy,PyOrientation)
+
+
+ PyMethodDef PyOrientation_Methods[] =
+ { {NULL, NULL, 0, NULL} /* sentinel */
+ };
+
+
+//PythonOnlyDeleteMethod(Transformation::Orientation)
+//PyTypeObjectLinkPyType(Transformation::Orientation)
+
+
+ PythonOnlyDeleteMethod(Orientation)
+
+ DirectReprMethod(PyOrientation_Repr, PyOrientation, Transformation::Orientation)
+ DirectStrMethod (PyOrientation_Str, PyOrientation, Transformation::Orientation)
+ DirectCmpMethod (PyOrientation_Cmp, IsPyOrientation, PyOrientation)
+ DirectHashMethod(PyOrientation_Hash, PyOrientation)
+
+ extern void PyOrientation_LinkPyType() {
+ trace << "PyOrientation_LinkType()" << endl;
+ PyTypeOrientation.tp_dealloc = (destructor) PyOrientation_DeAlloc;
+ PyTypeOrientation.tp_compare = (cmpfunc) PyOrientation_Cmp;
+ PyTypeOrientation.tp_repr = (reprfunc) PyOrientation_Repr;
+ PyTypeOrientation.tp_str = (reprfunc) PyOrientation_Str;
+ PyTypeOrientation.tp_hash = (hashfunc) PyOrientation_Hash;
+ PyTypeOrientation.tp_methods = PyOrientation_Methods;
+ }
+
+
+#else // End of Python Module Code Part.
+
+
+// +=================================================================+
+// | "PyOrientation" Shared Library Code Part |
+// +=================================================================+
+
+ // Link/Creation Method.
+ PyTypeObjectDefinitions(Orientation)
+
+
+ extern void PyOrientation_postModuleInit ()
+ {
+ PyObject* constant;
+
+ LoadObjectConstant(PyTypeOrientation.tp_dict,Transformation::Orientation::ID,"ID");
+ LoadObjectConstant(PyTypeOrientation.tp_dict,Transformation::Orientation::R1,"R1");
+ LoadObjectConstant(PyTypeOrientation.tp_dict,Transformation::Orientation::R2,"R2");
+ LoadObjectConstant(PyTypeOrientation.tp_dict,Transformation::Orientation::R3,"R3");
+ LoadObjectConstant(PyTypeOrientation.tp_dict,Transformation::Orientation::MX,"MX");
+ LoadObjectConstant(PyTypeOrientation.tp_dict,Transformation::Orientation::XR,"XR");
+ LoadObjectConstant(PyTypeOrientation.tp_dict,Transformation::Orientation::MY,"MY");
+ LoadObjectConstant(PyTypeOrientation.tp_dict,Transformation::Orientation::YR,"YR");
+ }
+
+
+#endif // Shared Library Code Part.
+
+} // extern "C".
+
+} // Isobar namespace.
+
diff --git a/hurricane/src/isobar/PyPad.cpp b/hurricane/src/isobar/PyPad.cpp
index db1f6b79..1e904c0b 100644
--- a/hurricane/src/isobar/PyPad.cpp
+++ b/hurricane/src/isobar/PyPad.cpp
@@ -1,3 +1,19 @@
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2006-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
+// | C O R I O L I S |
+// | I s o b a r - Hurricane / Python Interface |
+// | |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
+// | =============================================================== |
+// | C++ Module : "./PyPad.cpp" |
+// +-----------------------------------------------------------------+
+
+
#include "hurricane/isobar/PyNet.h"
#include "hurricane/isobar/PyLayer.h"
#include "hurricane/isobar/PyBox.h"
@@ -26,7 +42,7 @@ extern "C" {
// x-------------------------------------------------------------x
- // | "PyPad" Attribute Methods |
+ // | "PyPad" Attribute Methods |
// x-------------------------------------------------------------x
@@ -37,6 +53,40 @@ extern "C" {
// Standard Destroy (Attribute).
DBoDestroyAttribute(PyPad_destroy, PyPad)
+ // ---------------------------------------------------------------
+ // Attribute Method : "PyPad_create ()"
+
+ static PyObject* PyPad_create ( PyObject*, PyObject *args ) {
+ trace << "PyPad_create()" << endl;
+
+ PyObject* arg0;
+ PyObject* arg1;
+ PyObject* arg2;
+ Pad* pad = NULL;
+
+ HTRY
+ __cs.init ("Pad.create");
+ if (!PyArg_ParseTuple(args,"O&O&O&:Pad.create"
+ ,Converter,&arg0
+ ,Converter,&arg1
+ ,Converter,&arg2
+ )) {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Pad constructor." );
+ return NULL;
+ }
+
+ if ( __cs.getObjectIds() == ":ent:layer:box") {
+ pad = Pad::create(PYNET_O(arg0), PYLAYER_O(arg1), *PYBOX_O(arg2));
+ } else {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Pad constructor." );
+ return NULL;
+ }
+
+ HCATCH
+
+ return PyPad_Link(pad);
+ }
+
// ---------------------------------------------------------------
// Attribute Method : "PyPad_getBoundingBox ()"
@@ -100,14 +150,16 @@ extern "C" {
// PyPad Attribute Method table.
PyMethodDef PyPad_Methods[] =
- { { "getX" , (PyCFunction)PyPad_getX , METH_NOARGS, "Return the Pad X value." }
- , { "getY" , (PyCFunction)PyPad_getY , METH_NOARGS, "Return the Pad Y value." }
- , { "getBoundingBox" , (PyCFunction)PyPad_getBoundingBox, METH_NOARGS, "Return the Pad Bounding Box." }
- , { "setBoundingBox" , (PyCFunction)PyPad_setBoundingBox, METH_VARARGS, "Sets the Pad Bounding Box." }
- , { "translate" , (PyCFunction)PyPad_translate , METH_VARARGS, "Translates the Pad of dx and dy." }
- , { "destroy" , (PyCFunction)PyPad_destroy , METH_NOARGS
- , "Destroy associated hurricane object, the python object remains." }
- , {NULL, NULL, 0, NULL} /* sentinel */
+ { { "create" , (PyCFunction)PyPad_create , METH_VARARGS|METH_STATIC
+ , "Create a new Pad." }
+ , { "getX" , (PyCFunction)PyPad_getX , METH_NOARGS, "Return the Pad X value." }
+ , { "getY" , (PyCFunction)PyPad_getY , METH_NOARGS, "Return the Pad Y value." }
+ , { "getBoundingBox", (PyCFunction)PyPad_getBoundingBox, METH_NOARGS, "Return the Pad Bounding Box." }
+ , { "setBoundingBox", (PyCFunction)PyPad_setBoundingBox, METH_VARARGS, "Sets the Pad Bounding Box." }
+ , { "translate" , (PyCFunction)PyPad_translate , METH_VARARGS, "Translates the Pad of dx and dy." }
+ , { "destroy" , (PyCFunction)PyPad_destroy , METH_NOARGS
+ , "Destroy associated hurricane object, the python object remains." }
+ , {NULL, NULL, 0, NULL} /* sentinel */
};
@@ -127,55 +179,14 @@ extern "C" {
// | "PyPad" Shared Library Code Part |
// x=================================================================x
- // ---------------------------------------------------------------
- // Attribute Method : "PyPad_new ()"
-
- PyObject* PyPad_create ( PyObject *module, PyObject *args ) {
- trace << "PyPad_create()" << endl;
-
- PyObject* arg0;
- PyObject* arg1;
- PyObject* arg2;
- Pad* pad = NULL;
-
- HTRY
- __cs.init ("Pad.create");
- if (!PyArg_ParseTuple(args,"O&O&O&:Pad.create"
- ,Converter,&arg0
- ,Converter,&arg1
- ,Converter,&arg2
- )) {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Pad constructor." );
- return NULL;
- }
-
- if ( __cs.getObjectIds() == ":ent:layer:box") {
- pad = Pad::create(PYNET_O(arg0), PYLAYER_O(arg1), *PYBOX_O(arg2));
- } else {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Pad constructor." );
- return NULL;
- }
-
- HCATCH
-
- return PyPad_Link(pad);
- }
-
// Link/Creation Method.
DBoLinkCreateMethod(Pad)
-
-
- // ---------------------------------------------------------------
- // PyPad Object Definitions.
-
-
PyTypeInheritedObjectDefinitions(Pad, Component)
-#endif // End of Shared Library Code Part.
+#endif // Shared Library Code Part.
-
-} // End of extern "C".
+} // extern "C".
diff --git a/hurricane/src/isobar/PyPath.cpp b/hurricane/src/isobar/PyPath.cpp
index b8ff9e76..1b43ea97 100644
--- a/hurricane/src/isobar/PyPath.cpp
+++ b/hurricane/src/isobar/PyPath.cpp
@@ -1,16 +1,18 @@
-// x-----------------------------------------------------------------x
-// | |
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2006-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Jean-Paul CHAPUT |
-// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Module : "./PyPath.cpp" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Module : "./PyPath.cpp" |
+// +-----------------------------------------------------------------+
+
#include "hurricane/isobar/PyTransformation.h"
#include "hurricane/isobar/PyPath.h"
@@ -52,6 +54,57 @@ extern "C" {
DirectDestroyAttribute(PyPath_destroy, PyPath)
+ // ---------------------------------------------------------------
+ // Attribute Method : "PyPath_NEW ()"
+
+ static PyObject* PyPath_NEW ( PyObject *module, PyObject *args ) {
+ trace << "PyPath_NEW()" << endl;
+
+ Path* path = NULL;
+ PyObject* arg0 = NULL;
+ PyObject* arg1 = NULL;
+ PyPath* pyPath = NULL;
+
+ __cs.init ("Path.Path");
+ if ( ! PyArg_ParseTuple(args,"|O&O&:Path.Path"
+ ,Converter,&arg0
+ ,Converter,&arg1
+ )) {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Path constructor." );
+ return NULL;
+ }
+
+ HTRY
+
+ if ( __cs.getObjectIds() == NO_ARG ) { path = new Path (); }
+ else if ( __cs.getObjectIds() == INST_ARG ) { path = new Path ( PYINSTANCE_O(arg0) ); }
+ else if ( __cs.getObjectIds() == INST_PATH_ARG ) { path = new Path ( PYINSTANCE_O(arg0)
+ , *PYPATH_O(arg1) ); }
+ else if ( __cs.getObjectIds() == PATH_INST_ARG ) { path = new Path ( *PYPATH_O(arg0)
+ , PYINSTANCE_O(arg1) ); }
+ else if ( __cs.getObjectIds() == CELL_STRING_ARG ) { path = new Path ( PYCELL_O(arg0)
+ , PyString_AsString(arg1) ); }
+ else {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Path constructor." );
+ return ( NULL );
+ }
+
+ pyPath = PyObject_NEW(PyPath, &PyTypePath);
+ if (pyPath == NULL) return NULL;
+
+ pyPath->_object = path;
+
+ HCATCH
+
+ return ( (PyObject*)pyPath );
+ }
+
+
+ static int PyPath_Init ( PyPath* self, PyObject* args, PyObject* kwargs )
+ {
+ trace << "PyPath_Init(): " << (void*)self << endl;
+ return 0;
+ }
// ---------------------------------------------------------------
@@ -260,7 +313,8 @@ extern "C" {
// x-------------------------------------------------------------x
DirectDeleteMethod(PyPath_DeAlloc,PyPath)
- PyTypeObjectLinkPyType(Path)
+ PyTypeObjectLinkPyTypeNewInit(Path)
+//PyTypeObjectLinkPyType(Path)
# else // End of Python Module Code Part.
@@ -270,51 +324,6 @@ extern "C" {
// | "PyPath" Shared Library Code Part |
// x=================================================================x
- // ---------------------------------------------------------------
- // Attribute Method : "PyPath_create ()"
-
- PyObject* PyPath_create ( PyObject *module, PyObject *args ) {
- trace << "PyPath_create()" << endl;
-
- Path* path = NULL;
- PyObject* arg0 = NULL;
- PyObject* arg1 = NULL;
- PyPath* pyPath = NULL;
-
- __cs.init ("Path.create");
- if ( ! PyArg_ParseTuple(args,"|O&O&:Path.create"
- ,Converter,&arg0
- ,Converter,&arg1
- )) {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Path constructor." );
- return NULL;
- }
-
- HTRY
-
- if ( __cs.getObjectIds() == NO_ARG ) { path = new Path (); }
- else if ( __cs.getObjectIds() == INST_ARG ) { path = new Path ( PYINSTANCE_O(arg0) ); }
- else if ( __cs.getObjectIds() == INST_PATH_ARG ) { path = new Path ( PYINSTANCE_O(arg0)
- , *PYPATH_O(arg1) ); }
- else if ( __cs.getObjectIds() == PATH_INST_ARG ) { path = new Path ( *PYPATH_O(arg0)
- , PYINSTANCE_O(arg1) ); }
- else if ( __cs.getObjectIds() == CELL_STRING_ARG ) { path = new Path ( PYCELL_O(arg0)
- , PyString_AsString(arg1) ); }
- else {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Path constructor." );
- return ( NULL );
- }
-
- pyPath = PyObject_NEW(PyPath, &PyTypePath);
- if (pyPath == NULL) return NULL;
-
- pyPath->_object = path;
-
- HCATCH
-
- return ( (PyObject*)pyPath );
- }
-
// ---------------------------------------------------------------
// PyPath Object Definitions.
diff --git a/hurricane/src/isobar/PyPin.cpp b/hurricane/src/isobar/PyPin.cpp
index c0b8739f..66af029f 100644
--- a/hurricane/src/isobar/PyPin.cpp
+++ b/hurricane/src/isobar/PyPin.cpp
@@ -1,25 +1,28 @@
-// x-----------------------------------------------------------------x
-// | |
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2006-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Damien DUPUIS |
-// | E-mail : Damien.Dupuis@asim.lip6.fr |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Module : "./PyPin.cpp" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Module : "./PyPin.cpp" |
+// +-----------------------------------------------------------------+
+
#include "hurricane/isobar/PyPin.h"
+#include "hurricane/isobar/PyPinPlacementStatus.h"
+#include "hurricane/isobar/PyPinDirection.h"
#include "hurricane/isobar/PyNet.h"
#include "hurricane/isobar/PyLayer.h"
namespace Isobar {
-
using namespace Hurricane;
extern "C" {
@@ -37,71 +40,12 @@ extern "C" {
// x=================================================================x
#if defined(__PYTHON_MODULE__)
-
- // x-------------------------------------------------------------x
- // | Global Constants Loading |
- // x-------------------------------------------------------------x
-
-
- extern void PinLoadConstants ( PyObject* dictionnary ) {
- PyObject* constant;
-
- LOAD_CONSTANT ( Pin::PlacementStatus::UNPLACED , "PinPlacementStatusUNPLACED" )
- LOAD_CONSTANT ( Pin::PlacementStatus::PLACED , "PinPlacementStatusPLACED" )
- LOAD_CONSTANT ( Pin::PlacementStatus::FIXED , "PinPlacementStatusFIXED" )
- LOAD_CONSTANT ( Pin::AccessDirection::UNDEFINED, "PinAccessDirectionUNDEFINED" )
- LOAD_CONSTANT ( Pin::AccessDirection::NORTH , "PinAccessDirectionNORTH" )
- LOAD_CONSTANT ( Pin::AccessDirection::SOUTH , "PinAccessDirectionSOUTH" )
- LOAD_CONSTANT ( Pin::AccessDirection::EAST , "PinAccessDirectionEAST" )
- LOAD_CONSTANT ( Pin::AccessDirection::WEST , "PinAccessDirectionWEST" )
- }
-
// x-------------------------------------------------------------x
// | "PyPin" Attribute Methods |
// x-------------------------------------------------------------x
-
- // Standart Accessors (Attributes).
-
- PyObject* PyPin_getAccessDirection( PyPin* self ) {
- trace << "PyNet_getAccessDirection ()" << endl;
-
- METHOD_HEAD ( "Net.getAccessDirection()" )
-
- return (PyObject *)Py_BuildValue("l", pin->getAccessDirection().getCode() );
-
- }
-
-
- // ---------------------------------------------------------------
- // PyPin Attribute Method table.
-
- PyMethodDef PyPin_Methods[] =
- { { "getAccessDirection" , (PyCFunction)PyPin_getAccessDirection , METH_NOARGS
- , "Returns the pin accessdirection (by default set to UNDEFINED) ." }
- , {NULL, NULL, 0, NULL} /* sentinel */
- };
-
-
-
-
- // x-------------------------------------------------------------x
- // | "PyPin" Object Methods |
- // x-------------------------------------------------------------x
-
-
- DBoDeleteMethod(Pin)
- PyTypeObjectLinkPyType(Pin)
-
-
-#else // End of Python Module Code Part.
-
-
-// x=================================================================x
-// | "PyPin" Shared Library Code Part |
-// x=================================================================x
static Pin::PlacementStatus PyInt_AsPlacementStatus ( PyObject* object ) {
switch ( PyInt_AsLong(object) ) {
@@ -113,6 +57,7 @@ extern "C" {
return ( Pin::PlacementStatus(Pin::PlacementStatus::UNPLACED) );
}
+
static Pin::AccessDirection PyInt_AsAccessDirection ( PyObject* object ) {
switch ( PyInt_AsLong(object) ) {
case Pin::AccessDirection::UNDEFINED : return ( Pin::AccessDirection(Pin::AccessDirection::UNDEFINED) );
@@ -125,10 +70,11 @@ extern "C" {
return ( Pin::AccessDirection(Pin::AccessDirection::UNDEFINED) );
}
+
// ---------------------------------------------------------------
// Attribute Method : "PyPin_create ()"
- PyObject* PyPin_create ( PyObject *module, PyObject *args ) {
+ static PyObject* PyPin_create ( PyObject*, PyObject *args ) {
Pin* pin = NULL;
HTRY
@@ -201,20 +147,67 @@ extern "C" {
return PyPin_Link ( pin );
}
+
+
+ // Standart Accessors (Attributes).
+
+ PyObject* PyPin_getAccessDirection( PyPin* self ) {
+ trace << "PyNet_getAccessDirection ()" << endl;
+
+ METHOD_HEAD ( "Net.getAccessDirection()" )
+
+ return (PyObject *)Py_BuildValue("l", pin->getAccessDirection().getCode() );
+
+ }
+
+
+ // ---------------------------------------------------------------
+ // PyPin Attribute Method table.
+
+ PyMethodDef PyPin_Methods[] =
+ { { "create" , (PyCFunction)PyPin_create , METH_VARARGS|METH_STATIC
+ , "Create a new Pin." }
+ , { "getAccessDirection" , (PyCFunction)PyPin_getAccessDirection , METH_NOARGS
+ , "Returns the pin accessdirection (by default set to UNDEFINED) ." }
+ , {NULL, NULL, 0, NULL} /* sentinel */
+ };
+
+
+
+
+ // x-------------------------------------------------------------x
+ // | "PyPin" Object Methods |
+ // x-------------------------------------------------------------x
+
+
+ DBoDeleteMethod(Pin)
+ PyTypeObjectLinkPyType(Pin)
+
+
+#else // End of Python Module Code Part.
+
+
+// x=================================================================x
+// | "PyPin" Shared Library Code Part |
+// x=================================================================x
// Link/Creation Method.
DBoLinkCreateMethod(Pin)
-
-
-
-
- // ---------------------------------------------------------------
- // PyPin Object Definitions.
-
PyTypeInheritedObjectDefinitions(Pin, Contact)
+
+ extern void PyPin_postModuleInit ()
+ {
+ PyPinPlacementStatus_postModuleInit();
+ PyPinDirection_postModuleInit();
+
+ PyDict_SetItemString( PyTypePin.tp_dict, "PlacementStatus", (PyObject*)&PyTypePinPlacementStatus );
+ PyDict_SetItemString( PyTypePin.tp_dict, "Direction" , (PyObject*)&PyTypePinDirection );
+ }
+
+
#endif // End of Shared Library Code Part.
diff --git a/hurricane/src/isobar/PyPinDirection.cpp b/hurricane/src/isobar/PyPinDirection.cpp
new file mode 100644
index 00000000..b1179753
--- /dev/null
+++ b/hurricane/src/isobar/PyPinDirection.cpp
@@ -0,0 +1,110 @@
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2014-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
+// | C O R I O L I S |
+// | I s o b a r - Hurricane / Python Interface |
+// | |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
+// | =============================================================== |
+// | C++ Module : "./PyPinDirection.h" |
+// +-----------------------------------------------------------------+
+
+
+#include "hurricane/isobar/PyPinDirection.h"
+
+
+namespace Isobar {
+
+ using std::cerr;
+ using std::endl;
+ using std::hex;
+ using std::ostringstream;
+ using Hurricane::tab;
+ using Hurricane::in_trace;
+ using Hurricane::Error;
+ using Hurricane::Warning;
+ using Isobar::ProxyProperty;
+ using Isobar::ProxyError;
+ using Isobar::ConstructorError;
+ using Isobar::HurricaneError;
+ using Isobar::HurricaneWarning;
+ using Isobar::ParseOneArg;
+ using Isobar::ParseTwoArg;
+
+
+extern "C" {
+
+
+#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(PinDirection,netDirection,function)
+
+
+// +=================================================================+
+// | "PyPinDirection" Python Module Code Part |
+// +=================================================================+
+
+#if defined(__PYTHON_MODULE__)
+
+
+ // Standart Accessors (Attributes).
+
+
+ // Standart Destroy (Attribute).
+ // DBoDestroyAttribute(PyPinDirection_destroy,PyPinDirection)
+
+
+ PyMethodDef PyPinDirection_Methods[] =
+ { {NULL, NULL, 0, NULL} /* sentinel */
+ };
+//PyTypeObjectLinkPyType(Transformation::PinDirection)
+
+
+ PythonOnlyDeleteMethod(PinDirection)
+ DirectReprMethod(PyPinDirection_Repr, PyPinDirection, Pin::AccessDirection)
+ DirectStrMethod (PyPinDirection_Str, PyPinDirection, Pin::AccessDirection)
+ DirectCmpMethod (PyPinDirection_Cmp, IsPyPinDirection, PyPinDirection)
+ DirectHashMethod(PyPinDirection_Hash, PyPinDirection)
+
+ extern void PyPinDirection_LinkPyType() {
+ trace << "PyPinDirection_LinkType()" << endl;
+ PyTypePinDirection.tp_dealloc = (destructor) PyPinDirection_DeAlloc;
+ PyTypePinDirection.tp_compare = (cmpfunc) PyPinDirection_Cmp;
+ PyTypePinDirection.tp_repr = (reprfunc) PyPinDirection_Repr;
+ PyTypePinDirection.tp_str = (reprfunc) PyPinDirection_Str;
+ PyTypePinDirection.tp_hash = (hashfunc) PyPinDirection_Hash;
+ PyTypePinDirection.tp_methods = PyPinDirection_Methods;
+ }
+
+
+#else // End of Python Module Code Part.
+
+
+// +=================================================================+
+// | "PyPinDirection" Shared Library Code Part |
+// +=================================================================+
+
+ // Link/Creation Method.
+ PyTypeObjectDefinitions(PinDirection)
+
+
+ extern void PyPinDirection_postModuleInit ()
+ {
+ PyObject* constant;
+
+ LoadObjectConstant(PyTypePinDirection.tp_dict,Pin::AccessDirection::UNDEFINED,"UNDEFINED");
+ LoadObjectConstant(PyTypePinDirection.tp_dict,Pin::AccessDirection::NORTH ,"NORTH");
+ LoadObjectConstant(PyTypePinDirection.tp_dict,Pin::AccessDirection::SOUTH ,"SOUTH");
+ LoadObjectConstant(PyTypePinDirection.tp_dict,Pin::AccessDirection::EAST ,"EAST");
+ LoadObjectConstant(PyTypePinDirection.tp_dict,Pin::AccessDirection::WEST ,"WEST");
+ }
+
+
+#endif // Shared Library Code Part.
+
+} // extern "C".
+
+} // Isobar namespace.
+
diff --git a/hurricane/src/isobar/PyPinPlacementStatus.cpp b/hurricane/src/isobar/PyPinPlacementStatus.cpp
new file mode 100644
index 00000000..120fd6c4
--- /dev/null
+++ b/hurricane/src/isobar/PyPinPlacementStatus.cpp
@@ -0,0 +1,108 @@
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2014-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
+// | C O R I O L I S |
+// | I s o b a r - Hurricane / Python Interface |
+// | |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
+// | =============================================================== |
+// | C++ Module : "./PyPinPlacementStatus.h" |
+// +-----------------------------------------------------------------+
+
+
+#include "hurricane/isobar/PyPinPlacementStatus.h"
+
+
+namespace Isobar {
+
+ using std::cerr;
+ using std::endl;
+ using std::hex;
+ using std::ostringstream;
+ using Hurricane::tab;
+ using Hurricane::in_trace;
+ using Hurricane::Error;
+ using Hurricane::Warning;
+ using Isobar::ProxyProperty;
+ using Isobar::ProxyError;
+ using Isobar::ConstructorError;
+ using Isobar::HurricaneError;
+ using Isobar::HurricaneWarning;
+ using Isobar::ParseOneArg;
+ using Isobar::ParseTwoArg;
+
+
+extern "C" {
+
+
+#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(PinPlacementStatus,netPlacementStatus,function)
+
+
+// +=================================================================+
+// | "PyPinPlacementStatus" Python Module Code Part |
+// +=================================================================+
+
+#if defined(__PYTHON_MODULE__)
+
+
+ // Standart Accessors (Attributes).
+
+
+ // Standart Destroy (Attribute).
+ // DBoDestroyAttribute(PyPinPlacementStatus_destroy,PyPinPlacementStatus)
+
+
+ PyMethodDef PyPinPlacementStatus_Methods[] =
+ { {NULL, NULL, 0, NULL} /* sentinel */
+ };
+//PyTypeObjectLinkPyType(Transformation::PinPlacementStatus)
+
+
+ PythonOnlyDeleteMethod(PinPlacementStatus)
+ DirectReprMethod(PyPinPlacementStatus_Repr, PyPinPlacementStatus, Pin::PlacementStatus)
+ DirectStrMethod (PyPinPlacementStatus_Str, PyPinPlacementStatus, Pin::PlacementStatus)
+ DirectCmpMethod (PyPinPlacementStatus_Cmp, IsPyPinPlacementStatus, PyPinPlacementStatus)
+ DirectHashMethod(PyPinPlacementStatus_Hash, PyPinPlacementStatus)
+
+ extern void PyPinPlacementStatus_LinkPyType() {
+ trace << "PyPinPlacementStatus_LinkType()" << endl;
+ PyTypePinPlacementStatus.tp_dealloc = (destructor) PyPinPlacementStatus_DeAlloc;
+ PyTypePinPlacementStatus.tp_compare = (cmpfunc) PyPinPlacementStatus_Cmp;
+ PyTypePinPlacementStatus.tp_repr = (reprfunc) PyPinPlacementStatus_Repr;
+ PyTypePinPlacementStatus.tp_str = (reprfunc) PyPinPlacementStatus_Str;
+ PyTypePinPlacementStatus.tp_hash = (hashfunc) PyPinPlacementStatus_Hash;
+ PyTypePinPlacementStatus.tp_methods = PyPinPlacementStatus_Methods;
+ }
+
+
+#else // End of Python Module Code Part.
+
+
+// +=================================================================+
+// | "PyPinPlacementStatus" Shared Library Code Part |
+// +=================================================================+
+
+ // Link/Creation Method.
+ PyTypeObjectDefinitions(PinPlacementStatus)
+
+
+ extern void PyPinPlacementStatus_postModuleInit ()
+ {
+ PyObject* constant;
+
+ LoadObjectConstant(PyTypePinPlacementStatus.tp_dict,Pin::PlacementStatus::UNPLACED,"UNPLACED");
+ LoadObjectConstant(PyTypePinPlacementStatus.tp_dict,Pin::PlacementStatus::PLACED ,"PLACED");
+ LoadObjectConstant(PyTypePinPlacementStatus.tp_dict,Pin::PlacementStatus::FIXED ,"FIXED");
+ }
+
+
+#endif // Shared Library Code Part.
+
+} // extern "C".
+
+} // Isobar namespace.
+
diff --git a/hurricane/src/isobar/PyPlacementStatus.cpp b/hurricane/src/isobar/PyPlacementStatus.cpp
new file mode 100644
index 00000000..3aee2c5a
--- /dev/null
+++ b/hurricane/src/isobar/PyPlacementStatus.cpp
@@ -0,0 +1,112 @@
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2014-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
+// | C O R I O L I S |
+// | I s o b a r - Hurricane / Python Interface |
+// | |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
+// | =============================================================== |
+// | C++ Module : "./PyPlacementStatus.h" |
+// +-----------------------------------------------------------------+
+
+
+#include "hurricane/isobar/PyPlacementStatus.h"
+
+
+namespace Isobar {
+
+ using std::cerr;
+ using std::endl;
+ using std::hex;
+ using std::ostringstream;
+ using Hurricane::tab;
+ using Hurricane::in_trace;
+ using Hurricane::Error;
+ using Hurricane::Warning;
+ using Isobar::ProxyProperty;
+ using Isobar::ProxyError;
+ using Isobar::ConstructorError;
+ using Isobar::HurricaneError;
+ using Isobar::HurricaneWarning;
+ using Isobar::ParseOneArg;
+ using Isobar::ParseTwoArg;
+
+
+extern "C" {
+
+
+#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(PlacementStatus,status,function)
+
+
+// +=================================================================+
+// | "PyPlacementStatus" Python Module Code Part |
+// +=================================================================+
+
+#if defined(__PYTHON_MODULE__)
+
+
+ // Standart Accessors (Attributes).
+
+
+ // Standart Destroy (Attribute).
+ // DBoDestroyAttribute(PyPlacementStatus_destroy,PyPlacementStatus)
+
+
+ PyMethodDef PyPlacementStatus_Methods[] =
+ { {NULL, NULL, 0, NULL} /* sentinel */
+ };
+
+
+//PythonOnlyDeleteMethod(Transformation::PlacementStatus)
+//PyTypeObjectLinkPyType(Transformation::PlacementStatus)
+
+
+ PythonOnlyDeleteMethod(PlacementStatus)
+
+ DirectReprMethod(PyPlacementStatus_Repr, PyPlacementStatus, Instance::PlacementStatus)
+ DirectStrMethod (PyPlacementStatus_Str, PyPlacementStatus, Instance::PlacementStatus)
+ DirectCmpMethod (PyPlacementStatus_Cmp, IsPyPlacementStatus, PyPlacementStatus)
+ DirectHashMethod(PyPlacementStatus_Hash, PyPlacementStatus)
+
+ extern void PyPlacementStatus_LinkPyType() {
+ trace << "PyPlacementStatus_LinkType()" << endl;
+ PyTypePlacementStatus.tp_dealloc = (destructor) PyPlacementStatus_DeAlloc;
+ PyTypePlacementStatus.tp_compare = (cmpfunc) PyPlacementStatus_Cmp;
+ PyTypePlacementStatus.tp_repr = (reprfunc) PyPlacementStatus_Repr;
+ PyTypePlacementStatus.tp_str = (reprfunc) PyPlacementStatus_Str;
+ PyTypePlacementStatus.tp_hash = (hashfunc) PyPlacementStatus_Hash;
+ PyTypePlacementStatus.tp_methods = PyPlacementStatus_Methods;
+ }
+
+
+#else // End of Python Module Code Part.
+
+
+// +=================================================================+
+// | "PyPlacementStatus" Shared Library Code Part |
+// +=================================================================+
+
+ // Link/Creation Method.
+ PyTypeObjectDefinitions(PlacementStatus)
+
+
+ extern void PyPlacementStatus_postModuleInit ()
+ {
+ PyObject* constant;
+
+ LoadObjectConstant(PyTypePlacementStatus.tp_dict,Instance::PlacementStatus::UNPLACED,"UNPLACED");
+ LoadObjectConstant(PyTypePlacementStatus.tp_dict,Instance::PlacementStatus::PLACED ,"PLACED");
+ LoadObjectConstant(PyTypePlacementStatus.tp_dict,Instance::PlacementStatus::FIXED ,"FIXED");
+ }
+
+
+#endif // Shared Library Code Part.
+
+} // extern "C".
+
+} // Isobar namespace.
+
diff --git a/hurricane/src/isobar/PyPoint.cpp b/hurricane/src/isobar/PyPoint.cpp
index c72a954a..37cc4b30 100644
--- a/hurricane/src/isobar/PyPoint.cpp
+++ b/hurricane/src/isobar/PyPoint.cpp
@@ -1,61 +1,22 @@
-
// -*- 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 2006-2014, All Rights Reserved
//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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: PyPoint.cpp,v 1.17 2006/09/22 11:27:32 tsunami Exp $
-//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Jean-Paul CHAPUT |
-// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Module : "./PyPoint.cpp" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
-
-
+// | C++ Module : "./PyPoint.cpp" |
+// +-----------------------------------------------------------------+
#include "hurricane/isobar/PyPoint.h"
-
namespace Isobar {
using namespace Hurricane;
@@ -78,6 +39,53 @@ extern "C" {
// x-------------------------------------------------------------x
+ // ---------------------------------------------------------------
+ // Attribute Method : "PyPoint_NEW ()"
+
+ static PyObject* PyPoint_NEW ( PyObject* module, PyObject *args )
+ {
+ trace << "PyPoint_NEW()" << endl;
+
+ Point* point;
+ PyObject* arg0;
+ PyObject* arg1;
+
+ __cs.init ("Point.Point");
+ if ( ! PyArg_ParseTuple(args,"|O&O&:Point.Point"
+ ,Converter,&arg0
+ ,Converter,&arg1
+ )) {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Point constructor." );
+ return NULL;
+ }
+
+ if ( __cs.getObjectIds() == NO_ARG ) { point = new Point (); }
+ else if ( __cs.getObjectIds() == POINT_ARG ) { point = new Point ( *PYPOINT_O(arg0) ); }
+ else if ( __cs.getObjectIds() == INTS2_ARG ) { point = new Point ( PyInt_AsLong(arg0)
+ , PyInt_AsLong(arg1) ); }
+ else {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Point constructor." );
+ return NULL;
+ }
+
+ PyPoint* pyPoint = PyObject_NEW(PyPoint, &PyTypePoint);
+ if (pyPoint == NULL) { return NULL; }
+
+ HTRY
+ pyPoint->_object = point;
+ HCATCH
+
+ return ( (PyObject*)pyPoint );
+ }
+
+
+ static int PyPoint_Init ( PyPoint* self, PyObject* args, PyObject* kwargs )
+ {
+ trace << "PyPoint_Init(): " << (void*)self << endl;
+ return 0;
+ }
+
+
// ---------------------------------------------------------------
// Attribute Method : "PyPoint_Translate ()"
@@ -140,7 +148,8 @@ extern "C" {
DirectDeleteMethod(PyPoint_DeAlloc,PyPoint)
- PyTypeObjectLinkPyType(Point)
+ PyTypeObjectLinkPyTypeNewInit(Point)
+//PyTypeObjectLinkPyType(Point)
#else // End of Python Module Code Part.
@@ -148,61 +157,14 @@ extern "C" {
// x=================================================================x
// | "PyPoint" Shared Library Code Part |
// x=================================================================x
-
-
- // ---------------------------------------------------------------
- // Attribute Method : "PyPoint_create ()"
-
- PyObject* PyPoint_create ( PyObject* module, PyObject *args )
- {
- trace << "PyPoint_create()" << endl;
-
- Point* point;
- PyObject* arg0;
- PyObject* arg1;
-
- __cs.init ("Point.create");
- if ( ! PyArg_ParseTuple(args,"|O&O&:Point.create"
- ,Converter,&arg0
- ,Converter,&arg1
- )) {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Point constructor." );
- return NULL;
- }
-
- if ( __cs.getObjectIds() == NO_ARG ) { point = new Point (); }
- else if ( __cs.getObjectIds() == POINT_ARG ) { point = new Point ( *PYPOINT_O(arg0) ); }
- else if ( __cs.getObjectIds() == INTS2_ARG ) { point = new Point ( PyInt_AsLong(arg0)
- , PyInt_AsLong(arg1) ); }
- else {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Point constructor." );
- return NULL;
- }
-
- PyPoint* pyPoint = PyObject_NEW(PyPoint, &PyTypePoint);
- if (pyPoint == NULL) { return NULL; }
-
- HTRY
- pyPoint->_object = point;
- HCATCH
-
- return ( (PyObject*)pyPoint );
- }
- // ---------------------------------------------------------------
- // PyPoint Object Definitions.
+
PyTypeObjectDefinitions(Point)
-#endif // End of Shared Library Code Part.
+#endif // Shared Library Code Part.
+} // extern "C".
-
-
-} // End of extern "C".
-
-
-
-
-} // End of Isobar namespace.
+} // Isobar namespace.
diff --git a/hurricane/src/isobar/PyReference.cpp b/hurricane/src/isobar/PyReference.cpp
index f23b85f2..e622a89b 100644
--- a/hurricane/src/isobar/PyReference.cpp
+++ b/hurricane/src/isobar/PyReference.cpp
@@ -1,17 +1,17 @@
-// x-----------------------------------------------------------------x
-// | |
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2008-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
-// | Author : Jean-Paul Chaput |
-// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== |
// | C++ Module : "./PyReference.cpp" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
-
+// +-----------------------------------------------------------------+
#include "hurricane/isobar/PyReference.h"
@@ -51,6 +51,49 @@ extern "C" {
GetNameMethod(Reference, reference)
+ // ---------------------------------------------------------------
+ // Attribute Method : "PyReference_create ()"
+
+ PyObject* PyReference_create ( PyObject*, PyObject *args ) {
+ trace << "PyReference_create()" << endl;
+ Reference* reference = NULL;
+
+ PyObject* arg0;
+ PyObject* arg1;
+ PyObject* arg2;
+ PyObject* arg3;
+
+ HTRY
+
+ __cs.init ("Reference.create");
+ if ( ! PyArg_ParseTuple(args,"O&O&O&|O&:Reference.create"
+ ,Converter,&arg0
+ ,Converter,&arg1
+ ,Converter,&arg2
+ ,Converter,&arg3
+ )) {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Reference constructor." );
+ return NULL;
+ }
+
+ if ( __cs.getObjectIds() == ":ent:string:int:int" )
+ reference = Reference::create ( PYCELL_O(arg0)
+ , Name(PyString_AsString(arg1))
+ , PyInt_AsLong(arg2)
+ , PyInt_AsLong(arg3) );
+ else if ( __cs.getObjectIds() == ":ent:name:point" )
+ reference = Reference::create ( PYCELL_O(arg0)
+ , Name(PyString_AsString(arg1))
+ , *PYPOINT_O(arg2) );
+ else {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Reference constructor." );
+ return NULL;
+ }
+
+ HCATCH
+ return PyReference_Link ( reference );
+ }
+
// ---------------------------------------------------------------
// Attribute Method : "PyReference_getPoint ()"
@@ -120,7 +163,9 @@ extern "C" {
// PyReference Attribute Method table.
PyMethodDef PyReference_Methods[] =
- { { "destroy" , (PyCFunction)PyReference_destroy , METH_NOARGS
+ { { "create" , (PyCFunction)PyReference_create , METH_NOARGS|METH_STATIC
+ , "Create a new Reference." }
+ , { "destroy" , (PyCFunction)PyReference_destroy , METH_NOARGS
, "destroy associated hurricane object, the python object remains." }
, { "getName" , (PyCFunction)PyReference_getName , METH_NOARGS , "Returns the name of the reference." }
, { "getPoint" , (PyCFunction)PyReference_getPoint , METH_NOARGS , "Return the reference point." }
@@ -146,50 +191,6 @@ extern "C" {
// x=================================================================x
// | "PyReference" Shared Library Code Part |
// x=================================================================x
-
-
- // ---------------------------------------------------------------
- // Attribute Method : "PyReference_create ()"
-
- PyObject* PyReference_create ( PyObject *module, PyObject *args ) {
- trace << "PyReference_create()" << endl;
- Reference* reference = NULL;
-
- PyObject* arg0;
- PyObject* arg1;
- PyObject* arg2;
- PyObject* arg3;
-
- HTRY
-
- __cs.init ("Reference.create");
- if ( ! PyArg_ParseTuple(args,"O&O&O&|O&:Reference.create"
- ,Converter,&arg0
- ,Converter,&arg1
- ,Converter,&arg2
- ,Converter,&arg3
- )) {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Reference constructor." );
- return NULL;
- }
-
- if ( __cs.getObjectIds() == ":ent:string:int:int" )
- reference = Reference::create ( PYCELL_O(arg0)
- , Name(PyString_AsString(arg1))
- , PyInt_AsLong(arg2)
- , PyInt_AsLong(arg3) );
- else if ( __cs.getObjectIds() == ":ent:name:point" )
- reference = Reference::create ( PYCELL_O(arg0)
- , Name(PyString_AsString(arg1))
- , *PYPOINT_O(arg2) );
- else {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Reference constructor." );
- return NULL;
- }
-
- HCATCH
- return PyReference_Link ( reference );
- }
diff --git a/hurricane/src/isobar/PyTransformation.cpp b/hurricane/src/isobar/PyTransformation.cpp
index 9d47d582..c4e4656a 100644
--- a/hurricane/src/isobar/PyTransformation.cpp
+++ b/hurricane/src/isobar/PyTransformation.cpp
@@ -1,26 +1,23 @@
+// -*- C++ -*-
//
-// $Id: PyTransformation.cpp,v 1.17 2007/01/30 14:47:24 cobell Exp $
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2006-2014, All Rights Reserved
//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Jean-Paul CHAPUT |
-// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Module : "./PyTransformation.cpp" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
-
-
+// | C++ Module : "./PyTransformation.cpp" |
+// +-----------------------------------------------------------------+
#include "hurricane/isobar/PyPoint.h"
#include "hurricane/isobar/PyBox.h"
#include "hurricane/isobar/PyTransformation.h"
+#include "hurricane/isobar/PyOrientation.h"
namespace Isobar {
@@ -40,27 +37,6 @@ extern "C" {
#if defined(__PYTHON_MODULE__)
- // x-------------------------------------------------------------x
- // | Global Constants Loading |
- // x-------------------------------------------------------------x
-
- extern void TransformationLoadConstants ( PyObject* dictionnary )
- {
- PyObject* constant;
-
- LOAD_CONSTANT ( Transformation::Orientation::ID, "OrientationID" )
- LOAD_CONSTANT ( Transformation::Orientation::R1, "OrientationR1" )
- LOAD_CONSTANT ( Transformation::Orientation::R2, "OrientationR2" )
- LOAD_CONSTANT ( Transformation::Orientation::R3, "OrientationR3" )
- LOAD_CONSTANT ( Transformation::Orientation::MX, "OrientationMX" )
- LOAD_CONSTANT ( Transformation::Orientation::XR, "OrientationXR" )
- LOAD_CONSTANT ( Transformation::Orientation::MY, "OrientationMY" )
- LOAD_CONSTANT ( Transformation::Orientation::YR, "OrientationYR" )
- }
-
-
-
-
// x-------------------------------------------------------------x
// | "PyTransformation" Attribute Methods |
// x-------------------------------------------------------------x
@@ -73,8 +49,82 @@ extern "C" {
// Standard destroy (Attribute).
DirectDestroyAttribute(PyTransformation_destroy, PyTransformation)
+
+
+ static Transformation::Orientation PyInt_AsOrientation ( PyObject* object ) {
+ switch ( PyInt_AsLong(object) ) {
+ case Transformation::Orientation::ID : return ( Transformation::Orientation(Transformation::Orientation::ID) );
+ case Transformation::Orientation::R1 : return ( Transformation::Orientation(Transformation::Orientation::R1) );
+ case Transformation::Orientation::R2 : return ( Transformation::Orientation(Transformation::Orientation::R2) );
+ case Transformation::Orientation::R3 : return ( Transformation::Orientation(Transformation::Orientation::R3) );
+ case Transformation::Orientation::MX : return ( Transformation::Orientation(Transformation::Orientation::MX) );
+ case Transformation::Orientation::XR : return ( Transformation::Orientation(Transformation::Orientation::XR) );
+ case Transformation::Orientation::MY : return ( Transformation::Orientation(Transformation::Orientation::MY) );
+ case Transformation::Orientation::YR : return ( Transformation::Orientation(Transformation::Orientation::YR) );
+ }
+
+ return ( Transformation::Orientation(Transformation::Orientation::ID) );
+ }
+ // ---------------------------------------------------------------
+ // Attribute Method : "PyTransformation_NEW ()"
+
+ static PyObject* PyTransformation_NEW (PyObject *module, PyObject *args) {
+ trace << "PyTransformation_NEW()" << endl;
+
+ Transformation* transf;
+ PyObject* arg0;
+ PyObject* arg1;
+ PyObject* arg2;
+
+ __cs.init ("Transformation.Transformation");
+ if ( ! PyArg_ParseTuple(args,"|O&O&O&:Transformation.Transformation"
+ ,Converter,&arg0
+ ,Converter,&arg1
+ ,Converter,&arg2
+ )) {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Transformation constructor." );
+ return NULL;
+ }
+
+ if ( __cs.getObjectIds() == NO_ARG ) { transf = new Transformation (); }
+ else if ( __cs.getObjectIds() == POINT_ARG ) { transf = new Transformation ( *PYPOINT_O(arg0) ); }
+ else if ( __cs.getObjectIds() == TRANS_ARG ) { transf = new Transformation ( *PYTRANSFORMATION_O(arg0) ); }
+ else if ( __cs.getObjectIds() == INTS2_ARG ) { transf = new Transformation ( PyInt_AsLong(arg0)
+ , PyInt_AsLong(arg1) ); }
+ else if ( __cs.getObjectIds() == POINT_INT_ARG ) { transf = new Transformation ( *PYPOINT_O(arg0)
+ , PyInt_AsOrientation(arg1) ); }
+ else if ( __cs.getObjectIds() == INTS3_ARG ) { transf = new Transformation ( PyInt_AsLong(arg0)
+ , PyInt_AsLong(arg1)
+ , PyInt_AsOrientation(arg2) ); }
+ else {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Transformation constructor." );
+ return NULL;
+ }
+
+ PyTransformation* pyTransformation = PyObject_NEW(PyTransformation, &PyTypeTransformation);
+ if (pyTransformation == NULL) { return NULL; }
+
+ trace_in ();
+ trace << "new PyTransformation [" << hex << pyTransformation << "]" << endl;
+ trace_out ();
+
+ HTRY
+
+ pyTransformation->_object = transf;
+
+ HCATCH
+
+ return (PyObject*)pyTransformation;
+ }
+
+
+ static int PyTransformation_Init ( PyTransformation* self, PyObject* args, PyObject* kwargs )
+ {
+ trace << "PyTransformation_Init(): " << (void*)self << endl;
+ return 0;
+ }
// ---------------------------------------------------------------
@@ -459,8 +509,6 @@ extern "C" {
}
-
-
// ---------------------------------------------------------------
// PyTransformation Attribute Method table.
@@ -487,14 +535,13 @@ extern "C" {
};
-
-
// x-------------------------------------------------------------x
// | "PyTransformation" Object Methods |
// x-------------------------------------------------------------x
DirectDeleteMethod(PyTransformation_DeAlloc,PyTransformation)
- PyTypeObjectLinkPyType(Transformation)
+ PyTypeObjectLinkPyTypeNewInit(Transformation)
+//PyTypeObjectLinkPyType(Transformation)
#else // End of Python Module Code Part.
@@ -503,84 +550,21 @@ extern "C" {
// x=================================================================x
// | "PyTransformation" Shared Library Code Part |
// x=================================================================x
-
- static Transformation::Orientation PyInt_AsOrientation ( PyObject* object ) {
- switch ( PyInt_AsLong(object) ) {
- case Transformation::Orientation::ID : return ( Transformation::Orientation(Transformation::Orientation::ID) );
- case Transformation::Orientation::R1 : return ( Transformation::Orientation(Transformation::Orientation::R1) );
- case Transformation::Orientation::R2 : return ( Transformation::Orientation(Transformation::Orientation::R2) );
- case Transformation::Orientation::R3 : return ( Transformation::Orientation(Transformation::Orientation::R3) );
- case Transformation::Orientation::MX : return ( Transformation::Orientation(Transformation::Orientation::MX) );
- case Transformation::Orientation::XR : return ( Transformation::Orientation(Transformation::Orientation::XR) );
- case Transformation::Orientation::MY : return ( Transformation::Orientation(Transformation::Orientation::MY) );
- case Transformation::Orientation::YR : return ( Transformation::Orientation(Transformation::Orientation::YR) );
- }
- return ( Transformation::Orientation(Transformation::Orientation::ID) );
- }
-
- // ---------------------------------------------------------------
- // Attribute Method : "PyTransformation_create ()"
-
- PyObject* PyTransformation_create (PyObject *module, PyObject *args) {
- trace << "PyTransformation_create()" << endl;
-
- Transformation* transf;
- PyObject* arg0;
- PyObject* arg1;
- PyObject* arg2;
-
- __cs.init ("Transformation.create");
- if ( ! PyArg_ParseTuple(args,"|O&O&O&:Transformation.create"
- ,Converter,&arg0
- ,Converter,&arg1
- ,Converter,&arg2
- )) {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Transformation constructor." );
- return NULL;
- }
-
- if ( __cs.getObjectIds() == NO_ARG ) { transf = new Transformation (); }
- else if ( __cs.getObjectIds() == POINT_ARG ) { transf = new Transformation ( *PYPOINT_O(arg0) ); }
- else if ( __cs.getObjectIds() == TRANS_ARG ) { transf = new Transformation ( *PYTRANSFORMATION_O(arg0) ); }
- else if ( __cs.getObjectIds() == INTS2_ARG ) { transf = new Transformation ( PyInt_AsLong(arg0)
- , PyInt_AsLong(arg1) ); }
- else if ( __cs.getObjectIds() == POINT_INT_ARG ) { transf = new Transformation ( *PYPOINT_O(arg0)
- , PyInt_AsOrientation(arg1) ); }
- else if ( __cs.getObjectIds() == INTS3_ARG ) { transf = new Transformation ( PyInt_AsLong(arg0)
- , PyInt_AsLong(arg1)
- , PyInt_AsOrientation(arg2) ); }
- else {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Transformation constructor." );
- return NULL;
- }
-
- PyTransformation* pyTransformation = PyObject_NEW(PyTransformation, &PyTypeTransformation);
- if (pyTransformation == NULL) { return NULL; }
-
- trace_in ();
- trace << "new PyTransformation [" << hex << pyTransformation << "]" << endl;
- trace_out ();
-
- HTRY
-
- pyTransformation->_object = transf;
-
- HCATCH
-
- return (PyObject*)pyTransformation;
- }
-
-
- // x-------------------------------------------------------------x
- // | "PyTransformation" Local Functions |
- // x-------------------------------------------------------------x
// ---------------------------------------------------------------
// PyTransformation Object Definitions.
PyTypeObjectDefinitions(Transformation)
+ extern void PyTransformation_postModuleInit ()
+ {
+ PyOrientation_postModuleInit();
+
+ PyDict_SetItemString( PyTypeTransformation.tp_dict, "Orientation", (PyObject*)&PyTypeOrientation );
+ }
+
+
#endif // End of Shared Library Code Part.
diff --git a/hurricane/src/isobar/PyVertical.cpp b/hurricane/src/isobar/PyVertical.cpp
index 470e01f2..cfc54be4 100644
--- a/hurricane/src/isobar/PyVertical.cpp
+++ b/hurricane/src/isobar/PyVertical.cpp
@@ -1,18 +1,17 @@
-// x-----------------------------------------------------------------x
-// | |
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2007-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
-// | Author : Sophie BELLOEIL |
-// | E-mail : Sophie.Belloeil@asim.lip6.fr |
+// | Author : Sophie BELLOEIL |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Module : "./PyVertical.cpp" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
-
-
+// | C++ Module : "./PyCell.cpp" |
+// +-----------------------------------------------------------------+
#include "hurricane/isobar/PyNet.h"
@@ -56,65 +55,10 @@ extern "C" {
DBoDestroyAttribute(PyVertical_destroy, PyVertical)
- // ---------------------------------------------------------------
- // Attribute Method : "PyVertical_translate ()"
-
- static PyObject* PyVertical_translate ( PyVertical *self, PyObject* args ) {
- trace << "PyVertical_translate ()" << endl;
-
- HTRY
- METHOD_HEAD ( "Vertical.translate()" )
- DbU::Unit dx=0, dy=0;
- if (PyArg_ParseTuple(args,"ll:Vertical.translate", &dx, &dy)) {
- vertical->translate(dx, dy);
- } else {
- PyErr_SetString ( ConstructorError, "invalid number of parameters for Vertical.translate()" );
- return NULL;
- }
- HCATCH
-
- Py_RETURN_NONE;
- }
-
-
- // ---------------------------------------------------------------
- // PyVertical Attribute Method table.
-
- PyMethodDef PyVertical_Methods[] =
- { { "getX" , (PyCFunction)PyVertical_getX , METH_NOARGS , "Get the segment X position." }
- , { "getDySource", (PyCFunction)PyVertical_getDySource, METH_NOARGS , "Get the segment source Y offset." }
- , { "getDyTarget", (PyCFunction)PyVertical_getDyTarget, METH_NOARGS , "Get the segment target Y offset." }
- , { "setX" , (PyCFunction)PyVertical_setX , METH_VARARGS, "Modify the segment X position." }
- , { "setDySource", (PyCFunction)PyVertical_setDySource, METH_VARARGS, "Modify the segment source Y offset." }
- , { "setDyTarget", (PyCFunction)PyVertical_setDyTarget, METH_VARARGS, "Modify the segment target Y offset." }
- , { "translate" , (PyCFunction)PyVertical_translate , METH_VARARGS, "Translates the Vertical segment of dx and dy." }
- , { "destroy" , (PyCFunction)PyVertical_destroy , METH_NOARGS
- , "Destroy associated hurricane object, the python object remains." }
- , {NULL, NULL, 0, NULL} /* sentinel */
- };
-
-
-
-
- // x-------------------------------------------------------------x
- // | "PyVertical" Object Methods |
- // x-------------------------------------------------------------x
-
- DBoDeleteMethod(Vertical)
- PyTypeObjectLinkPyType(Vertical)
-
-
-#else // End of Python Module Code Part.
-
-
-// x=================================================================x
-// | "PyVertical" Shared Library Code Part |
-// x=================================================================x
-
// ---------------------------------------------------------------
// Attribute Method : "PyVertical_create ()"
- PyObject* PyVertical_create ( PyObject *module, PyObject *args ) {
+ static PyObject* PyVertical_create ( PyObject*, PyObject *args ) {
trace << "PyVertical_create()" << endl;
PyObject* arg0;
@@ -201,6 +145,64 @@ extern "C" {
}
+ // ---------------------------------------------------------------
+ // Attribute Method : "PyVertical_translate ()"
+
+ static PyObject* PyVertical_translate ( PyVertical *self, PyObject* args ) {
+ trace << "PyVertical_translate ()" << endl;
+
+ HTRY
+ METHOD_HEAD ( "Vertical.translate()" )
+ DbU::Unit dx=0, dy=0;
+ if (PyArg_ParseTuple(args,"ll:Vertical.translate", &dx, &dy)) {
+ vertical->translate(dx, dy);
+ } else {
+ PyErr_SetString ( ConstructorError, "invalid number of parameters for Vertical.translate()" );
+ return NULL;
+ }
+ HCATCH
+
+ Py_RETURN_NONE;
+ }
+
+
+ // ---------------------------------------------------------------
+ // PyVertical Attribute Method table.
+
+ PyMethodDef PyVertical_Methods[] =
+ { { "create" , (PyCFunction)PyVertical_create , METH_VARARGS|METH_STATIC
+ , "Create a new Vertical." }
+ , { "getX" , (PyCFunction)PyVertical_getX , METH_NOARGS , "Get the segment X position." }
+ , { "getDySource", (PyCFunction)PyVertical_getDySource, METH_NOARGS , "Get the segment source Y offset." }
+ , { "getDyTarget", (PyCFunction)PyVertical_getDyTarget, METH_NOARGS , "Get the segment target Y offset." }
+ , { "setX" , (PyCFunction)PyVertical_setX , METH_VARARGS, "Modify the segment X position." }
+ , { "setDySource", (PyCFunction)PyVertical_setDySource, METH_VARARGS, "Modify the segment source Y offset." }
+ , { "setDyTarget", (PyCFunction)PyVertical_setDyTarget, METH_VARARGS, "Modify the segment target Y offset." }
+ , { "translate" , (PyCFunction)PyVertical_translate , METH_VARARGS, "Translates the Vertical segment of dx and dy." }
+ , { "destroy" , (PyCFunction)PyVertical_destroy , METH_NOARGS
+ , "Destroy associated hurricane object, the python object remains." }
+ , {NULL, NULL, 0, NULL} /* sentinel */
+ };
+
+
+
+
+ // x-------------------------------------------------------------x
+ // | "PyVertical" Object Methods |
+ // x-------------------------------------------------------------x
+
+ DBoDeleteMethod(Vertical)
+ PyTypeObjectLinkPyType(Vertical)
+
+
+#else // End of Python Module Code Part.
+
+
+// x=================================================================x
+// | "PyVertical" Shared Library Code Part |
+// x=================================================================x
+
+
// Link/Creation Method.
DBoLinkCreateMethod(Vertical)
diff --git a/hurricane/src/isobar/hurricane/isobar/PyBox.h b/hurricane/src/isobar/hurricane/isobar/PyBox.h
index dae9a8be..9e71b08f 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyBox.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyBox.h
@@ -1,91 +1,46 @@
-
// -*- 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 2006-2014, All Rights Reserved
//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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: PyBox.h,v 1.7 2006/05/03 14:00:01 jpc Exp $
-//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Jean-Paul CHAPUT |
-// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Header : "./PyBox.h" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Header : "./hurricane/isobar/PyBox.h" |
+// +-----------------------------------------------------------------+
-
-
-
-# ifndef __PYBOX__
-# define __PYBOX__
-
+#ifndef PY_BOX_H
+#define PY_BOX_H
#include "hurricane/isobar/PyHurricane.h"
-
#include "hurricane/Box.h"
namespace Isobar {
-
-extern "C" {
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyBox".
- typedef struct {
- PyObject_HEAD
- Hurricane::Box* _object;
- } PyBox;
-
-
+ typedef struct {
+ PyObject_HEAD
+ Hurricane::Box* _object;
+ } PyBox;
// -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.cpp".
- extern PyTypeObject PyTypeBox;
- extern PyMethodDef PyBox_Methods[];
+ extern PyTypeObject PyTypeBox;
+ extern PyMethodDef PyBox_Methods[];
- extern PyObject* PyBox_create ( PyObject* self, PyObject* args );
- extern void PyBox_LinkPyType ();
+ extern void PyBox_LinkPyType ();
#define IsPyBox(v) ( (v)->ob_type == &PyTypeBox )
@@ -93,13 +48,8 @@ extern "C" {
#define PYBOX_O(v) ( PYBOX(v)->_object )
-} // End of extern "C".
+ } // extern "C".
+} // Isobar namespace.
-
-} // End of Isobar namespace.
-
-
-
-
-# endif
+#endif // PY_BOX_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyCell.h b/hurricane/src/isobar/hurricane/isobar/PyCell.h
index 3fb14881..e432547a 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyCell.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyCell.h
@@ -1,60 +1,21 @@
-
// -*- 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 2006-2014, All Rights Reserved
//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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: PyCell.h,v 1.9 2006/05/03 14:00:01 jpc Exp $
-//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Jean-Paul CHAPUT |
-// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Header : "./PyCell.h" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Header : "./hurricane/isobar/PyCell.h" |
+// +-----------------------------------------------------------------+
-
-
-
-#ifndef __PYCELL__
-#define __PYCELL__
+#ifndef PY_CELL_H
+#define PY_CELL_H
#include "hurricane/isobar/PyEntity.h"
#include "hurricane/Cell.h"
@@ -62,26 +23,25 @@
namespace Isobar {
-extern "C" {
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyCell".
- typedef struct {
- PyEntity _baseObject;
- } PyCell;
+ typedef struct {
+ PyEntity _baseObject;
+ } PyCell;
// -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp".
- extern PyTypeObject PyTypeCell;
- extern PyMethodDef PyCell_Methods[];
+ extern PyTypeObject PyTypeCell;
+ extern PyMethodDef PyCell_Methods[];
- extern PyObject* PyCell_create ( PyObject* module, PyObject* args );
- extern PyObject* PyCell_Link ( Hurricane::Cell* object );
- extern void PyCell_LinkPyType ();
+ extern PyObject* PyCell_Link ( Hurricane::Cell* object );
+ extern void PyCell_LinkPyType ();
#define IsPyCell(v) ((v)->ob_type == &PyTypeCell)
@@ -89,11 +49,8 @@ extern "C" {
#define PYCELL_O(v) (static_cast(PYCELL(v)->_baseObject._object))
-} // End of extern "C".
+ } // extern "C".
-
-
-
-} // End of Isobar namespace.
+} // Isobar namespace.
-#endif
+#endif // PY_CELL_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyContact.h b/hurricane/src/isobar/hurricane/isobar/PyContact.h
index aadee437..c45e3cfa 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyContact.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyContact.h
@@ -1,92 +1,46 @@
-
// -*- 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 2006-2014, All Rights Reserved
//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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: PyContact.h,v 1.6 2006/05/03 14:00:02 jpc Exp $
-//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
-// | Author : Jean-Paul Chaput |
-// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Header : "./PyContact.h" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Header : "./hurricane/isobar/PyContact.h" |
+// +-----------------------------------------------------------------+
-
-
-
-#ifndef __PYCONTACT__
-#define __PYCONTACT__
-
+#ifndef PY_CONTACT_H
+#define PY_CONTACT_H
#include "hurricane/isobar/PyComponent.h"
-
#include "hurricane/Contact.h"
namespace Isobar {
-extern "C" {
-
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyContact".
- typedef struct {
- PyComponent _baseObject;
- } PyContact;
-
-
+ typedef struct {
+ PyComponent _baseObject;
+ } PyContact;
// -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp".
- extern PyTypeObject PyTypeContact;
- extern PyMethodDef PyContact_Methods[];
+ extern PyTypeObject PyTypeContact;
+ extern PyMethodDef PyContact_Methods[];
- extern PyObject* PyContact_create ( PyObject* module, PyObject* args );
- extern PyObject* PyContact_Link ( Hurricane::Contact* object );
- extern void PyContact_LinkPyType ();
-
+ extern PyObject* PyContact_Link ( Hurricane::Contact* object );
+ extern void PyContact_LinkPyType ();
#define IsPyContact(v) ( (v)->ob_type == &PyTypeContact )
@@ -94,14 +48,8 @@ extern "C" {
#define PYCONTACT_O(v) ( PYCONTACT(v)->_baseObject._baseObject._object )
-} // End of extern "C".
+ } // extern "C".
+} // Isobar namespace.
-
-
-} // End of Isobar namespace.
-
-
-
-
-#endif
+#endif // PY_CONTACT_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyDataBase.h b/hurricane/src/isobar/hurricane/isobar/PyDataBase.h
index 86222488..eaf3863d 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyDataBase.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyDataBase.h
@@ -1,95 +1,47 @@
-
// -*- 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-2014, All Rights Reserved
//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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: PyDataBase.h,v 1.1 2008/02/07 19:09:58 xtof Exp $
-//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== |
-// | C++ Header : "./PyDataBase.h" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Header : "./hurricane/isobar/PyDataBase.h" |
+// +-----------------------------------------------------------------+
-
-
-
-#ifndef __PYDATABASE__
-#define __PYDATABASE__
-
+#ifndef PY_DATABASE_H
+#define PY_DATABASE_H
#include "hurricane/isobar/PyHurricane.h"
-
#include "hurricane/DataBase.h"
namespace Isobar {
-
-extern "C" {
-
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyDataBase".
- typedef struct {
- PyObject_HEAD
- Hurricane::DataBase* _object;
- } PyDataBase;
-
-
+ typedef struct {
+ PyObject_HEAD
+ Hurricane::DataBase* _object;
+ } PyDataBase;
// -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp".
- extern PyTypeObject PyTypeDataBase;
- extern PyMethodDef PyDataBase_Methods[];
+ extern PyTypeObject PyTypeDataBase;
+ extern PyMethodDef PyDataBase_Methods[];
- extern PyObject* PyDataBase_create ( PyObject* module );
- extern PyObject* PyDataBase_getDB ( PyObject* module );
- extern PyObject* PyDataBase_getDataBase ( PyObject* module );
- extern PyObject* PyDataBase_Link ( Hurricane::DataBase* db );
- extern void PyDataBase_LinkPyType ();
+ extern PyObject* PyDataBase_Link ( Hurricane::DataBase* db );
+ extern void PyDataBase_LinkPyType ();
#define IsPyDataBase(v) ( (v)->ob_type == &PyTypeDataBase )
@@ -97,14 +49,8 @@ extern "C" {
#define PYDATABASE_O(v) ( PYDATABASE(v)->_object )
-} // End of extern "C".
+ } // extern "C".
+} // Isobar namespace.
-
-
-} // End of Isobar namespace.
-
-
-
-
-# endif
+#endif // PY_DATABASE_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyHorizontal.h b/hurricane/src/isobar/hurricane/isobar/PyHorizontal.h
index a3646d6b..b8267f5d 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyHorizontal.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyHorizontal.h
@@ -1,92 +1,46 @@
-
// -*- 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 2007-2014, All Rights Reserved
//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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: PyHorizontal.h,v 1.6 2007/01/30 14:47:24 cobell Exp $
-//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
-// | Author : Sophie BELLOEIL |
-// | E-mail : Sophie.Belloeil@asim.lip6.fr |
+// | Author : Sophie BELLOEIL |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Header : "./PyHorizontal.h" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Header : "./hurricane/isobar/PyCell.h" |
+// +-----------------------------------------------------------------+
-
-
-
-#ifndef __PYHORIZONTAL__
-#define __PYHORIZONTAL__
-
+#ifndef PY_HORIZONTAL_H
+#define PY_HORIZONTAL_H
#include "hurricane/isobar/PySegment.h"
-
#include "hurricane/Horizontal.h"
namespace Isobar {
-
-extern "C" {
-
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyHorizontal".
- typedef struct {
- PySegment _baseObject;
- } PyHorizontal;
-
-
+ typedef struct {
+ PySegment _baseObject;
+ } PyHorizontal;
// -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp".
- extern PyTypeObject PyTypeHorizontal;
- extern PyMethodDef PyHorizontal_Methods[];
+ extern PyTypeObject PyTypeHorizontal;
+ extern PyMethodDef PyHorizontal_Methods[];
- extern PyObject* PyHorizontal_create ( PyObject* module, PyObject* args );
- extern PyObject* PyHorizontal_Link ( Hurricane::Horizontal* object );
- extern void PyHorizontal_LinkPyType ();
+ extern PyObject* PyHorizontal_Link ( Hurricane::Horizontal* object );
+ extern void PyHorizontal_LinkPyType ();
@@ -95,14 +49,8 @@ extern "C" {
#define PYHORIZONTAL_O(v) ( PYHORIZONTAL(v)->_baseObject._baseObject._baseObject._object )
-} // End of extern "C".
+ } // extern "C".
+} // Isobar namespace.
-
-
-} // End of Isobar namespace.
-
-
-
-
-#endif
+#endif // PY_HORIZONTAL_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyHyperNet.h b/hurricane/src/isobar/hurricane/isobar/PyHyperNet.h
index 8e027c78..18a1f007 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyHyperNet.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyHyperNet.h
@@ -1,88 +1,47 @@
-
// -*- 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 2007-2014, All Rights Reserved
//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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: PyHyperNet.h,v 1.2 2007/05/10 11:15:56 d2 Exp $
-//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
-// | Author : Damien DUPUIS |
-// | E-mail : Damien.Dupuis@lip6.fr |
+// | Author : Damien DUPUIS |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Header : "./PyHyperNet.h" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Header : "./hurricane/isobar/PyHyperNet.h" |
+// +-----------------------------------------------------------------+
-#ifndef __PYHYPERNET__
-#define __PYHYPERNET__
+#ifndef PY_HYPERNET_H
+#define PY_HYPERNET_H
#include "hurricane/isobar/PyHurricane.h"
-
#include "hurricane/HyperNet.h"
namespace Isobar {
-
-extern "C" {
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyHyperNet".
- typedef struct {
- PyObject_HEAD
- Hurricane::HyperNet* _object;
- } PyHyperNet;
-
-
+ typedef struct {
+ PyObject_HEAD
+ Hurricane::HyperNet* _object;
+ } PyHyperNet;
// -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp".
- extern PyTypeObject PyTypeHyperNet;
- extern PyMethodDef PyHyperNet_Methods[];
+ extern PyTypeObject PyTypeHyperNet;
+ extern PyMethodDef PyHyperNet_Methods[];
- extern PyObject* PyHyperNet_create ( PyObject* module, PyObject* args );
- extern void PyHyperNet_LinkPyType();
+ extern void PyHyperNet_LinkPyType();
#define IsPyHyperNet(v) ( (v)->ob_type == &PyTypeHyperNet )
@@ -90,14 +49,8 @@ extern "C" {
#define PYHYPERNET_O(v) ( PYHYPERNET(v)->_object )
-} // End of extern "C".
+ } // extern "C".
+} // Isobar namespace.
-
-
-} // End of Isobar namespace.
-
-
-
-
-# endif
+#endif // PY_HYPERNET_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyInstance.h b/hurricane/src/isobar/hurricane/isobar/PyInstance.h
index 8ab47c96..878939fe 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyInstance.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyInstance.h
@@ -1,84 +1,40 @@
-
// -*- 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 2006-2014, All Rights Reserved
//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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: PyInstance.h,v 1.9 2006/05/03 14:00:03 jpc Exp $
-//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Jean-Paul CHAPUT |
-// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Header : "./PyInstance.h" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Header : "./hurricane/isobar/PyInstance.h" |
+// +-----------------------------------------------------------------+
-
-
-
-#ifndef __PYINSTANCE__
-#define __PYINSTANCE__
+#ifndef PY_INSTANCE_H
+#define PY_INSTANCE_H
#include "hurricane/isobar/PyEntity.h"
-
#include "hurricane/Instance.h"
namespace Isobar {
-
-using namespace Hurricane;
+ using namespace Hurricane;
-extern "C" {
-
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyInstance".
- typedef struct {
- PyEntity _baseObject;
- } PyInstance;
-
-
+ typedef struct {
+ PyEntity _baseObject;
+ } PyInstance;
// -------------------------------------------------------------------
@@ -87,11 +43,9 @@ extern "C" {
extern PyTypeObject PyTypeInstance;
extern PyMethodDef PyInstance_Methods[];
- extern PyObject* PyInstance_create ( PyObject* module, PyObject* args );
- extern PyObject* PyInstance_Link ( Hurricane::Instance* object);
- extern void InstanceLoadConstants ( PyObject* dictionnary );
- extern void PyInstance_LinkPyType ();
-
+ extern PyObject* PyInstance_Link ( Hurricane::Instance* object);
+ extern void PyInstance_LinkPyType ();
+ extern void PyInstance_postModuleInit ();
#define IsPyInstance(v) ((v)->ob_type == &PyTypeInstance )
@@ -99,14 +53,8 @@ extern "C" {
#define PYINSTANCE_O(v) (static_cast(PYINSTANCE(v)->_baseObject._object))
-} // End of extern "C".
+ } // extern "C".
+} // Isobar namespace.
-
-
-} // End of Isobar namespace.
-
-
-
-
-#endif
+#endif // PY_INSTANCE_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyLibrary.h b/hurricane/src/isobar/hurricane/isobar/PyLibrary.h
index 11a19632..8f4c7bce 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyLibrary.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyLibrary.h
@@ -1,93 +1,50 @@
-
// -*- 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-2014, All Rights Reserved
//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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: PyLibrary.h,v 1.7 2006/05/03 14:00:03 jpc Exp $
-//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== |
-// | C++ Header : "./PyLibrary.h" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Module : "./PyLibrary.cpp" |
+// +-----------------------------------------------------------------+
-#ifndef __PYLIBRARY__
-#define __PYLIBRARY__
+#ifndef PY_LIBRARY_H
+#define PY_LIBRARY_H
#include "hurricane/isobar/PyHurricane.h"
-
#include "hurricane/Library.h"
namespace Isobar {
-
-using namespace Hurricane;
+ using namespace Hurricane;
-extern "C" {
-
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyLibrary".
- typedef struct {
- PyObject_HEAD
- Library* _object;
- } PyLibrary;
-
-
+ typedef struct {
+ PyObject_HEAD
+ Library* _object;
+ } PyLibrary;
// -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp".
- extern PyTypeObject PyTypeLibrary;
- extern PyMethodDef PyLibrary_Methods[];
+ extern PyTypeObject PyTypeLibrary;
+ extern PyMethodDef PyLibrary_Methods[];
- extern PyObject* PyLibrary_create ( PyObject* module, PyObject* args );
- extern PyObject* PyLibrary_getLibrary ( PyObject* module );
- extern PyObject* PyLibrary_Link ( Hurricane::Library* lib );
- extern void PyLibrary_LinkPyType ();
+ extern PyObject* PyLibrary_Link ( Hurricane::Library* lib );
+ extern void PyLibrary_LinkPyType ();
#define IsPyLibrary(v) ( (v)->ob_type == &PyTypeLibrary )
@@ -95,11 +52,8 @@ extern "C" {
#define PYLIBRARY_O(v) ( PYLIBRARY(v)->_object )
-} // End of extern "C".
+} // extern "C".
-
-
-
-} // End of Isobar namespace.
+} // Isobar namespace.
-# endif
+# endif // PY_LIBRARY_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyNet.h b/hurricane/src/isobar/hurricane/isobar/PyNet.h
index a1d64eb3..d102b649 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyNet.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyNet.h
@@ -1,56 +1,48 @@
-// x-----------------------------------------------------------------x
-// | |
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2006-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
-// | Author : Sophie BELLOEIL |
-// | E-mail : Sophie.Belloeil@asim.lip6.fr |
+// | Author : Sophie BELLOEIL |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Header : "./PyNet.h" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Header : "./hurricane/isobar/PyNet.h" |
+// +-----------------------------------------------------------------+
-
-
-
-#ifndef __PYNET__
-#define __PYNET__
-
+#ifndef PY_NET_H
+#define PY_NET_H
#include "hurricane/isobar/PyEntity.h"
-
#include "hurricane/Net.h"
namespace Isobar {
-
-extern "C" {
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyNet".
- typedef struct {
- PyEntity _baseObject;
- } PyNet;
-
-
+ typedef struct {
+ PyEntity _baseObject;
+ } PyNet;
// -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp".
- extern PyTypeObject PyTypeNet;
- extern PyMethodDef PyNet_Methods[];
+ extern PyTypeObject PyTypeNet;
+ extern PyMethodDef PyNet_Methods[];
- extern PyObject* PyNet_create ( PyObject* module, PyObject* args );
- extern PyObject* PyNet_Link ( Hurricane::Net* object );
- extern void NetLoadConstants ( PyObject* dictionnary );
- extern void PyNet_LinkPyType ();
+ extern PyObject* PyNet_Link ( Hurricane::Net* object );
+ extern void PyNet_LinkPyType ();
+ extern void PyNet_postModuleInit ();
@@ -59,14 +51,8 @@ extern "C" {
#define PYNET_O(v) (dynamic_cast(PYNET(v)->_baseObject._object))
-} // End of extern "C".
+ } // extern "C".
+} // Isobar namespace.
-
-
-} // End of Isobar namespace.
-
-
-
-
-#endif
+#endif // PY_NET_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyNetDirection.h b/hurricane/src/isobar/hurricane/isobar/PyNetDirection.h
new file mode 100644
index 00000000..aa874117
--- /dev/null
+++ b/hurricane/src/isobar/hurricane/isobar/PyNetDirection.h
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2014-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
+// | C O R I O L I S |
+// | I s o b a r - Hurricane / Python Interface |
+// | |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
+// | =============================================================== |
+// | C++ Header : "./hurricane/isobar/PyNetDirection.h" |
+// +-----------------------------------------------------------------+
+
+
+#ifndef PY_NET_DIRECTION_H
+#define PY_NET_DIRECTION_H
+
+
+#include "hurricane/isobar/PyHurricane.h"
+#include "hurricane/Net.h"
+
+
+namespace Isobar {
+
+ extern "C" {
+
+
+// -------------------------------------------------------------------
+// Python Object : "PyNetDirection".
+
+ typedef struct {
+ PyObject_HEAD
+ Hurricane::Net::Direction* _object;
+ } PyNetDirection;
+
+
+// -------------------------------------------------------------------
+// Functions & Types exported to "PyHurricane.ccp".
+
+ extern PyTypeObject PyTypeNetDirection;
+ extern PyMethodDef PyNetDirection_Methods[];
+
+ extern PyObject* PyNetDirection_Link ( Hurricane::Net::Direction* );
+ extern void PyNetDirection_LinkPyType ();
+ extern void PyNetDirection_postModuleInit ();
+
+
+# define IsPyNetDirection(v) ( (v)->ob_type == &PyTypeNetDirection )
+# define PYNETDIRECTION(v) ( (PyNetDirection*)(v) )
+# define PYNETDIRECTION_O(v) ( PYNETDIRECTION(v)->_object )
+
+
+ } // extern "C".
+
+} // Isobar namespace.
+
+#endif // PY_NET_DIRECTION_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyNetType.h b/hurricane/src/isobar/hurricane/isobar/PyNetType.h
new file mode 100644
index 00000000..fee7d659
--- /dev/null
+++ b/hurricane/src/isobar/hurricane/isobar/PyNetType.h
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2014-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
+// | C O R I O L I S |
+// | I s o b a r - Hurricane / Python Interface |
+// | |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
+// | =============================================================== |
+// | C++ Header : "./hurricane/isobar/PyNetType.h" |
+// +-----------------------------------------------------------------+
+
+
+#ifndef PY_NET_TYPE_H
+#define PY_NET_TYPE_H
+
+
+#include "hurricane/isobar/PyHurricane.h"
+#include "hurricane/Net.h"
+
+
+namespace Isobar {
+
+ extern "C" {
+
+
+// -------------------------------------------------------------------
+// Python Object : "PyTransformation".
+
+ typedef struct {
+ PyObject_HEAD
+ Hurricane::Net::Type* _object;
+ } PyNetType;
+
+
+// -------------------------------------------------------------------
+// Functions & Types exported to "PyHurricane.ccp".
+
+ extern PyTypeObject PyTypeNetType;
+ extern PyMethodDef PyNetType_Methods[];
+
+ extern PyObject* PyNetType_Link ( Hurricane::Net::Type* );
+ extern void PyNetType_LinkPyType ();
+ extern void PyNetType_postModuleInit ();
+
+
+# define IsPyNetType(v) ( (v)->ob_type == &PyTypeNetType )
+# define PYNETTYPE(v) ( (PyNetType*)(v) )
+# define PYNETTYPE_O(v) ( PYNETTYPE(v)->_object )
+
+
+ } // extern "C".
+
+} // Isobar namespace.
+
+#endif // PY_NET_TYPE_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyOccurrence.h b/hurricane/src/isobar/hurricane/isobar/PyOccurrence.h
index be5d8d51..8c344b12 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyOccurrence.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyOccurrence.h
@@ -1,91 +1,46 @@
-
// -*- 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 2006-2014, All Rights Reserved
//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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: PyOccurrence.h,v 1.2 2006/05/03 14:00:03 jpc Exp $
-//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Jean-Paul CHAPUT |
-// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Header : "./PyOccurrence.h" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Header : "./hurricane/isobar/PyOccurrence.h" |
+// +-----------------------------------------------------------------+
-
-
-
-# ifndef __PYOCCURRENCE__
-# define __PYOCCURRENCE__
-
+#ifndef PY_OCCURRENCE_H
+#define PY_OCCURRENCE_H
#include "hurricane/isobar/PyHurricane.h"
-
#include "hurricane/Occurrence.h"
namespace Isobar {
-
-extern "C" {
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyOccurrence".
- typedef struct {
- PyObject_HEAD
- Hurricane::Occurrence* _object;
- } PyOccurrence;
-
-
+ typedef struct {
+ PyObject_HEAD
+ Hurricane::Occurrence* _object;
+ } PyOccurrence;
// -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.cpp".
- extern PyTypeObject PyTypeOccurrence;
- extern PyMethodDef PyOccurrence_Methods[];
+ extern PyTypeObject PyTypeOccurrence;
+ extern PyMethodDef PyOccurrence_Methods[];
- extern PyObject* PyOccurrence_create ( PyObject* module, PyObject* args );
- extern void PyOccurrence_LinkPyType ();
+ extern void PyOccurrence_LinkPyType ();
#define IsPyOccurrence(v) ( (v)->ob_type == &PyTypeOccurrence )
@@ -93,14 +48,8 @@ extern "C" {
#define PYOCCURRENCE_O(v) ( PYOCCURRENCE(v)->_object )
-} // End of extern "C".
+ } // extern "C".
+} // Isobar namespace.
-
-
-} // End of Isobar namespace.
-
-
-
-
-# endif
+#endif // PY_OCCURRENCE_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyOrientation.h b/hurricane/src/isobar/hurricane/isobar/PyOrientation.h
new file mode 100644
index 00000000..a5262298
--- /dev/null
+++ b/hurricane/src/isobar/hurricane/isobar/PyOrientation.h
@@ -0,0 +1,57 @@
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2014-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
+// | C O R I O L I S |
+// | I s o b a r - Hurricane / Python Interface |
+// | |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
+// | =============================================================== |
+// | C++ Header : "./hurricane/isobar/PyOrientation.h" |
+// +-----------------------------------------------------------------+
+
+
+#ifndef PY_ORIENTATION_H
+#define PY_ORIENTATION_H
+
+#include "hurricane/isobar/PyHurricane.h"
+#include "hurricane/Transformation.h"
+
+
+namespace Isobar {
+
+ extern "C" {
+
+// -------------------------------------------------------------------
+// Python Object : "PyOrientation".
+
+ typedef struct {
+ PyObject_HEAD
+ Hurricane::Transformation::Orientation* _object;
+ } PyOrientation;
+
+
+// -------------------------------------------------------------------
+// Functions & Types exported to "PyHurricane.ccp".
+
+ extern PyTypeObject PyTypeOrientation;
+ extern PyMethodDef PyOrientation_Methods[];
+
+ extern PyObject* PyOrientation_Link ( Hurricane::Transformation::Orientation* );
+ extern void PyOrientation_LinkPyType ();
+ extern void PyOrientation_postModuleInit ();
+
+
+#define IsPyOrientation(v) ( (v)->ob_type == &PyTypeOrientation )
+#define PYORIENTATION(v) ( (PyOrientation*)(v) )
+#define PYORIENTATION_O(v) ( PYORIENTATION(v)->_object )
+
+
+ } // End of extern "C".
+
+} // End of Isobar namespace.
+
+#endif // PY_ORIENTATION_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyPad.h b/hurricane/src/isobar/hurricane/isobar/PyPad.h
index a17072a4..fc4df9b3 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyPad.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyPad.h
@@ -1,37 +1,47 @@
-#ifndef __PYPAD_H
-#define __PYPAD_H
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2006-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
+// | C O R I O L I S |
+// | I s o b a r - Hurricane / Python Interface |
+// | |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
+// | =============================================================== |
+// | C++ Header : "./hurricane/isobar/PyPad.h" |
+// +-----------------------------------------------------------------+
+#ifndef PY_PAD_H
+#define PY_PAD_H
+
#include "hurricane/isobar/PyComponent.h"
-
#include "hurricane/Pad.h"
namespace Isobar {
-
-extern "C" {
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyPad".
- typedef struct {
- PyComponent _baseObject;
- } PyPad;
-
-
+ typedef struct {
+ PyComponent _baseObject;
+ } PyPad;
// -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp".
- extern PyTypeObject PyTypePad;
- extern PyMethodDef PyPad_Methods[];
+ extern PyTypeObject PyTypePad;
+ extern PyMethodDef PyPad_Methods[];
- extern PyObject* PyPad_create ( PyObject* module, PyObject* args );
- extern PyObject* PyPad_Link ( Hurricane::Pad* object );
- extern void PyPad_LinkPyType ();
+ extern PyObject* PyPad_Link ( Hurricane::Pad* object );
+ extern void PyPad_LinkPyType ();
#define IsPyPad(v) ( (v)->ob_type == &PyTypePad )
@@ -39,14 +49,8 @@ extern "C" {
#define PYPAD_O(v) ( PYPAD(v)->_baseObject._baseObject._object )
-} // End of extern "C".
+ } // extern "C".
+} // Isobar namespace.
-
-
-} // End of Isobar namespace.
-
-
-
-
-#endif /* __PYPAD_H */
+#endif // PY_PAD_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyPath.h b/hurricane/src/isobar/hurricane/isobar/PyPath.h
index 0327c031..b24e3644 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyPath.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyPath.h
@@ -1,91 +1,46 @@
-
// -*- 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 2006-2014, All Rights Reserved
//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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: PyPath.h,v 1.2 2006/05/03 14:00:04 jpc Exp $
-//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Jean-Paul CHAPUT |
-// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Header : "./PyPath.h" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Header : "./hurricane/isobar/PyPath.h" |
+// +-----------------------------------------------------------------+
-
-
-
-#ifndef __PYPATH__
-#define __PYPATH__
-
+#ifndef PY_PATH_H
+#define PY_PATH_H
#include "hurricane/isobar/PyHurricane.h"
-
#include "hurricane/Path.h"
namespace Isobar {
-
-extern "C" {
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyPath".
- typedef struct {
- PyObject_HEAD
- Hurricane::Path* _object;
- } PyPath;
-
-
+ typedef struct {
+ PyObject_HEAD
+ Hurricane::Path* _object;
+ } PyPath;
// -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.cpp".
- extern PyTypeObject PyTypePath;
- extern PyMethodDef PyPath_Methods[];
+ extern PyTypeObject PyTypePath;
+ extern PyMethodDef PyPath_Methods[];
- extern PyObject* PyPath_create ( PyObject* module, PyObject* args );
- extern void PyPath_LinkPyType ();
+ extern void PyPath_LinkPyType ();
#define IsPyPath(v) ( (v)->ob_type == &PyTypePath )
@@ -93,14 +48,8 @@ extern "C" {
#define PYPATH_O(v) ( PYPATH(v)->_object )
-} // End of extern "C".
+ } // extern "C".
+} // Isobar namespace.
-
-
-} // End of Isobar namespace.
-
-
-
-
-#endif
+#endif // PY_PATH_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyPin.h b/hurricane/src/isobar/hurricane/isobar/PyPin.h
index ec70838b..f7095cad 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyPin.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyPin.h
@@ -1,93 +1,56 @@
-
// -*- 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 2006-2014, All Rights Reserved
//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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: PyPin.h,v 1.9 2006/11/29 10:40:25 d2 Exp $
-//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Damien DUPUIS |
-// | E-mail : Damien.Dupuis@asim.lip6.fr |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Header : "./PyPin.h" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Header : "./hurricane/isobar/PyPin.h" |
+// +-----------------------------------------------------------------+
-#ifndef __PYPIN__
-#define __PYPIN__
+
+#ifndef PY_PIN_H
+#define PY_PIN_H
#include "hurricane/isobar/PyContact.h"
#include "hurricane/Pin.h"
namespace Isobar {
-
-using namespace Hurricane;
-extern "C" {
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyPin".
- typedef struct {
- PyContact _baseObject;
- } PyPin;
+ typedef struct {
+ PyContact _baseObject;
+ } PyPin;
// -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp".
- extern PyTypeObject PyTypePin;
- extern PyMethodDef PyPin_Methods[];
+ extern PyTypeObject PyTypePin;
+ extern PyMethodDef PyPin_Methods[];
- extern PyObject* PyPin_create ( PyObject* module, PyObject* args );
- extern PyObject* PyPin_Link (Hurricane::Pin* object );
- extern void PinLoadConstants ( PyObject* dictionnary );
- extern void PyPin_LinkPyType ();
+ extern PyObject* PyPin_Link (Hurricane::Pin* object );
+ extern void PyPin_LinkPyType ();
+ extern void PyPin_postModuleInit ();
# define IsPyPin(v) ( (v)->ob_type == &PyTypePin )
# define PYPIN(v) ( (PyPin*)(v) )
# define PYPIN_O(v) ( PYPIN(v)->_baseObject._baseObject._baseObject._object )
-} // End of extern "C".
-} // End of Isobar namespace.
+ } // extern "C".
-# endif
+} // Isobar namespace.
+
+#endif // PY_PIN_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyPinDirection.h b/hurricane/src/isobar/hurricane/isobar/PyPinDirection.h
new file mode 100644
index 00000000..2bb54bd1
--- /dev/null
+++ b/hurricane/src/isobar/hurricane/isobar/PyPinDirection.h
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2014-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
+// | C O R I O L I S |
+// | I s o b a r - Hurricane / Python Interface |
+// | |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
+// | =============================================================== |
+// | C++ Header : "./hurricane/isobar/PyPinDirection.h" |
+// +-----------------------------------------------------------------+
+
+
+#ifndef PY_PIN_DIRECTION_H
+#define PY_PIN_DIRECTION_H
+
+
+#include "hurricane/isobar/PyHurricane.h"
+#include "hurricane/Pin.h"
+
+
+namespace Isobar {
+
+ extern "C" {
+
+
+// -------------------------------------------------------------------
+// Python Object : "PyPinDirection".
+
+ typedef struct {
+ PyObject_HEAD
+ Hurricane::Pin::AccessDirection* _object;
+ } PyPinDirection;
+
+
+// -------------------------------------------------------------------
+// Functions & Types exported to "PyHurricane.ccp".
+
+ extern PyTypeObject PyTypePinDirection;
+ extern PyMethodDef PyPinDirection_Methods[];
+
+ extern PyObject* PyPinDirection_Link ( Hurricane::Pin::AccessDirection* );
+ extern void PyPinDirection_LinkPyType ();
+ extern void PyPinDirection_postModuleInit ();
+
+
+# define IsPyPinDirection(v) ( (v)->ob_type == &PyTypePinDirection )
+# define PYPINDIRECTION(v) ( (PyPinDirection*)(v) )
+# define PYPINDIRECTION_O(v) ( PYPINDIRECTION(v)->_object )
+
+
+ } // extern "C".
+
+} // Isobar namespace.
+
+#endif // PY_PIN_DIRECTION_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyPinPlacementStatus.h b/hurricane/src/isobar/hurricane/isobar/PyPinPlacementStatus.h
new file mode 100644
index 00000000..c2b617e0
--- /dev/null
+++ b/hurricane/src/isobar/hurricane/isobar/PyPinPlacementStatus.h
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2014-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
+// | C O R I O L I S |
+// | I s o b a r - Hurricane / Python Interface |
+// | |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
+// | =============================================================== |
+// | C++ Header : "./hurricane/isobar/PyPinPlacementStatus.h" |
+// +-----------------------------------------------------------------+
+
+
+#ifndef PY_PIN_PLACEMENTSTATUS_H
+#define PY_PIN_PLACEMENTSTATUS_H
+
+
+#include "hurricane/isobar/PyHurricane.h"
+#include "hurricane/Pin.h"
+
+
+namespace Isobar {
+
+ extern "C" {
+
+
+// -------------------------------------------------------------------
+// Python Object : "PyPinPlacementStatus".
+
+ typedef struct {
+ PyObject_HEAD
+ Hurricane::Pin::PlacementStatus* _object;
+ } PyPinPlacementStatus;
+
+
+// -------------------------------------------------------------------
+// Functions & Types exported to "PyHurricane.ccp".
+
+ extern PyTypeObject PyTypePinPlacementStatus;
+ extern PyMethodDef PyPinPlacementStatus_Methods[];
+
+ extern PyObject* PyPinPlacementStatus_Link ( Hurricane::Pin::PlacementStatus* );
+ extern void PyPinPlacementStatus_LinkPyType ();
+ extern void PyPinPlacementStatus_postModuleInit ();
+
+
+# define IsPyPinPlacementStatus(v) ( (v)->ob_type == &PyTypePinPlacementStatus )
+# define PYPINPLACEMENTSTATUS(v) ( (PyPinPlacementStatus*)(v) )
+# define PYPINPLACEMENTSTATUS_O(v) ( PYPINPLACEMENTSTATUS(v)->_object )
+
+
+ } // extern "C".
+
+} // Isobar namespace.
+
+#endif // PY_PIN_PLACEMENTSTATUS_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyPlacementStatus.h b/hurricane/src/isobar/hurricane/isobar/PyPlacementStatus.h
new file mode 100644
index 00000000..af1d9d0e
--- /dev/null
+++ b/hurricane/src/isobar/hurricane/isobar/PyPlacementStatus.h
@@ -0,0 +1,57 @@
+// -*- C++ -*-
+//
+// This file is part of the Coriolis Software.
+// Copyright (c) UPMC 2014-2014, All Rights Reserved
+//
+// +-----------------------------------------------------------------+
+// | C O R I O L I S |
+// | I s o b a r - Hurricane / Python Interface |
+// | |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
+// | =============================================================== |
+// | C++ Header : "./hurricane/isobar/PyPlacementStatus.h" |
+// +-----------------------------------------------------------------+
+
+
+#ifndef PY_PLACEMENTSTATUS_H
+#define PY_PLACEMENTSTATUS_H
+
+#include "hurricane/isobar/PyHurricane.h"
+#include "hurricane/Instance.h"
+
+
+namespace Isobar {
+
+ extern "C" {
+
+// -------------------------------------------------------------------
+// Python Object : "PyPlacementStatus".
+
+ typedef struct {
+ PyObject_HEAD
+ Hurricane::Instance::PlacementStatus* _object;
+ } PyPlacementStatus;
+
+
+// -------------------------------------------------------------------
+// Functions & Types exported to "PyHurricane.ccp".
+
+ extern PyTypeObject PyTypePlacementStatus;
+ extern PyMethodDef PyPlacementStatus_Methods[];
+
+ extern PyObject* PyPlacementStatus_Link ( Hurricane::Instance::PlacementStatus* );
+ extern void PyPlacementStatus_LinkPyType ();
+ extern void PyPlacementStatus_postModuleInit ();
+
+
+#define IsPyPlacementStatus(v) ( (v)->ob_type == &PyTypePlacementStatus )
+#define PYPLACEMENTSTATUS(v) ( (PyPlacementStatus*)(v) )
+#define PYPLACEMENTSTATUS_O(v) ( PYPLACEMENTSTATUS(v)->_object )
+
+
+ } // End of extern "C".
+
+} // End of Isobar namespace.
+
+#endif // PY_PLACEMENTSTATUS_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyPoint.h b/hurricane/src/isobar/hurricane/isobar/PyPoint.h
index 71f5e0dd..9c8adad4 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyPoint.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyPoint.h
@@ -1,92 +1,46 @@
-
// -*- 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 2006-2014, All Rights Reserved
//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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: PyPoint.h,v 1.6 2006/05/03 14:00:04 jpc Exp $
-//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Jean-Paul CHAPUT |
-// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Header : "./PyPoint.h" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Header : "./hurricane/isobar/PyPoint.h" |
+// +-----------------------------------------------------------------+
-
-
-
-# ifndef __PYPOINT__
-# define __PYPOINT__
-
+#ifndef PY_POINT_H
+#define PY_POINT_H
#include "hurricane/isobar/PyHurricane.h"
-
#include "hurricane/Point.h"
namespace Isobar {
-
-extern "C" {
-
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyPoint".
- typedef struct {
- PyObject_HEAD
- Hurricane::Point* _object;
- } PyPoint;
-
-
+ typedef struct {
+ PyObject_HEAD
+ Hurricane::Point* _object;
+ } PyPoint;
// -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp".
- extern PyTypeObject PyTypePoint;
- extern PyMethodDef PyPoint_Methods[];
+ extern PyTypeObject PyTypePoint;
+ extern PyMethodDef PyPoint_Methods[];
- extern PyObject* PyPoint_create ( PyObject* self, PyObject* args );
- extern void PyPoint_LinkPyType();
+ extern void PyPoint_LinkPyType();
# define IsPyPoint(v) ( (v)->ob_type == &PyTypePoint )
@@ -94,14 +48,8 @@ extern "C" {
# define PYPOINT_O(v) ( PYPOINT(v)->_object )
-} // End of extern "C".
+ } // extern "C".
+} // Isobar namespace.
-
-
-} // End of Isobar namespace.
-
-
-
-
-# endif
+#endif // PY_POINT_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyReference.h b/hurricane/src/isobar/hurricane/isobar/PyReference.h
index 47c09079..971eda08 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyReference.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyReference.h
@@ -1,91 +1,47 @@
-
// -*- 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-2014, All Rights Reserved
//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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: PyReference.h,v 1.2 2006/05/03 14:00:04 jpc Exp $
-//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
-// | Author : Jean-Paul Chaput |
-// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
+// | Author : Jean-Paul CHAPUT |
+// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== |
-// | C++ Header : "./PyReference.h" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Header : "./hurricane/isobar/PyReference.cpp" |
+// +-----------------------------------------------------------------+
-
-
-
-#ifndef __PYREFERENCE__
-#define __PYREFERENCE__
-
+#ifndef PY_REFERENCE_H
+#define PY_REFERENCE_H
#include "hurricane/isobar/PyEntity.h"
-
#include "hurricane/Reference.h"
namespace Isobar {
-extern "C" {
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyReference".
- typedef struct {
- PyEntity _baseObject;
- } PyReference;
-
-
+ typedef struct {
+ PyEntity _baseObject;
+ } PyReference;
// -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp".
- extern PyTypeObject PyTypeReference;
- extern PyMethodDef PyReference_Methods[];
+ extern PyTypeObject PyTypeReference;
+ extern PyMethodDef PyReference_Methods[];
- extern PyObject* PyReference_create ( PyObject* module, PyObject* args );
- extern PyObject* PyReference_Link ( Hurricane::Reference* object );
- extern void PyReference_LinkPyType ();
+ extern PyObject* PyReference_Link ( Hurricane::Reference* object );
+ extern void PyReference_LinkPyType ();
@@ -94,14 +50,8 @@ extern "C" {
#define PYREFERENCE_O(v) (PYREFERENCE(v)->_baseObject._object)
-} // End of extern "C".
-
-
-
-
-} // End of Isobar namespace.
-
-
+ } // extern "C".
+} // Isobar namespace.
#endif
diff --git a/hurricane/src/isobar/hurricane/isobar/PyTransformation.h b/hurricane/src/isobar/hurricane/isobar/PyTransformation.h
index 4c1ff05f..7ef7d8ae 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyTransformation.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyTransformation.h
@@ -1,93 +1,49 @@
-
// -*- 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 2006-2014, All Rights Reserved
//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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: PyTransformation.h,v 1.6 2006/05/03 14:00:05 jpc Exp $
-//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
// | Author : Jean-Paul CHAPUT |
-// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Header : "./PyTransformation.h" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Header : "./hurricane/isobar/PyTransformation.h" |
+// +-----------------------------------------------------------------+
-
-
-
-#ifndef __PYTRANSFORMATION__
-#define __PYTRANSFORMATION__
+#ifndef PY_TRANSFORMATION_H
+#define PY_TRANSFORMATION_H
#include "hurricane/isobar/PyHurricane.h"
-
#include "hurricane/Transformation.h"
namespace Isobar {
-
-extern "C" {
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyTransformation".
- typedef struct {
- PyObject_HEAD
- Hurricane::Transformation* _object;
- } PyTransformation;
-
-
+ typedef struct {
+ PyObject_HEAD
+ Hurricane::Transformation* _object;
+ } PyTransformation;
// -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp".
- extern PyTypeObject PyTypeTransformation;
- extern PyMethodDef PyTransformation_Methods[];
+ extern PyTypeObject PyTypeTransformation;
+ extern PyMethodDef PyTransformation_Methods[];
- extern PyObject* PyTransformation_create (PyObject* self, PyObject* args);
- extern void TransformationLoadConstants (PyObject* dictionnary);
- extern void PyTransformation_LinkPyType ();
+ extern void PyTransformation_LinkPyType ();
+ extern void PyTransformation_postModuleInit ();
# define IsPyTransformation(v) ( (v)->ob_type == &PyTypeTransformation )
@@ -95,8 +51,8 @@ extern "C" {
# define PYTRANSFORMATION_O(v) ( PYTRANSFORMATION(v)->_object )
-} // End of extern "C".
+ } // extern "C".
-} // End of Isobar namespace.
+} // Isobar namespace.
-#endif
+#endif // PY_TRANSFORMATION_H
diff --git a/hurricane/src/isobar/hurricane/isobar/PyVertical.h b/hurricane/src/isobar/hurricane/isobar/PyVertical.h
index 0f86d265..b8870c35 100644
--- a/hurricane/src/isobar/hurricane/isobar/PyVertical.h
+++ b/hurricane/src/isobar/hurricane/isobar/PyVertical.h
@@ -1,108 +1,55 @@
-
// -*- 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 2007-2014, All Rights Reserved
//
-// Main contributors :
-// Christophe Alexandre
-// Sophie Belloeil
-// Hugo Clément
-// Jean-Paul Chaput
-// Damien Dupuis
-// Christian Masson
-// Marek Sroka
-//
-// 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: PyVertical.h,v 1.6 2007/01/30 14:47:25 cobell Exp $
-//
-// x-----------------------------------------------------------------x
-// | |
+// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface |
// | |
-// | Author : Sophie BELLOEIL |
-// | E-mail : Sophie.Belloeil@asim.lip6.fr |
+// | Author : Sophie BELLOEIL |
+// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
-// | C++ Header : "./PyVertical.h" |
-// | *************************************************************** |
-// | U p d a t e s |
-// | |
-// x-----------------------------------------------------------------x
+// | C++ Header : "./hurricane/isobar/PyVertical.h" |
+// +-----------------------------------------------------------------+
-
-
-
-#ifndef __PYVERTICAL__
-#define __PYVERTICAL__
-
+#ifndef PY_VERTICAL_H
+#define PY_VERTICAL_H
#include "hurricane/isobar/PySegment.h"
-
#include "hurricane/Vertical.h"
namespace Isobar {
-
-extern "C" {
-
+ extern "C" {
// -------------------------------------------------------------------
// Python Object : "PyVertical".
- typedef struct {
- PySegment _baseObject;
- } PyVertical;
-
-
+ typedef struct {
+ PySegment _baseObject;
+ } PyVertical;
// -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp".
- extern PyTypeObject PyTypeVertical;
- extern PyMethodDef PyVertical_Methods[];
-
- extern PyObject* PyVertical_create ( PyObject* module, PyObject* args );
- extern PyObject* PyVertical_Link ( Hurricane::Vertical* object );
- extern void PyVertical_LinkPyType ();
+ extern PyTypeObject PyTypeVertical;
+ extern PyMethodDef PyVertical_Methods[];
+ extern PyObject* PyVertical_Link ( Hurricane::Vertical* object );
+ extern void PyVertical_LinkPyType ();
#define IsPyVertical(v) ((v)->ob_type == &PyTypeVertical)
#define PYVERTICAL(v) ((PyVertical*)(v))
#define PYVERTICAL_O(v) (PYVERTICAL(v)->_baseObject._baseObject._baseObject._object)
+
+ } // extern "C".
+
+} // Isobar namespace.
-} // End of extern "C".
-
-
-
-
-} // End of Isobar namespace.
-
-
-
-
-#endif
+#endif // PY_VERTICAL_H
diff --git a/stratus1/src/stratus/st_instance.py b/stratus1/src/stratus/st_instance.py
index b8114fd3..e0dbbd8b 100644
--- a/stratus1/src/stratus/st_instance.py
+++ b/stratus1/src/stratus/st_instance.py
@@ -208,10 +208,10 @@ class Inst :
err = "\n[Stratus ERROR] HurricanePlug : Problem of hurricane cell.\nTry to contact Coriolis team.\n"
raise Exception ( err )
- inst = Instance ( self._st_cell._hur_cell
- , self._name
- , self._hur_masterCell
- )
+ inst = Instance.create ( self._st_cell._hur_cell
+ , self._name
+ , self._hur_masterCell
+ )
# The hurricane instance is connected to the stratus instance
self._hur_instance = inst
diff --git a/stratus1/src/stratus/st_net.py b/stratus1/src/stratus/st_net.py
index a292e178..f32c37fb 100644
--- a/stratus1/src/stratus/st_net.py
+++ b/stratus1/src/stratus/st_net.py
@@ -934,24 +934,24 @@ class net :
self._hur_net += [cat[0]._hur_net[cat[1]]]
return
- net = Net ( self._st_cell._hur_cell, name )
+ net = Net.create ( self._st_cell._hur_cell, name )
- net.setType ( TypeLOGICAL )
+ net.setType ( Net.Type.LOGICAL )
if self._ext : net.setExternal ( True )
else : net.setExternal ( False )
if self._ext :
- if self._direct == "IN" : net.setDirection ( DirectionIN )
- elif self._direct == "OUT" : net.setDirection ( DirectionOUT )
- elif self._direct == "INOUT" : net.setDirection ( DirectionINOUT )
- elif self._direct == "TRISTATE" : net.setDirection ( DirectionTRISTATE )
- elif self._direct == "UNKNOWN" : net.setDirection ( DirectionUNDEFINED )
+ if self._direct == "IN" : net.setDirection ( Net.Direction.IN )
+ elif self._direct == "OUT" : net.setDirection ( Net.Direction.OUT )
+ elif self._direct == "INOUT" : net.setDirection ( Net.Direction.INOUT )
+ elif self._direct == "TRISTATE" : net.setDirection ( Net.Direction.TRISTATE )
+ elif self._direct == "UNKNOWN" : net.setDirection ( Net.Direction.UNDEFINED )
if '_h_type' in self.__dict__ :
- if self._h_type == "POWER" : net.setType ( TypePOWER )
- elif self._h_type == "GROUND" : net.setType ( TypeGROUND )
- elif self._h_type == "CLOCK" : net.setType ( TypeCLOCK )
+ if self._h_type == "POWER" : net.setType ( Net.Type.POWER )
+ elif self._h_type == "GROUND" : net.setType ( Net.Type.GROUND )
+ elif self._h_type == "CLOCK" : net.setType ( Net.Type.CLOCK )
self._hur_net += [net]
@@ -1015,15 +1015,15 @@ class net :
else : self._ext = False
if hur_net.isExternal() :
- if hur_net.getDirection() == DirectionIN : self._direct = "IN"
- elif hur_net.getDirection() == DirectionOUT : self._direct = "OUT"
- elif hur_net.getDirection() == DirectionINOUT : self._direct = "INOUT"
- elif hur_net.getDirection() == DirectionTRISTATE : self._direct = "TRISTATE"
- elif hur_net.getDirection() == DirectionUNDEFINED : self._direct = "UNDEFINED"
+ if hur_net.getDirection() == Net.Direction.IN : self._direct = "IN"
+ elif hur_net.getDirection() == Net.Direction.OUT : self._direct = "OUT"
+ elif hur_net.getDirection() == Net.Direction.INOUT : self._direct = "INOUT"
+ elif hur_net.getDirection() == Net.Direction.TRISTATE : self._direct = "TRISTATE"
+ elif hur_net.getDirection() == Net.Direction.UNDEFINED : self._direct = "UNDEFINED"
- if hur_net.getType() == TypePOWER : self._h_type = "POWER"
- elif hur_net.getType() == TypeGROUND : self._h_type = "GROUND"
- elif hur_net.getType() == TypeCLOCK : self._h_type = "CLOCK"
+ if hur_net.getType() == Net.Type.POWER : self._h_type = "POWER"
+ elif hur_net.getType() == Net.Type.GROUND : self._h_type = "GROUND"
+ elif hur_net.getType() == Net.Type.CLOCK : self._h_type = "CLOCK"
self._hur_net = [hur_net]
diff --git a/stratus1/src/stratus/st_placement.py b/stratus1/src/stratus/st_placement.py
index 052e973f..3a861da1 100644
--- a/stratus1/src/stratus/st_placement.py
+++ b/stratus1/src/stratus/st_placement.py
@@ -390,7 +390,7 @@ def placement ( st_inst, sym, x, y, plac = FIXED, cell = None, fonction = None )
raise Exception ( err )
# Error : if the instance is already placed
- if hur_inst.getPlacementStatus() == PlacementStatusFIXED :
+ if hur_inst.getPlacementStatus() == Instance.PlacementStatus.FIXED :
err = "\n[Stratus ERROR] Placement : the instance " + st_inst._name + " is already placed.\n"
raise Exception ( err )
@@ -409,45 +409,45 @@ def placement ( st_inst, sym, x, y, plac = FIXED, cell = None, fonction = None )
cell._insref = st_inst
##### Placement #####
- if st_inst._sym == OrientationID :
+ if st_inst._sym == Transformation.Orientation.ID :
st_inst._x = x
st_inst._y = y
- elif st_inst._sym == OrientationMX :
+ elif st_inst._sym == Transformation.Orientation.MX :
abtemp = ab ( st_inst, cell )
st_inst._x = x + abtemp.getWidth ()
st_inst._y = y
- elif st_inst._sym == OrientationMY :
+ elif st_inst._sym == Transformation.Orientation.MY :
abtemp = ab ( st_inst, cell )
st_inst._x = x
st_inst._y = y + abtemp.getHeight ()
- elif st_inst._sym == OrientationR2 :
+ elif st_inst._sym == Transformation.Orientation.R2 :
abtemp = ab ( st_inst, cell )
st_inst._x = x + abtemp.getWidth ()
st_inst._y = y + abtemp.getHeight ()
- elif st_inst._sym == OrientationR1 :
+ elif st_inst._sym == Transformation.Orientation.R1 :
abtemp = ab ( st_inst, cell )
st_inst._x = x + abtemp.getHeight ()
st_inst._y = y
- elif st_inst._sym == OrientationR3 :
+ elif st_inst._sym == Transformation.Orientation.R3 :
abtemp = ab ( st_inst, cell )
st_inst._x = x
st_inst._y = y + abtemp.getWidth ()
- elif st_inst._sym == OrientationYR :
+ elif st_inst._sym == Transformation.Orientation.YR :
st_inst._x = x
st_inst._y = y
- elif st_inst._sym == OrientationXR :
+ elif st_inst._sym == Transformation.Orientation.XR :
abtemp = ab ( st_inst, cell )
st_inst._x = x + abtemp.getHeight ()
@@ -457,7 +457,7 @@ def placement ( st_inst, sym, x, y, plac = FIXED, cell = None, fonction = None )
raise Exception ( "\n[Stratus ERROR] Placement : wrong transformation.\n" )
# if the abutment box is not at 0 0 FIXME
- if st_inst._sym == OrientationMY :
+ if st_inst._sym == Transformation.Orientation.MY :
x = st_inst._x + hur_inst.getAbutmentBox().getXMin()
y = st_inst._y + hur_inst.getAbutmentBox().getYMin()
else :
@@ -470,12 +470,12 @@ def placement ( st_inst, sym, x, y, plac = FIXED, cell = None, fonction = None )
if plac == PLACED :
cell._hur_cell.setAbutmentBox ( cell._hur_cell.getAbutmentBox ().merge ( hur_inst.getAbutmentBox () ) )
- hur_inst.setPlacementStatus ( PlacementStatusPLACED )
+ hur_inst.setPlacementStatus ( Instance.PlacementStatus.PLACED )
elif plac == FIXED :
cell._hur_cell.setAbutmentBox ( cell._hur_cell.getAbutmentBox ().merge ( hur_inst.getAbutmentBox () ) )
- hur_inst.setPlacementStatus ( PlacementStatusFIXED )
+ hur_inst.setPlacementStatus ( Instance.PlacementStatus.FIXED )
elif plac == UNPLACED :
- hur_inst.setPlacementStatus ( PlacementStatusUNPLACED )
+ hur_inst.setPlacementStatus ( Instance.PlacementStatus.UNPLACED )
else :
raise Exception ( "\n[Stratus ERROR] Placement : wrong argument for type of placement.\n" )
@@ -486,14 +486,14 @@ def placement ( st_inst, sym, x, y, plac = FIXED, cell = None, fonction = None )
## Two names for the symetry ##
def transformation ( symetry ) :
- if symetry == NOSYM or symetry == OrientationID : transf = OrientationID
- elif symetry == SYM_X or symetry == OrientationMX : transf = OrientationMX
- elif symetry == SYM_Y or symetry == OrientationMY : transf = OrientationMY
- elif symetry == SYMXY or symetry == OrientationR2 : transf = OrientationR2
- elif symetry == ROT_P or symetry == OrientationR1 : transf = OrientationR1
- elif symetry == ROT_M or symetry == OrientationR3 : transf = OrientationR3
- elif symetry == SY_RP or symetry == OrientationYR : transf = OrientationYR
- elif symetry == SY_RM or symetry == OrientationXR : transf = OrientationXR
+ if symetry == NOSYM or symetry == Transformation.Orientation.ID : transf = Transformation.Orientation.ID
+ elif symetry == SYM_X or symetry == Transformation.Orientation.MX : transf = Transformation.Orientation.MX
+ elif symetry == SYM_Y or symetry == Transformation.Orientation.MY : transf = Transformation.Orientation.MY
+ elif symetry == SYMXY or symetry == Transformation.Orientation.R2 : transf = Transformation.Orientation.R2
+ elif symetry == ROT_P or symetry == Transformation.Orientation.R1 : transf = Transformation.Orientation.R1
+ elif symetry == ROT_M or symetry == Transformation.Orientation.R3 : transf = Transformation.Orientation.R3
+ elif symetry == SY_RP or symetry == Transformation.Orientation.YR : transf = Transformation.Orientation.YR
+ elif symetry == SY_RM or symetry == Transformation.Orientation.XR : transf = Transformation.Orientation.XR
else :
err = "\n[Stratus ERROR] Placement :Illegal transformation.\n"
raise Exception ( err )
@@ -519,19 +519,19 @@ def width ( ins ) :
## Test of symetry ##
def vertical ( sym ) :
- return sym == OrientationID or sym == OrientationMX or sym == OrientationMY or sym == OrientationR2
+ return sym == Transformation.Orientation.ID or sym == Transformation.Orientation.MX or sym == Transformation.Orientation.MY or sym == Transformation.Orientation.R2
def horizontal ( sym ) :
- return sym == OrientationR1 or sym == OrientationR3 or sym == OrientationYR or sym == OrientationXR
+ return sym == Transformation.Orientation.R1 or sym == Transformation.Orientation.R3 or sym == Transformation.Orientation.YR or sym == Transformation.Orientation.XR
def bas ( sym ) :
- return sym == OrientationID or sym == OrientationMX or sym == OrientationR1 or sym == OrientationYR
+ return sym == Transformation.Orientation.ID or sym == Transformation.Orientation.MX or sym == Transformation.Orientation.R1 or sym == Transformation.Orientation.YR
def haut ( sym ) :
- return sym == OrientationR2 or sym == OrientationMY or sym == OrientationR3 or sym == OrientationXR
+ return sym == Transformation.Orientation.R2 or sym == Transformation.Orientation.MY or sym == Transformation.Orientation.R3 or sym == Transformation.Orientation.XR
def gauche ( sym ) :
- return sym == OrientationID or sym == OrientationMY or sym == OrientationR3 or sym == OrientationYR
+ return sym == Transformation.Orientation.ID or sym == Transformation.Orientation.MY or sym == Transformation.Orientation.R3 or sym == Transformation.Orientation.YR
def droite ( sym ) :
- return sym == OrientationR2 or sym == OrientationMX or sym == OrientationR1 or sym == OrientationXR
+ return sym == Transformation.Orientation.R2 or sym == Transformation.Orientation.MX or sym == Transformation.Orientation.R1 or sym == Transformation.Orientation.XR
|