Make the Python interface closely mirroring the C++ one.

* Change: In Isobar, the Python interface was not exactly mirroring the
    C++ one, now it is the case. The Python code should look likes almost
    exactly like the C++ one, the only differences remaining being due
    to the languages respective syntaxes. Note that in the case of
    constructor functions, it leads to a slightly longer notation in
    Python that it could have been (mimic the ".create()" static
    member). Main modifications:
    1. Mirror the static constructor syntax with create():
          Cell( ... )   ==>  Cell.create( ... )
    2. Correct hierarchy for constants in Instance, Net, Pin
       & Transformation. For example:
          Hurricane.PlacementStatusFIXED
                     ==> Hurricane.Instance.PlacementStatus.FIXED
          Hurricane.OrientationID
                     ==> Hurricane.Transformation.Orientation.ID
          Hurricane.TypeLOGICAL  ==>  Hurricane.Net.Type.LOGICAL
          Hurricane.DirectionIN  ==>  Hurricane.Net.Direction.IN
* Change: In CRL Core, correction to match the improved Python API
    in the configutation helpers.
* Change: In Cumulus, correction to match the improved Python API.
* Change: In Stratus, correction to match the improved Python API.
* Change: In Documenation, update for the new Python interface
    (both user's guide & examples).
* Note: We must port those changes into Chams for it to continue
   to run.
* Change: In Documenation, update the Python script support part.
This commit is contained in:
Jean-Paul Chaput 2014-06-28 17:37:59 +02:00
parent 01b97626a8
commit 7296dcd6fb
68 changed files with 3529 additions and 2624 deletions

1
.gitignore vendored
View File

@ -15,6 +15,7 @@ documentation/UsersGuide/UsersGuide-raw.tex
documentation/UsersGuide/UsersGuide.tex documentation/UsersGuide/UsersGuide.tex
documentation/UsersGuide/UsersGuide.aux documentation/UsersGuide/UsersGuide.aux
documentation/UsersGuide/UsersGuide.log documentation/UsersGuide/UsersGuide.log
documentation/UsersGuide/UsersGuide.dvi
documentation/UsersGuide/UsersGuide.pdf documentation/UsersGuide/UsersGuide.pdf
documentation/UsersGuide/UsersGuide.out documentation/UsersGuide/UsersGuide.out
documentation/UsersGuide/UsersGuide.toc documentation/UsersGuide/UsersGuide.toc

View File

@ -4,6 +4,7 @@ import os.path
import sys import sys
import Hurricane import Hurricane
from Hurricane import DbU from Hurricane import DbU
from Hurricane import DataBase
from Hurricane import Layer from Hurricane import Layer
import CRL import CRL
from CRL import Environment from CRL import Environment
@ -97,7 +98,7 @@ def loadRoutingGaugesTable ( routingGaugesTable, fromFile ):
for gaugeName in routingGaugesTable.keys(): for gaugeName in routingGaugesTable.keys():
gaugeDatas = routingGaugesTable[gaugeName] gaugeDatas = routingGaugesTable[gaugeName]
technology = Hurricane.getDataBase().getTechnology() technology = DataBase.getDB().getTechnology()
gauge = RoutingGauge.create(gaugeName) gauge = RoutingGauge.create(gaugeName)
entryNo = 0 entryNo = 0
@ -171,7 +172,7 @@ def loadAllianceConfig ( table, fromFile ):
loadTechno = False loadTechno = False
af = AllianceFramework.get() af = AllianceFramework.get()
db = Hurricane.getDataBase() db = DataBase.getDB()
technology = db.getTechnology() technology = db.getTechnology()
if not technology: if not technology:
loadTechno = True loadTechno = True
@ -189,7 +190,7 @@ def loadAllianceConfig ( table, fromFile ):
def loadCompatXml (): def loadCompatXml ():
af = AllianceFramework.get() af = AllianceFramework.get()
db = Hurricane.getDataBase() db = DataBase.getDB()
technology = Hurricane.Technology.create(db,'Alliance') technology = Hurricane.Technology.create(db,'Alliance')
env = af.getEnvironment() env = af.getEnvironment()

View File

@ -7,6 +7,7 @@ import string
import traceback import traceback
import Hurricane import Hurricane
from Hurricane import DbU from Hurricane import DbU
from Hurricane import DataBase
from Hurricane import BasicLayer from Hurricane import BasicLayer
from helpers import ErrorMessage from helpers import ErrorMessage
@ -102,7 +103,7 @@ def load ( realPath ):
confGlobals = globals() confGlobals = globals()
execfile(realPath,confGlobals) execfile(realPath,confGlobals)
technology = Hurricane.getDataBase().getTechnology() technology = DataBase.getDB().getTechnology()
for symbol, loader in tables: for symbol, loader in tables:
if not confGlobals.has_key(symbol): if not confGlobals.has_key(symbol):

View File

@ -7,6 +7,7 @@ import string
import traceback import traceback
import Hurricane import Hurricane
from Hurricane import DbU from Hurricane import DbU
from Hurricane import DataBase
from Hurricane import Layer from Hurricane import Layer
from Hurricane import BasicLayer from Hurricane import BasicLayer
from Hurricane import DiffusionLayer from Hurricane import DiffusionLayer
@ -282,7 +283,7 @@ def load ( symbolicPath ):
confGlobals = globals() confGlobals = globals()
execfile(symbolicPath,confGlobals) execfile(symbolicPath,confGlobals)
db = Hurricane.getDataBase() db = DataBase.getDB()
technology = db.getTechnology() technology = db.getTechnology()
for symbol, loader in tables: for symbol, loader in tables:

View File

@ -9,6 +9,7 @@ try:
import Cfg import Cfg
import Hurricane import Hurricane
from Hurricane import DbU from Hurricane import DbU
from Hurricane import Transformation
from Hurricane import Box from Hurricane import Box
from Hurricane import Path from Hurricane import Path
from Hurricane import Occurrence from Hurricane import Occurrence
@ -118,7 +119,7 @@ class HTree ( object ):
self.bufferCell = self.framework.getCell( 'buf_x2', CRL.Catalog.State.Logical ) self.bufferCell = self.framework.getCell( 'buf_x2', CRL.Catalog.State.Logical )
self.cellGauge = self.framework.getCellGauge() self.cellGauge = self.framework.getCellGauge()
self.routingGauge = self.framework.getRoutingGauge() 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.cloneds = [ self.cell ]
self.plugToRp = {} self.plugToRp = {}
self._createChildNet( self.topBuffer, 'ck_htree' ) self._createChildNet( self.topBuffer, 'ck_htree' )
@ -153,13 +154,13 @@ class HTree ( object ):
return return
def _createChildNet ( self, ibuffer, tag ): def _createChildNet ( self, ibuffer, tag ):
childNet = Net( self.cell, tag ) childNet = Net.create( self.cell, tag )
childNet.setType( Hurricane.TypeCLOCK ) childNet.setType( Net.Type.CLOCK )
getPlugByName(ibuffer, 'q').setNet( childNet ) getPlugByName(ibuffer, 'q').setNet( childNet )
return return
def _createContact ( self, net, x, y ): def _createContact ( self, net, x, y ):
return Contact( net return Contact.create( net
, self.routingGauge.getContactLayer(self.horizontalDepth) , self.routingGauge.getContactLayer(self.horizontalDepth)
, x, y , x, y
, self.routingGauge.getLayerGauge(self.horizontalDepth).getViaWidth() , self.routingGauge.getLayerGauge(self.horizontalDepth).getViaWidth()
@ -167,7 +168,7 @@ class HTree ( object ):
) )
def _createHorizontal ( self, source, target, y ): def _createHorizontal ( self, source, target, y ):
return Horizontal( source return Horizontal.create( source
, target , target
, self.routingGauge.getRoutingLayer(self.horizontalDepth) , self.routingGauge.getRoutingLayer(self.horizontalDepth)
, y , y
@ -175,7 +176,7 @@ class HTree ( object ):
) )
def _createVertical ( self, source, target, x ): def _createVertical ( self, source, target, x ):
return Vertical( source return Vertical.create( source
, target , target
, self.routingGauge.getRoutingLayer(self.verticalDepth) , self.routingGauge.getRoutingLayer(self.verticalDepth)
, x , x
@ -183,13 +184,13 @@ class HTree ( object ):
) )
def _rpAccess ( self, rp, net, flags=0 ): 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 if flags & HTree.HAccess: stopDepth = self.horizontalDepth
else: stopDepth = self.verticalDepth else: stopDepth = self.verticalDepth
for depth in range(1,stopDepth): for depth in range(1,stopDepth):
contact2 = Contact( net contact2 = Contact.create( net
, self.routingGauge.getContactLayer(depth) , self.routingGauge.getContactLayer(depth)
, contact1.getX() , contact1.getX()
, contact1.getY() , contact1.getY()
@ -197,14 +198,14 @@ class HTree ( object ):
, self.routingGauge.getLayerGauge(depth).getViaWidth() , self.routingGauge.getLayerGauge(depth).getViaWidth()
) )
if self.routingGauge.getLayerGauge(depth).getDirection() == RoutingLayerGauge.Horizontal: if self.routingGauge.getLayerGauge(depth).getDirection() == RoutingLayerGauge.Horizontal:
Horizontal( contact1 Horizontal.create( contact1
, contact2 , contact2
, self.routingGauge.getRoutingLayer(depth) , self.routingGauge.getRoutingLayer(depth)
, contact1.getY() , contact1.getY()
, self.routingGauge.getLayerGauge(depth).getWireWidth() , self.routingGauge.getLayerGauge(depth).getWireWidth()
) )
else: else:
Vertical( contact1 Vertical.create( contact1
, contact2 , contact2
, self.routingGauge.getRoutingLayer(depth) , self.routingGauge.getRoutingLayer(depth)
, contact1.getX() , contact1.getX()
@ -244,13 +245,13 @@ class HTree ( object ):
xslice = self.toXCellGrid(x) xslice = self.toXCellGrid(x)
yslice = self.toYCellGrid(y) yslice = self.toYCellGrid(y)
transformation = Hurricane.OrientationID transformation = Transformation.Orientation.ID
if (yslice / self.cellGauge.getSliceHeight()) % 2 != 0: if (yslice / self.cellGauge.getSliceHeight()) % 2 != 0:
transformation = Hurricane.OrientationMY transformation = Transformation.Orientation.MY
yslice += self.cellGauge.getSliceHeight() yslice += self.cellGauge.getSliceHeight()
instance.setTransformation ( Hurricane.Transformation(xslice, yslice, transformation) ) instance.setTransformation ( Transformation(xslice, yslice, transformation) )
instance.setPlacementStatus( Hurricane.PlacementStatusFIXED ) instance.setPlacementStatus( Instance.PlacementStatus.FIXED )
return return
def getTreeDepth ( self ): def getTreeDepth ( self ):
@ -288,10 +289,10 @@ class HTree ( object ):
return self.addDeepPlug( headPlug.getMasterNet(), tailPath ) return self.addDeepPlug( headPlug.getMasterNet(), tailPath )
masterCell = headInstance.getMasterCell() masterCell = headInstance.getMasterCell()
masterNet = Net( masterCell, topNet.getName() ) masterNet = Net.create( masterCell, topNet.getName() )
masterNet.setExternal ( True ) masterNet.setExternal ( True )
masterNet.setType ( Hurricane.TypeCLOCK ) masterNet.setType ( Net.Type.CLOCK )
masterNet.setDirection( Hurricane.DirectionIN ) masterNet.setDirection( Net.Direction.IN )
headPlug = headInstance.getPlug( masterNet ) headPlug = headInstance.getPlug( masterNet )
if not headPlug: if not headPlug:
raise ErrorMessage( 3, 'Plug not created for %s on instance %s of %s' \ raise ErrorMessage( 3, 'Plug not created for %s on instance %s of %s' \
@ -306,7 +307,7 @@ class HTree ( object ):
UpdateSession.open() UpdateSession.open()
leafConnects = [] leafConnects = []
hyperMasterClock = HyperNet( Occurrence(self.masterClock) ) hyperMasterClock = HyperNet.create( Occurrence(self.masterClock) )
for plugOccurrence in hyperMasterClock.getLeafPlugOccurrences(): for plugOccurrence in hyperMasterClock.getLeafPlugOccurrences():
position = plugOccurrence.getBoundingBox().getCenter() position = plugOccurrence.getBoundingBox().getCenter()
leafBuffer = self.getLeafBufferUnder( position ) leafBuffer = self.getLeafBufferUnder( position )
@ -363,10 +364,10 @@ class HTreeNode ( object ):
self.area = area self.area = area
self.prefix = prefix self.prefix = prefix
self.blBuffer = Instance( self.topTree.cell, 'ck_htree'+self.prefix+'_bl_ins', self.topTree.bufferCell ) self.blBuffer = Instance.create( 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.brBuffer = Instance.create( 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.tlBuffer = Instance.create( 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.trBuffer = Instance.create( self.topTree.cell, 'ck_htree'+self.prefix+'_tr_ins', self.topTree.bufferCell )
self.ckNet = getPlugByName(self.sourceBuffer, 'q').getNet() self.ckNet = getPlugByName(self.sourceBuffer, 'q').getNet()
getPlugByName(self.blBuffer, 'i').setNet( self.ckNet ) getPlugByName(self.blBuffer, 'i').setNet( self.ckNet )
getPlugByName(self.brBuffer, 'i').setNet( self.ckNet ) getPlugByName(self.brBuffer, 'i').setNet( self.ckNet )

View File

@ -104,7 +104,7 @@ def pyPlaceCentric ( cell, instance ) :
Ty = New_Ymin - instance.getAbutmentBox().getYMin() Ty = New_Ymin - instance.getAbutmentBox().getYMin()
instance.setTransformation ( Transformation ( Tx, Ty ).getTransformation ( instance.getTransformation() ) ) instance.setTransformation ( Transformation ( Tx, Ty ).getTransformation ( instance.getTransformation() ) )
instance.setPlacementStatus ( PlacementStatusPLACED ) instance.setPlacementStatus ( Instance.PlacementStatus.PLACED )
UpdateSession.close() UpdateSession.close()
@ -168,8 +168,6 @@ def pyRouteCk ( cell, netCk ) :
def pyAlimVerticalRail ( cell, xcoord ) : def pyAlimVerticalRail ( cell, xcoord ) :
'''x is in pitch, it is where the vertical alimentation call back are placed''' '''x is in pitch, it is where the vertical alimentation call back are placed'''
print 'pyAlimVerticalRail'
global PITCH, SLICE global PITCH, SLICE
global standard_instances_list, nb_alims_verticales, nb_lignes, standard_instances_masque global standard_instances_list, nb_alims_verticales, nb_lignes, standard_instances_masque
global nb_vdd_pins, nb_vss_pins global nb_vdd_pins, nb_vss_pins
@ -212,12 +210,12 @@ def pyAlimVerticalRail ( cell, xcoord ) :
nb_alims_verticales += 1 nb_alims_verticales += 1
# get the opposite of orientation ID=>MY MY=>ID # get the opposite of orientation ID=>MY MY=>ID
if orientation in [OrientationID, OrientationMX] : if orientation in [Transformation.Orientation.ID, Transformation.Orientation.MX] :
inv_orientation = OrientationMY inv_orientation = Transformation.Orientation.MY
orientation = OrientationID orientation = Transformation.Orientation.ID
elif orientation in [OrientationMY, OrientationR2] : elif orientation in [Transformation.Orientation.MY, Transformation.Orientation.R2] :
inv_orientation = OrientationID inv_orientation = Transformation.Orientation.ID
orientation = OrientationMY orientation = Transformation.Orientation.MY
else : else :
raise ErrorMessage(2,"AlimVerticalRail : Strawberry.") raise ErrorMessage(2,"AlimVerticalRail : Strawberry.")
@ -258,7 +256,7 @@ def pyAlimVerticalRail ( cell, xcoord ) :
place ( Powmid, int(x), int(y), my_orientation ) place ( Powmid, int(x), int(y), my_orientation )
# place pins (connectors) in metal3 on top and bottom # place pins (connectors) in metal3 on top and bottom
metal3 = getDataBase().getTechnology().getLayer( "METAL3" ) metal3 = DataBase.getDB().getTechnology().getLayer( "METAL3" )
powerNet = None powerNet = None
for net in cell.getPowerNets(): for net in cell.getPowerNets():
@ -286,21 +284,21 @@ def pyAlimVerticalRail ( cell, xcoord ) :
# Top # Top
if standard_instances_masque[nb_lignes-1][xcoord] == FREE : if standard_instances_masque[nb_lignes-1][xcoord] == FREE :
pin_name = str(powerNet.getName()) + "." + str(nb_vdd_pins) 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 nb_vdd_pins += 1
pin_name = str(groundNet.getName()) + "." + str(nb_vss_pins) 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 nb_vss_pins += 1
# Bottom # Bottom
if standard_instances_masque[0][xcoord] == FREE : if standard_instances_masque[0][xcoord] == FREE :
pin_name = str(powerNet.getName()) + "." + str(nb_vdd_pins) 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 nb_vdd_pins += 1
pin_name = str(groundNet.getName()) + "." + str(nb_vss_pins) 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 nb_vss_pins += 1
UpdateSession.close() UpdateSession.close()
@ -342,10 +340,10 @@ def pyAlimHorizontalRail ( cell, ycoord ) :
raise ErrorMessage(2,err) raise ErrorMessage(2,err)
# get layers # get layers
metal4 = getDataBase().getTechnology().getLayer ( "METAL4" ) metal4 = DataBase.getDB().getTechnology().getLayer ( "METAL4" )
via1 = getDataBase().getTechnology().getLayer ( "VIA12" ) via1 = DataBase.getDB().getTechnology().getLayer ( "VIA12" )
via2 = getDataBase().getTechnology().getLayer ( "VIA23" ) via2 = DataBase.getDB().getTechnology().getLayer ( "VIA23" )
via3 = getDataBase().getTechnology().getLayer ( "VIA34" ) via3 = DataBase.getDB().getTechnology().getLayer ( "VIA34" )
# Know if it is vdd or vss # Know if it is vdd or vss
string = getVddVss ( cell, ycoord ) string = getVddVss ( cell, ycoord )
@ -361,26 +359,26 @@ def pyAlimHorizontalRail ( cell, ycoord ) :
net = cell.getNet ( "vdd" ) net = cell.getNet ( "vdd" )
pin_name = str(net.getName()) + "." + str(nb_vdd_pins) 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 nb_vdd_pins += 1
pin_name = str(net.getName()) + "." + str(nb_vdd_pins) 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 nb_vdd_pins += 1
else : else :
net = cell.getNet ( "vss" ) net = cell.getNet ( "vss" )
pin_name = str(net.getName()) + "." + str(nb_vss_pins) 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 nb_vss_pins += 1
pin_name = str(net.getName()) + "." + str(nb_vss_pins) 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 nb_vss_pins += 1
# Create horizontal rail # 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 ) power_hur_cell = CRL.AllianceFramework.get().getCell ( "powmid_x0", CRL.Catalog.State.Views )
Width_power = power_hur_cell.getAbutmentBox().getWidth() Width_power = power_hur_cell.getAbutmentBox().getWidth()
@ -393,8 +391,8 @@ def pyAlimHorizontalRail ( cell, ycoord ) :
if standard_instances_masque[ycoord][i] == POWER : if standard_instances_masque[ycoord][i] == POWER :
contact_side = DbU_lambda(RING_WIDTH) - DbU_lambda(1.0) 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) ) 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 ( rail_horizontal, via3, i*DbU_lambda(PITCH) + DbU_lambda(25), 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 += nb_pitchs
i+=1 i+=1
@ -428,7 +426,7 @@ def pyAlimConnectors ( cell ) :
+ "Please place some instances before the placement of alim connectors.\n" + "Please place some instances before the placement of alim connectors.\n"
raise ErrorMessage(2,err) raise ErrorMessage(2,err)
metal1 = getDataBase().getTechnology().getLayer("METAL1") metal1 = DataBase.getDB().getTechnology().getLayer("METAL1")
string = getVddVss ( cell, 0 ) string = getVddVss ( cell, 0 )
if re.search ( "vdd", string ) : if re.search ( "vdd", string ) :
@ -468,23 +466,23 @@ def pyAlimConnectors ( cell ) :
# Ligne impaire # Ligne impaire
if i % 2 : if i % 2 :
pin_name = str(netImpair.getName()) + "." + str(nb_inv_pins) 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 nb_inv_pins += 1
pin_name = str(netImpair.getName()) + "." + str(nb_inv_pins) 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 nb_inv_pins += 1
Horizontal ( pin1, pin2, metal1, pin1.getY(), pin_height ) Horizontal.create ( pin1, pin2, metal1, pin1.getY(), pin_height )
# Ligne paire # Ligne paire
else : else :
pin_name = str(netPair.getName()) + "." + str(nb_string_pins) 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 nb_string_pins += 1
pin_name = str(netPair.getName()) + "." + str(nb_string_pins) 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 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 ) : if re.search ( "vdd", string ) :
nb_vdd_pins = nb_string_pins nb_vdd_pins = nb_string_pins
@ -651,11 +649,11 @@ def pyPadNorth ( cell, core, args ) :
ins.setTransformation ( Transformation ( _x - _difx ins.setTransformation ( Transformation ( _x - _difx
, _y - _dify , _y - _dify
, OrientationID , Transformation.Orientation.ID
) )
) )
ins.setPlacementStatus ( PlacementStatusFIXED ) ins.setPlacementStatus ( Instance.PlacementStatus.FIXED )
UpdateSession.close() UpdateSession.close()
@ -728,16 +726,16 @@ def pyPadSouth ( cell, core, args ) :
# avoir x y apres orientation # avoir x y apres orientation
box = ins.getMasterCell().getAbutmentBox() box = ins.getMasterCell().getAbutmentBox()
_difx = Transformation ( 0, 0, OrientationMY ).getBox ( box ).getXMin() _difx = Transformation ( 0, 0, Transformation.Orientation.MY ).getBox ( box ).getXMin()
_dify = Transformation ( 0, 0, OrientationMY ).getBox ( box ).getYMin() _dify = Transformation ( 0, 0, Transformation.Orientation.MY ).getBox ( box ).getYMin()
ins.setTransformation ( Transformation ( _x - _difx ins.setTransformation ( Transformation ( _x - _difx
, _y - _dify , _y - _dify
, OrientationMY , Transformation.Orientation.MY
) )
) )
ins.setPlacementStatus ( PlacementStatusFIXED ) ins.setPlacementStatus ( Instance.PlacementStatus.FIXED )
UpdateSession.close() UpdateSession.close()
@ -819,11 +817,11 @@ def pyPadEast ( cell, core, args ) :
ins.setTransformation ( Transformation ( _x - _difx ins.setTransformation ( Transformation ( _x - _difx
, _y - _dify , _y - _dify
, OrientationYR , Transformation.Orientation.YR
) )
) )
ins.setPlacementStatus ( PlacementStatusFIXED ) ins.setPlacementStatus ( Instance.PlacementStatus.FIXED )
UpdateSession.close() UpdateSession.close()
@ -902,11 +900,11 @@ def pyPadWest ( cell, core, args ) :
ins.setTransformation ( Transformation ( _x - _difx ins.setTransformation ( Transformation ( _x - _difx
, _y - _dify , _y - _dify
, OrientationR1 , Transformation.Orientation.R1
) )
) )
ins.setPlacementStatus ( PlacementStatusFIXED ) ins.setPlacementStatus ( Instance.PlacementStatus.FIXED )
UpdateSession.close() UpdateSession.close()
@ -922,7 +920,7 @@ def pyPowerRing ( cell, core, n ) :
global pad_north, pad_south, pad_east, pad_west global pad_north, pad_south, pad_east, pad_west
global RING_INTERVAL, RING_WIDTH global RING_INTERVAL, RING_WIDTH
db = getDataBase() db = DataBase.getDB()
topRoutingLayerName = Cfg.getParamString('katabatic.topRoutingLayer', 'METAL4').asString() topRoutingLayerName = Cfg.getParamString('katabatic.topRoutingLayer', 'METAL4').asString()
topRoutingLayer = db.getTechnology().getLayer( topRoutingLayerName ) topRoutingLayer = db.getTechnology().getLayer( topRoutingLayerName )
@ -1117,25 +1115,25 @@ def pyPowerRing ( cell, core, n ) :
for i in range ( 0, 2*n+1, 2 ) : 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 ) contact1 = Contact.create ( 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 ) contact2 = Contact.create ( 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 ) contact3 = Contact.create ( 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 ) 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_west_vss.append ( Vertical.create ( 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) ) ) vertical_east_vss.append ( Vertical.create ( 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_south_vss.append ( Horizontal.create ( 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) ) ) horizontal_north_vss.append ( Horizontal.create ( contact2, contact3, hCoronaLayer, init_Ymax + decalage*i, DbU_lambda(RING_WIDTH) ) )
if i != 2*n : if i != 2*n :
contact1 = Contact ( vdd, cCoronaLayer, init_Xmin - decalage* ( i + 1 ), init_Ymin - decalage*( i + 1 ) , contact_side, contact_side ) contact1 = Contact.create ( 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 ) contact2 = Contact.create ( 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 ) contact3 = Contact.create ( 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 ) contact4 = Contact.create ( 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_west_vdd.append ( Vertical.create ( 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) ) ) vertical_east_vdd.append ( Vertical.create ( 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_south_vdd.append ( Horizontal.create ( 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) ) ) 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 # MACRO pour les directions d'access des pins
UNDEFINED = 0 UNDEFINED = 0
@ -1158,9 +1156,9 @@ def pyPowerRing ( cell, core, n ) :
# Creer un contact a la place du pin # Creer un contact a la place du pin
if (allowedDepth > 2) and \ if (allowedDepth > 2) and \
re.search ( "METAL4", element_layer_name ) : old_contact = Contact ( vss, metal4, _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 ( vss, metal1, _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 ( vss, metal3, _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 : else :
raise ErrorMessage(2,"wrong layer of pin in the west of core : %s.\n" % element_layer_name) 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) contact_side = element.getHeight() - DbU_lambda(1.0)
if (allowedDepth > 2) and re.search( "METAL4", element_layer_name ) : if (allowedDepth > 2) and re.search( "METAL4", element_layer_name ) :
contact = Contact ( vss, via3 , contact_x , _y , contact_side , contact_side ) contact = Contact.create ( vss, via3 , contact_x , _y , contact_side , contact_side )
horizontal = Horizontal ( contact, old_contact , metal4 , _y , element.getHeight() ) horizontal = Horizontal.create ( contact, old_contact , metal4 , _y , element.getHeight() )
old_contact = contact old_contact = contact
else : else :
contact_via1 = Contact ( vss, via1 , contact_x , _y , contact_side , contact_side ) contact_via1 = Contact.create ( vss, via1 , contact_x , _y , contact_side , contact_side )
contact_via2 = Contact ( vss, via2 , contact_x , _y , contact_side , contact_side ) contact_via2 = Contact.create ( vss, via2 , contact_x , _y , contact_side , contact_side )
horizontal = Horizontal ( contact_via1 , old_contact , metal1 , _y , element.getHeight() ) horizontal = Horizontal.create ( contact_via1 , old_contact , metal1 , _y , element.getHeight() )
old_contact = contact_via1 old_contact = contact_via1
# Connection du cote de l'est # Connection du cote de l'est
@ -1203,13 +1201,13 @@ def pyPowerRing ( cell, core, n ) :
contact_side = element.getHeight() - DbU_lambda(1.0) contact_side = element.getHeight() - DbU_lambda(1.0)
if (allowedDepth > 2) and re.search( "METAL4", element_layer_name ) : if (allowedDepth > 2) and re.search( "METAL4", element_layer_name ) :
contact = Contact ( vss, via3 , contact_x , _y , contact_side, contact_side ) contact = Contact.create ( vss, via3 , contact_x , _y , contact_side, contact_side )
horizontal = Horizontal ( contact, old_contact , metal4 , _y , element.getHeight() ) horizontal = Horizontal.create ( contact, old_contact , metal4 , _y , element.getHeight() )
old_contact = contact old_contact = contact
else : else :
contact_via1 = Contact ( vss, via1 , contact_x , _y , contact_side , contact_side ) contact_via1 = Contact.create ( vss, via1 , contact_x , _y , contact_side , contact_side )
contact_via2 = Contact ( vss, via2 , contact_x , _y , contact_side , contact_side ) contact_via2 = Contact.create ( vss, via2 , contact_x , _y , contact_side , contact_side )
horizontal = Horizontal ( contact_via1 , old_contact , metal1 , _y , element.getHeight() ) horizontal = Horizontal.create ( contact_via1 , old_contact , metal1 , _y , element.getHeight() )
old_contact = contact_via1 old_contact = contact_via1
# Connection du cote du nord # 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 contact_y = init_Ymax + ( decalage*2 )*i # y du contact a creer
if re.search ( "METAL3", element_layer_name ) : if re.search ( "METAL3", element_layer_name ) :
contact = Contact ( vss, via3, _x, contact_y, element.getHeight(), element.getHeight() ) contact = Contact.create ( vss, via3, _x, contact_y, element.getHeight(), element.getHeight() )
vertical = Vertical ( contact, old_contact, metal3, _x, DbU_lambda(RING_WIDTH) ) vertical = Vertical.create ( contact, old_contact, metal3, _x, DbU_lambda(RING_WIDTH) )
old_contact = contact old_contact = contact
else : else :
raise ErrorMessage(2,"wrong layer of pin in the west of core : %s.\n"% element_layer_name) 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 contact_y = init_Ymin - ( decalage*2 )*i # x du contact a creer
if re.search ( "METAL3", element_layer_name ) : if re.search ( "METAL3", element_layer_name ) :
contact = Contact ( vss, via3, _x, contact_y, element.getHeight(), element.getHeight() ) contact = Contact.create ( vss, via3, _x, contact_y, element.getHeight(), element.getHeight() )
vertical = Vertical ( contact, old_contact, metal3, _x, DbU_lambda(RING_WIDTH) ) vertical = Vertical.create ( contact, old_contact, metal3, _x, DbU_lambda(RING_WIDTH) )
old_contact = contact old_contact = contact
else : else :
raise ErrorMessage(2,"wrong layer of pin in the west of core : %s."%element_layer_name) 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 # Creer un contact a la place du pin
if (allowedDepth > 2) and \ if (allowedDepth > 2) and \
re.search ( "METAL4", element_layer_name ) : old_contact = Contact ( vdd, metal4, _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 ( vdd, metal1, _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 ( vdd, metal3, _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 : else :
raise ErrorMessage(2,"wrong layer of pin in the west of core : %s."%element_layer_name) 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) contact_side = element.getHeight() - DbU_lambda(1.0)
if (allowedDepth > 2) and re.search( "METAL4", element_layer_name ) : if (allowedDepth > 2) and re.search( "METAL4", element_layer_name ) :
contact = Contact ( vdd, via3, contact_x, _y, contact_side, contact_side ) contact = Contact.create ( vdd, via3, contact_x, _y, contact_side, contact_side )
horizontal = Horizontal ( contact, old_contact, metal4, _y, element.getHeight() ) horizontal = Horizontal.create ( contact, old_contact, metal4, _y, element.getHeight() )
old_contact = contact old_contact = contact
else : else :
contact_via1 = Contact ( vdd, via1, contact_x, _y, contact_side, contact_side ) contact_via1 = Contact.create ( vdd, via1, contact_x, _y, contact_side, contact_side )
contact_via2 = Contact ( vdd, via2, contact_x, _y, contact_side, contact_side ) contact_via2 = Contact.create ( vdd, via2, contact_x, _y, contact_side, contact_side )
horizontal = Horizontal ( contact_via1, old_contact, metal1, _y, element.getHeight() ) horizontal = Horizontal.create ( contact_via1, old_contact, metal1, _y, element.getHeight() )
old_contact = contact_via1 old_contact = contact_via1
# Connection du cote de l'est # Connection du cote de l'est
@ -1313,13 +1311,13 @@ def pyPowerRing ( cell, core, n ) :
contact_side = element.getHeight() - DbU_lambda(1.0) contact_side = element.getHeight() - DbU_lambda(1.0)
if (allowedDepth > 2) and re.search( "METAL4", element_layer_name ) : if (allowedDepth > 2) and re.search( "METAL4", element_layer_name ) :
contact = Contact ( vdd, via3 , contact_x , _y , contact_side , contact_side ) contact = Contact.create ( vdd, via3 , contact_x , _y , contact_side , contact_side )
horizontal = Horizontal ( contact, old_contact , metal4 , _y , element.getHeight() ) horizontal = Horizontal.create ( contact, old_contact , metal4 , _y , element.getHeight() )
old_contact = contact old_contact = contact
else : else :
contact_via1 = Contact ( vdd, via1, contact_x, _y, contact_side, contact_side ) contact_via1 = Contact.create ( vdd, via1, contact_x, _y, contact_side, contact_side )
contact_via2 = Contact ( vdd, via2, contact_x, _y, contact_side, contact_side ) contact_via2 = Contact.create ( vdd, via2, contact_x, _y, contact_side, contact_side )
horizontal = Horizontal ( contact_via1, old_contact, metal1, _y, element.getHeight() ) horizontal = Horizontal.create ( contact_via1, old_contact, metal1, _y, element.getHeight() )
old_contact = contact_via1 old_contact = contact_via1
# Connection du cote du nord # 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 contact_y = init_Ymax + decalage + ( decalage*2 )*i # x du contact a creer
if re.search ( "METAL3", element_layer_name ) : if re.search ( "METAL3", element_layer_name ) :
contact = Contact ( vdd, via3, _x, contact_y, element.getHeight(), element.getHeight() ) contact = Contact.create ( vdd, via3, _x, contact_y, element.getHeight(), element.getHeight() )
vertical = Vertical ( contact, old_contact, metal3, _x, DbU_lambda(RING_WIDTH) ) vertical = Vertical.create ( contact, old_contact, metal3, _x, DbU_lambda(RING_WIDTH) )
old_contact = contact old_contact = contact
else : else :
raise ErrorMessage(2,"wrong layer of pin in the west of core : %s."%element_layer_name) 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 contact_y = init_Ymin - decalage - ( decalage*2 )*i # x du contact a creer
if re.search ( "METAL3", element_layer_name ) : if re.search ( "METAL3", element_layer_name ) :
contact = Contact ( vdd, via3, _x, contact_y, element.getHeight(), element.getHeight() ) contact = Contact.create ( vdd, via3, _x, contact_y, element.getHeight(), element.getHeight() )
vertical = Vertical ( contact, old_contact, metal3, _x, DbU_lambda(RING_WIDTH) ) vertical = Vertical.create ( contact, old_contact, metal3, _x, DbU_lambda(RING_WIDTH) )
old_contact = contact old_contact = contact
else : else :
raise ErrorMessage(2,"wrong layer of pin in the west of core : %s."%element_layer_name) 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() ) X = pad_inst.getTransformation().getX ( element.getX(), element.getY() )
Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() ) Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() )
Contact ( vss, via2, X, Y, height, height ) Contact.create ( vss, via2, X, Y, height, height )
contactPad = Contact ( vss, via1, X, Y, height, height ) contactPad = Contact.create ( vss, via1, X, Y, height, height )
Horizontal ( contactPad, vertical_east_vss[-1], metal1, Y, DbU_lambda ( RING_WIDTH ) ) Horizontal.create ( contactPad, vertical_east_vss[-1], metal1, Y, DbU_lambda ( RING_WIDTH ) )
Contact ( vss, via1, vertical_east_vss[-1].getX(), Y, height, height ) Contact.create ( 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, vertical_east_vss[-1].getX(), Y, height, height )
for element in NetExternalComponents.get ( pad_inst.getMasterCell().getNet("vddi") ): for element in NetExternalComponents.get ( pad_inst.getMasterCell().getNet("vddi") ):
layer = element.getLayer() layer = element.getLayer()
@ -1400,10 +1398,10 @@ def pyPowerRing ( cell, core, n ) :
Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() ) Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() )
#Contact ( vdd, via2, X, Y, height, height ) #Contact ( vdd, via2, X, Y, height, height )
contactPad = Contact ( vdd, via1, X, Y, height, height ) contactPad = Contact.create ( vdd, via1, X, Y, height, height )
Horizontal ( contactPad, vertical_east_vdd[-1], metal1, Y, DbU_lambda ( RING_WIDTH ) ) Horizontal.create ( contactPad, vertical_east_vdd[-1], metal1, Y, DbU_lambda ( RING_WIDTH ) )
Contact ( vdd, via1, vertical_east_vdd[-1].getX(), Y, height, height ) Contact.create ( vdd, via1, vertical_east_vdd[-1].getX(), Y, height, height )
Contact ( vdd, via2, 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 : for pad_inst in pad_west :
if isInternalPowerPad ( pad_inst ) or isExternalPowerPad ( pad_inst ) \ 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() ) Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() )
#Contact ( vss, via2, X, Y, height, height ) #Contact ( vss, via2, X, Y, height, height )
contactPad = Contact ( vss, via1, X, Y, height, height ) contactPad = Contact.create ( vss, via1, X, Y, height, height )
Horizontal ( contactPad, vertical_west_vss[-1], metal1, Y, DbU_lambda ( RING_WIDTH ) ) Horizontal.create ( contactPad, vertical_west_vss[-1], metal1, Y, DbU_lambda ( RING_WIDTH ) )
Contact ( vss, via1, vertical_west_vss[-1].getX(), Y, height, height ) Contact.create ( vss, via1, vertical_west_vss[-1].getX(), Y, height, height )
Contact ( vss, via2, 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") ): for element in NetExternalComponents.get ( pad_inst.getMasterCell().getNet("vddi") ):
layer = element.getLayer() layer = element.getLayer()
@ -1434,10 +1432,10 @@ def pyPowerRing ( cell, core, n ) :
Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() ) Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() )
#Contact ( vdd, via2, X, Y, height, height ) #Contact ( vdd, via2, X, Y, height, height )
contactPad = Contact ( vdd, via1, X, Y, height, height ) contactPad = Contact.create ( vdd, via1, X, Y, height, height )
Horizontal ( contactPad, vertical_west_vdd[-1], metal1, Y, DbU_lambda ( RING_WIDTH ) ) Horizontal.create ( contactPad, vertical_west_vdd[-1], metal1, Y, DbU_lambda ( RING_WIDTH ) )
Contact ( vdd, via1, vertical_west_vdd[-1].getX(), Y, height, height ) Contact.create ( vdd, via1, vertical_west_vdd[-1].getX(), Y, height, height )
Contact ( vdd, via2, 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 : for pad_inst in pad_north :
if isInternalPowerPad ( pad_inst ) or isExternalPowerPad ( pad_inst ) \ 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() ) X = pad_inst.getTransformation().getX ( element.getX(), element.getY() )
Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() ) Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() )
Contact ( vss, via1, X, Y, height, height ) Contact.create ( vss, via1, X, Y, height, height )
#Contact ( vss, via2, X, Y, height, height ) #Contact.create ( vss, via2, X, Y, height, height )
contactPad = Contact ( vss, metal1, X, Y, height, height ) contactPad = Contact.create ( vss, metal1, X, Y, height, height )
Vertical ( contactPad, horizontal_north_vss[-1], metal1, X , DbU_lambda ( RING_WIDTH ) ) Vertical.create ( contactPad, horizontal_north_vss[-1], metal1, X , DbU_lambda ( RING_WIDTH ) )
Contact ( vss, via1, X, horizontal_north_vss[-1].getY(), height, height ) Contact.create ( vss, via1, X, horizontal_north_vss[-1].getY(), height, height )
if allowedDepth > 2: if allowedDepth > 2:
Contact ( vss, via2, X, horizontal_north_vss[-1].getY(), height, height ) Contact.create ( vss, via2, X, horizontal_north_vss[-1].getY(), height, height )
Contact ( vss, via3, 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") ): for element in NetExternalComponents.get ( pad_inst.getMasterCell().getNet("vddi") ):
layer = element.getLayer() layer = element.getLayer()
@ -1471,15 +1469,15 @@ def pyPowerRing ( cell, core, n ) :
X = pad_inst.getTransformation().getX ( element.getX(), element.getY() ) X = pad_inst.getTransformation().getX ( element.getX(), element.getY() )
Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() ) Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() )
Contact ( vdd, via1, X, Y, height, height ) Contact.create ( vdd, via1, X, Y, height, height )
#Contact ( vdd, via2, X, Y, height, height ) #Contact.create ( vdd, via2, X, Y, height, height )
contactPad = Contact ( vdd, metal1, X, Y, height, height ) contactPad = Contact.create ( vdd, metal1, X, Y, height, height )
Vertical ( contactPad, horizontal_north_vdd[-1], metal1, X, DbU_lambda ( RING_WIDTH ) ) Vertical.create ( contactPad, horizontal_north_vdd[-1], metal1, X, DbU_lambda ( RING_WIDTH ) )
Contact ( vdd, via1, X, horizontal_north_vdd[-1].getY(), height, height ) Contact.create ( vdd, via1, X, horizontal_north_vdd[-1].getY(), height, height )
if allowedDepth > 2: if allowedDepth > 2:
Contact ( vdd, via2, X, horizontal_north_vdd[-1].getY(), height, height ) Contact.create ( vdd, via2, X, horizontal_north_vdd[-1].getY(), height, height )
Contact ( vdd, via3, 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 : for pad_inst in pad_south :
if isInternalPowerPad ( pad_inst ) or isExternalPowerPad ( pad_inst ) \ 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() ) X = pad_inst.getTransformation().getX ( element.getX(), element.getY() )
Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() ) Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() )
Contact ( vss, via1, X, Y, height, height ) Contact.create ( vss, via1, X, Y, height, height )
#Contact ( vss, via2, X, Y, height, height ) #Contact.create ( vss, via2, X, Y, height, height )
contactPad = Contact ( vss, metal1, X, Y, height, height ) contactPad = Contact.create ( vss, metal1, X, Y, height, height )
Vertical ( contactPad, horizontal_south_vss[-1], metal1, X , DbU_lambda ( RING_WIDTH ) ) Vertical.create ( contactPad, horizontal_south_vss[-1], metal1, X , DbU_lambda ( RING_WIDTH ) )
Contact ( vss, via1, X, horizontal_south_vss[-1].getY(), height, height ) Contact.create ( vss, via1, X, horizontal_south_vss[-1].getY(), height, height )
if allowedDepth > 2: if allowedDepth > 2:
Contact ( vss, via2, X, horizontal_south_vss[-1].getY(), height, height ) Contact.create ( vss, via2, X, horizontal_south_vss[-1].getY(), height, height )
Contact ( vss, via3, 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") ): for element in NetExternalComponents.get ( pad_inst.getMasterCell().getNet("vddi") ):
layer = element.getLayer() layer = element.getLayer()
@ -1513,15 +1511,15 @@ def pyPowerRing ( cell, core, n ) :
X = pad_inst.getTransformation().getX ( element.getX(), element.getY() ) X = pad_inst.getTransformation().getX ( element.getX(), element.getY() )
Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() ) Y = pad_inst.getTransformation().getY ( element.getX(), element.getY() )
Contact ( vdd, via1, X, Y, height, height ) Contact.create ( vdd, via1, X, Y, height, height )
#Contact ( vdd, via2, X, Y, height, height ) #Contact.create ( vdd, via2, X, Y, height, height )
contactPad = Contact ( vdd, metal1, X, Y, height, height ) contactPad = Contact.create ( vdd, metal1, X, Y, height, height )
Vertical ( contactPad, horizontal_south_vdd[-1], metal1, X , DbU_lambda ( RING_WIDTH ) ) Vertical.create ( contactPad, horizontal_south_vdd[-1], metal1, X , DbU_lambda ( RING_WIDTH ) )
Contact ( vdd, via1, X, horizontal_south_vdd[-1].getY(), height, height ) Contact.create ( vdd, via1, X, horizontal_south_vdd[-1].getY(), height, height )
if allowedDepth > 2: if allowedDepth > 2:
Contact ( vdd, via2, X, horizontal_south_vdd[-1].getY(), height, height ) Contact.create ( vdd, via2, X, horizontal_south_vdd[-1].getY(), height, height )
Contact ( vdd, via3, 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 # On calcule les differents points aux angles pour chaque net
X_point = cell_Xmin + Y X_point = cell_Xmin + Y
Y_point = cell_Ymin + 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] ] ) ) points_0.append ( dict ( [ ['X',X_point], ['Y',Y_point], ['N',NET], ['L',layer], ['R',RING_HEIGHT], ['C',contact] ] ) )
X_point = cell_Xmin + Y X_point = cell_Xmin + Y
Y_point = cell_Ymin + ( cell_Ymax - 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] ] ) ) 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 ) X_point = cell_Xmin + ( cell_Xmax - Y )
Y_point = cell_Ymin + ( cell_Ymax - 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] ] ) ) 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 ) X_point = cell_Xmin + ( cell_Xmax - Y )
Y_point = cell_Ymin + 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] ] ) ) 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
# end of while # end of while
@ -1587,16 +1585,16 @@ def pyPowerRing ( cell, core, n ) :
if ins_pad == pad_north[0] : if ins_pad == pad_north[0] :
for point in points_1 : for point in points_1 :
contact = Contact ( point['N'], point['L'], X_pad, point['Y'], point['R'], point['R'] ) contact = Contact.create ( point['N'], point['L'], X_pad, point['Y'], point['R'], point['R'] )
Horizontal ( point['C'], contact, point['L'], point['Y'], point['R'] ) Horizontal.create ( point['C'], contact, point['L'], point['Y'], point['R'] )
else : else :
for point in points_1 : 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] : if ins_pad == pad_north[-1] :
for point in points_2 : for point in points_2 :
contact = Contact ( point['N'], point['L'], X_pad, point['Y'], point['R'], point['R'] ) contact = Contact.create ( point['N'], point['L'], X_pad, point['Y'], point['R'], point['R'] )
Horizontal ( contact, point['C'], point['L'], point['Y'], point['R'] ) Horizontal.create ( contact, point['C'], point['L'], point['Y'], point['R'] )
old_X_pad = X_pad old_X_pad = X_pad
@ -1607,16 +1605,16 @@ def pyPowerRing ( cell, core, n ) :
if ins_pad == pad_east[0] : if ins_pad == pad_east[0] :
for point in points_3 : for point in points_3 :
contact = Contact ( point['N'], point['L'], point['X'], Y_pad, point['R'], point['R'] ) contact = Contact.create ( point['N'], point['L'], point['X'], Y_pad, point['R'], point['R'] )
Vertical ( point['C'], contact, point['L'], point['X'], point['R'] ) Vertical.create ( point['C'], contact, point['L'], point['X'], point['R'] )
else : else :
for point in points_3 : 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] : if ins_pad == pad_east[-1] :
for point in points_2 : for point in points_2 :
contact = Contact ( point['N'], point['L'], point['X'], Y_pad, point['R'], point['R'] ) contact = Contact.create ( point['N'], point['L'], point['X'], Y_pad, point['R'], point['R'] )
Vertical ( contact, point['C'], point['L'], point['X'], point['R'] ) Vertical.create ( contact, point['C'], point['L'], point['X'], point['R'] )
old_Y_pad = Y_pad old_Y_pad = Y_pad
@ -1627,16 +1625,16 @@ def pyPowerRing ( cell, core, n ) :
if ins_pad == pad_south[0] : if ins_pad == pad_south[0] :
for point in points_0 : for point in points_0 :
contact = Contact ( point['N'], point['L'], X_pad, point['Y'], point['R'], point['R'] ) contact = Contact.create ( point['N'], point['L'], X_pad, point['Y'], point['R'], point['R'] )
Horizontal ( point['C'], contact, point['L'], point['Y'], point['R'] ) Horizontal.create ( point['C'], contact, point['L'], point['Y'], point['R'] )
else : else :
for point in points_0 : 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] : if ins_pad == pad_south[-1] :
for point in points_3 : for point in points_3 :
contact = Contact ( point['N'], point['L'], X_pad, point['Y'], point['R'], point['R'] ) contact = Contact.create ( point['N'], point['L'], X_pad, point['Y'], point['R'], point['R'] )
Horizontal ( contact, point['C'], point['L'], point['Y'], point['R'] ) Horizontal.create ( contact, point['C'], point['L'], point['Y'], point['R'] )
old_X_pad = X_pad old_X_pad = X_pad
@ -1647,16 +1645,16 @@ def pyPowerRing ( cell, core, n ) :
if ins_pad == pad_west[0] : if ins_pad == pad_west[0] :
for point in points_0 : for point in points_0 :
contact = Contact ( point['N'], point['L'], point['X'], Y_pad, point['R'], point['R'] ) contact = Contact.create ( point['N'], point['L'], point['X'], Y_pad, point['R'], point['R'] )
Vertical ( point['C'], contact, point['L'], point['X'], point['R'] ) Vertical.create ( point['C'], contact, point['L'], point['X'], point['R'] )
else : else :
for point in points_0 : 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] : if ins_pad == pad_west[-1] :
for point in points_1 : for point in points_1 :
contact = Contact ( point['N'], point['L'], point['X'], Y_pad, point['R'], point['R'] ) contact = Contact.create ( point['N'], point['L'], point['X'], Y_pad, point['R'], point['R'] )
Vertical ( contact, point['C'], point['L'], point['X'], point['R'] ) Vertical.create ( contact, point['C'], point['L'], point['X'], point['R'] )
old_Y_pad = Y_pad old_Y_pad = Y_pad
@ -1676,7 +1674,7 @@ def create_inst ( model, name, cell ) :
if not modelmastercell : if not modelmastercell :
raise ErrorMessage(2,"Cannot create instance %s : model %s does not exist in the database."%(name,model)) 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 # Connection
plugGround = inst.getPlug ( iter(modelmastercell.getGroundNets()).next() ) 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())) raise ErrorMessage(2,"Layout : The instance of %s has not been created."%str(inst.getName()))
# Error : if the instance is already placed # 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())) raise ErrorMessage(2,"Placement : the instance %s is already placed."%str(inst.getName()))
UpdateSession.open() UpdateSession.open()
## A COMPLETER POUR FAIRE DES PLACE AVEC TOUTES LES SYMETRIES ## ## A COMPLETER POUR FAIRE DES PLACE AVEC TOUTES LES SYMETRIES ##
if orientation == OrientationMY : if orientation == Transformation.Orientation.MY :
y += inst.getAbutmentBox().getHeight() y += inst.getAbutmentBox().getHeight()
inst.setTransformation ( Transformation ( x, y, orientation ) ) inst.setTransformation ( Transformation ( x, y, orientation ) )
inst.setPlacementStatus ( PlacementStatusFIXED ) inst.setPlacementStatus ( Instance.PlacementStatus.FIXED )
UpdateSession.close() UpdateSession.close()
@ -1737,7 +1735,7 @@ def getAllStandardInstances ( cell ) :
for element in cell.getInstances(): for element in cell.getInstances():
# FOR EACH PLACED or FIXED instance of the cell, we call getStandardInstances method # 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() ) reference = getStandardInstances ( cell, element, element.getTransformation(), cell.getName() )
return reference return reference
@ -1752,7 +1750,7 @@ def getStandardInstances ( cell, inst, transformation, name_masterinst ) :
global standard_instances_masque, reference global standard_instances_masque, reference
# Si l'instance est PLACED ou FIXED # Si l'instance est PLACED ou FIXED
if inst.getPlacementStatus() != PlacementStatusUNPLACED : if inst.getPlacementStatus() != Instance.PlacementStatus.UNPLACED :
name = str ( inst.getMasterCell().getLibrary().getName() ) name = str ( inst.getMasterCell().getLibrary().getName() )
if inst.isLeaf() : if inst.isLeaf() :
@ -2057,22 +2055,22 @@ def createGrid ( my_tuple ) :
def CreateZ ( contact1, contact2 ) : def CreateZ ( contact1, contact2 ) :
centerX = (contact1.getX() + contact2.getX() ) / 2 centerX = (contact1.getX() + contact2.getX() ) / 2
centerX = centerX - (centerX % DbU_lambda(5)) centerX = centerX - (centerX % DbU_lambda(5))
zContact1 = Contact ( net, via5, centerX, contact1.getY(), DbU_lambda(11), DbU_lambda(11) ) zContact1 = Contact.create ( net, via5, centerX, contact1.getY(), DbU_lambda(11), DbU_lambda(11) )
zContact2 = Contact ( net, via5, centerX, contact2.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) ) Horizontal.create ( contact1, zContact1, metal6, contact1.getY(), DbU_lambda(12) )
Vertical ( zContact1, zContact2, metal5, zContact1.getX(), DbU_lambda(12) ) Vertical.create ( zContact1, zContact2, metal5, zContact1.getX(), DbU_lambda(12) )
Horizontal ( zContact2, contact2, metal6, zContact2.getY(), DbU_lambda(12) ) Horizontal.create ( zContact2, contact2, metal6, zContact2.getY(), DbU_lambda(12) )
def CreateN ( contact1, contact2 ) : def CreateN ( contact1, contact2 ) :
centerY = ( contact1.getY() + contact2.getY() ) / 2 centerY = ( contact1.getY() + contact2.getY() ) / 2
centerY = centerY - ( centerY % DbU_lambda(5) ) centerY = centerY - ( centerY % DbU_lambda(5) )
nContact1 = Contact ( net, via5, contact1.getX(), centerY, DbU_lambda(11), DbU_lambda(11) ) nContact1 = Contact.create ( net, via5, contact1.getX(), centerY, DbU_lambda(11), DbU_lambda(11) )
nContact2 = Contact ( net, via5, contact2.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) ) Vertical.create ( contact1, nContact1, metal5, contact1.getX(), DbU_lambda(12) )
Horizontal ( nContact1, nContact2, metal6, nContact1.getY(), DbU_lambda(12) ) Horizontal.create ( nContact1, nContact2, metal6, nContact1.getY(), DbU_lambda(12) )
Vertical ( nContact2, contact2, metal5, nContact2.getX(), DbU_lambda(12) ) Vertical.create ( nContact2, contact2, metal5, nContact2.getX(), DbU_lambda(12) )
def FindPositionForContact ( position, contactlist1, contactlist2 ) : def FindPositionForContact ( position, contactlist1, contactlist2 ) :
def PositionIsInTargetRange ( position, target ) : def PositionIsInTargetRange ( position, target ) :
@ -2117,9 +2115,9 @@ def createGrid ( my_tuple ) :
_Ymax = coreBox.getYMax() _Ymax = coreBox.getYMax()
ck_contact_list = [] 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" ) via1 = db.getTechnology().getLayer ( "VIA12" )
via2 = db.getTechnology().getLayer ( "VIA23" ) via2 = db.getTechnology().getLayer ( "VIA23" )
via3 = db.getTechnology().getLayer ( "VIA34" ) via3 = db.getTechnology().getLayer ( "VIA34" )
@ -2136,10 +2134,10 @@ def createGrid ( my_tuple ) :
gridBoundingBox.inflate ( DbU_lambda(15) ) gridBoundingBox.inflate ( DbU_lambda(15) )
#Create the Bounding Box grid #Create the Bounding Box grid
NEContact = Contact ( net, via5, gridBoundingBox.getXMin(), gridBoundingBox.getYMax() , DbU_lambda(11), DbU_lambda(11) ) NEContact = Contact.create ( 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) ) NWContact = Contact.create ( 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) ) SEContact = Contact.create ( 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) ) SWContact = Contact.create ( net, via5, gridBoundingBox.getXMax(), gridBoundingBox.getYMin() , DbU_lambda(11), DbU_lambda(11) )
northSegment = Segment ( NEContact, NWContact, metal6, DbU_lambda(12) ) northSegment = Segment ( NEContact, NWContact, metal6, DbU_lambda(12) )
southSegment = Segment ( SEContact, SWContact, metal6, DbU_lambda(12) ) southSegment = Segment ( SEContact, SWContact, metal6, DbU_lambda(12) )
eastSegment = Segment ( NEContact, SEContact, metal5, DbU_lambda(12) ) eastSegment = Segment ( NEContact, SEContact, metal5, DbU_lambda(12) )
@ -2178,7 +2176,7 @@ def createGrid ( my_tuple ) :
elif x == gridBoundingBox.getXMax() : elif x == gridBoundingBox.getXMax() :
gridContact = NEContact gridContact = NEContact
else : 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) southContacts.append(x)
elif y > gridBoundingBox.getYMax() : elif y > gridBoundingBox.getYMax() :
@ -2187,7 +2185,7 @@ def createGrid ( my_tuple ) :
elif x == gridBoundingBox.getXMax() : elif x == gridBoundingBox.getXMax() :
gridBoundingBox = SEContact gridBoundingBox = SEContact
else : 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) northContacts.append(x)
else : else :
raise ErrorMessage(2,"RouteCK : bad pad placement.") raise ErrorMessage(2,"RouteCK : bad pad placement.")
@ -2200,7 +2198,7 @@ def createGrid ( my_tuple ) :
elif y == gridBoundingBox.getYMax() : elif y == gridBoundingBox.getYMax() :
gridContact = NWContact gridContact = NWContact
else : 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) eastContacts.append(y)
elif x > gridBoundingBox.getXMax() : elif x > gridBoundingBox.getXMax() :
if y == gridBoundingBox.getYMin() : if y == gridBoundingBox.getYMin() :
@ -2208,7 +2206,7 @@ def createGrid ( my_tuple ) :
elif y == gridBoundingBox.getYMax() : elif y == gridBoundingBox.getYMax() :
gridContact = SWContact gridContact = SWContact
else : 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) westContacts.append(y)
else : else :
raise ErrorMessage(2,"RouteCK : bad pad placement.") raise ErrorMessage(2,"RouteCK : bad pad placement.")
@ -2219,7 +2217,7 @@ def createGrid ( my_tuple ) :
] ]
raise ErrorMessage(2,message) 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) ) Segment ( compContact, gridContact, layer , DbU_lambda(12) )
@ -2244,8 +2242,8 @@ def createGrid ( my_tuple ) :
x = x - (x % DbU_lambda(5)) x = x - (x % DbU_lambda(5))
x = FindPositionForContact(x, northContacts, southContacts) x = FindPositionForContact(x, northContacts, southContacts)
contact1 = Contact ( southSegment, via5, x, 0, DbU_lambda(11), DbU_lambda(11)) contact1 = Contact.create ( southSegment, via5, x, 0, DbU_lambda(11), DbU_lambda(11))
contact2 = Contact ( northSegment, 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) ) Segment ( contact1, contact2, metal5, DbU_lambda(12) )
@ -2256,14 +2254,14 @@ def createGrid ( my_tuple ) :
y = y - ( y % DbU_lambda(5) ) y = y - ( y % DbU_lambda(5) )
y = FindPositionForContact ( y, eastContacts, westContacts ) y = FindPositionForContact ( y, eastContacts, westContacts )
contact1 = Contact ( westSegment, via5, 0, y, DbU_lambda(11), DbU_lambda(11) ) contact1 = Contact.create ( westSegment, via5, 0, y, DbU_lambda(11), DbU_lambda(11) )
contact2 = Contact ( eastSegment, 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) ) horizontal = Segment ( contact1, contact2, metal6, DbU_lambda(12) )
yList.append ( y ) 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 # Connection to the grid
# Cette liste contient les contacts qui sont deja crees # Cette liste contient les contacts qui sont deja crees
@ -2273,7 +2271,7 @@ def createGrid ( my_tuple ) :
for contact in ck_contact_list : for contact in ck_contact_list :
xContact = contact[0] xContact = contact[0]
yContact = contact[1] 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 #find the closest x,y on grid
xList.insert ( 0, gridBoundingBox.getXMin() ) xList.insert ( 0, gridBoundingBox.getXMin() )
yList.insert ( 0, gridBoundingBox.getYMin() ) yList.insert ( 0, gridBoundingBox.getYMin() )
@ -2286,35 +2284,35 @@ def createGrid ( my_tuple ) :
xDistance = abs ( xTarget - xContact ) xDistance = abs ( xTarget - xContact )
yDistance = abs ( yTarget - yContact ) yDistance = abs ( yTarget - yContact )
Contact(net, via2, xContact, yContact, via23Side, via23Side ) Contact.create(net, via2, xContact, yContact, via23Side, via23Side )
Contact(net, via3, xContact, yContact, via34Side, via34Side ) Contact.create(net, via3, xContact, yContact, via34Side, via34Side )
Contact(net, via4, xContact, yContact, via45Side, via45Side ) Contact.create(net, via4, xContact, yContact, via45Side, via45Side )
if xDistance != 0 or yDistance != 0 : if xDistance != 0 or yDistance != 0 :
if ( xDistance <= yDistance + DbU_lambda(10) ): # test pour faire un horizontal if ( xDistance <= yDistance + DbU_lambda(10) ): # test pour faire un horizontal
if xDistance != 0 : if xDistance != 0 :
if abs(xDistance) <= DbU_lambda(3) : 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 layer = metal5
else : else :
Contact ( net, via5, xContact, yContact, via56Side, via56Side ) Contact.create ( net, via5, xContact, yContact, via56Side, via56Side )
gridContact = Contact ( net, via5, xTarget, yContact, via56Side, via56Side ) gridContact = Contact.create ( net, via5, xTarget, yContact, via56Side, via56Side )
layer = metal6 layer = metal6
Horizontal( gridContact, plugContact, layer, gridContact.getY(), DbU_lambda(2) ) Horizontal.create( gridContact, plugContact, layer, gridContact.getY(), DbU_lambda(2) )
else : else :
gridContact = Contact ( net, via5, xTarget, yContact, via56Side, via56Side ) gridContact = Contact.create ( net, via5, xTarget, yContact, via56Side, via56Side )
else: else:
if yDistance != 0 : if yDistance != 0 :
if abs(yDistance) <= DbU_lambda(3) : if abs(yDistance) <= DbU_lambda(3) :
layer = metal6 layer = metal6
gridContact = Contact ( net, metal6, xContact, yTarget, via56Side, via56Side ) gridContact = Contact.create ( net, metal6, xContact, yTarget, via56Side, via56Side )
Contact ( net, via5, xContact, yContact, via56Side, via56Side ) Contact.create ( net, via5, xContact, yContact, via56Side, via56Side )
else : else :
gridContact = Contact ( net, via5, xContact, yTarget, via56Side, via56Side ) gridContact = Contact.create ( net, via5, xContact, yTarget, via56Side, via56Side )
layer = metal5 layer = metal5
Vertical ( gridContact, plugContact, layer, gridContact.getX(), DbU_lambda(2) ) Vertical.create ( gridContact, plugContact, layer, gridContact.getX(), DbU_lambda(2) )
else : else :
gridContact = Contact ( net, via5, xContact, yTarget, via56Side, via56Side ) gridContact = Contact.create ( net, via5, xContact, yTarget, via56Side, via56Side )
del _Xmin del _Xmin
del _Ymin del _Ymin
@ -2335,7 +2333,7 @@ def getNetInstances ( cell, net, transformation) :
# Si c est une instance de type leaf # Si c est une instance de type leaf
if ins.isLeaf() : if ins.isLeaf() :
if ins.getPlacementStatus() == PlacementStatusUNPLACED : if ins.getPlacementStatus() == Instance.PlacementStatus.UNPLACED :
raise ErrorMessage(2,"getNetInstances : instance %s is unplaced" % str(ins.getName())) raise ErrorMessage(2,"getNetInstances : instance %s is unplaced" % str(ins.getName()))
else : else :
if not isPad ( ins ) : 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" if ( not ck_contact_list ) : print "Error in function getNetInstances : no segment found"
else : else :
if ins.getPlacementStatus() == PlacementStatusUNPLACED : if ins.getPlacementStatus() == Instance.PlacementStatus.UNPLACED :
raise ErrorMessage(2,"getNetInstances : instance %s is unplaced" % str(ins.getName())) raise ErrorMessage(2,"getNetInstances : instance %s is unplaced" % str(ins.getName()))
else : else :
getNetInstances ( cell, plug.getMasterNet(), transformation.getTransformation ( ins.getTransformation () )) getNetInstances ( cell, plug.getMasterNet(), transformation.getTransformation ( ins.getTransformation () ))
@ -2391,12 +2389,12 @@ def getNetInstances ( cell, net, transformation) :
def getNonCLayer ( layer ) : def getNonCLayer ( layer ) :
'''This function returns the nonC layer corresponding to the one given as argument''' '''This function returns the nonC layer corresponding to the one given as argument'''
metal1 = getDataBase ().getTechnology ().getLayer ( "METAL1" ) metal1 = DataBase.getDB ().getTechnology ().getLayer ( "METAL1" )
metal2 = getDataBase ().getTechnology ().getLayer ( "METAL2" ) metal2 = DataBase.getDB ().getTechnology ().getLayer ( "METAL2" )
metal3 = getDataBase ().getTechnology ().getLayer ( "METAL3" ) metal3 = DataBase.getDB ().getTechnology ().getLayer ( "METAL3" )
metal4 = getDataBase ().getTechnology ().getLayer ( "METAL4" ) metal4 = DataBase.getDB ().getTechnology ().getLayer ( "METAL4" )
metal5 = getDataBase ().getTechnology ().getLayer ( "METAL5" ) metal5 = DataBase.getDB ().getTechnology ().getLayer ( "METAL5" )
metal6 = getDataBase ().getTechnology ().getLayer ( "METAL6" ) metal6 = DataBase.getDB ().getTechnology ().getLayer ( "METAL6" )
if re.search ( "CMETAL1", str ( layer.getName() ) ) : return metal1 if re.search ( "CMETAL1", str ( layer.getName() ) ) : return metal1
if re.search ( "CMETAL2", str ( layer.getName() ) ) : return metal2 if re.search ( "CMETAL2", str ( layer.getName() ) ) : return metal2
@ -2411,7 +2409,7 @@ def getNonCLayer ( layer ) :
def Segment ( component1, component2, layer, width ) : def Segment ( component1, component2, layer, width ) :
'''This function creates a segment linking component1 and component2''' '''This function creates a segment linking component1 and component2'''
if component1.getX() == component2.getX() : return Vertical ( component1, component2, layer, component1.getX(), width ) if component1.getX() == component2.getX() : return Vertical.create ( component1, component2, layer, component1.getX(), width )
elif component1.getY() == component2.getY() : return Horizontal ( component1, component2, layer, component1.getY(), width ) elif component1.getY() == component2.getY() : return Horizontal.create ( component1, component2, layer, component1.getY(), width )
else: else:
raise ErrorMessage(2,"Segment : the components must be horizontaly or verticaly aligned.") raise ErrorMessage(2,"Segment : the components must be horizontaly or verticaly aligned.")

View File

@ -52,6 +52,7 @@
.. |ControllerInspector_2| replace:: :raw-html:`<center><img src="./images/Controller-Inspector-2.png" alt="Controller Basic Snapshot"></center>` .. |ControllerInspector_2| replace:: :raw-html:`<center><img src="./images/Controller-Inspector-2.png" alt="Controller Basic Snapshot"></center>`
.. |ControllerInspector_3| replace:: :raw-html:`<center><img src="./images/Controller-Inspector-3.png" alt="Controller Basic Snapshot"></center>` .. |ControllerInspector_3| replace:: :raw-html:`<center><img src="./images/Controller-Inspector-3.png" alt="Controller Basic Snapshot"></center>`
.. |ControllerSettings_1| replace:: :raw-html:`<center><img src="./images/Controller-Settings-1.png" alt="Controller Basic Snapshot"></center>` .. |ControllerSettings_1| replace:: :raw-html:`<center><img src="./images/Controller-Settings-1.png" alt="Controller Basic Snapshot"></center>`
.. |CoriolisSoftSchema| replace:: :raw-html:`<center><img src="./images/Coriolis-Soft-Schema.png" alt="Coriolis Software Schematic"></center>`
.. |BigMouse| image:: ./images/ComputerMouse.png .. |BigMouse| image:: ./images/ComputerMouse.png
:scale: 25% :scale: 25%

View File

@ -53,6 +53,7 @@
.. |ControllerInspector_2| replace:: :raw-latex:`\begin{center}\includegraphics[width=.7\textwidth]{./images/Controller-Inspector-2.eps}\end{center}` .. |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}` .. |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}` .. |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 .. |BigMouse| image:: ./images/ComputerMouse.eps
:scale: 25% :scale: 25%

View File

@ -19,147 +19,166 @@
\@writefile{toc}{\select@language{english}} \@writefile{toc}{\select@language{english}}
\@writefile{lof}{\select@language{english}} \@writefile{lof}{\select@language{english}}
\@writefile{lot}{\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{coriolis-user-s-guide}{{}{1}{\relax }{section*.1}{}}
\newlabel{contents}{{}{1}{\relax }{section*.2}{}} \newlabel{contents}{{}{1}{\relax }{section*.2}{}}
\HyPL@Entry{1<</P(2)>>} \HyPL@Entry{1<</P(2)>>}
\@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}{}} \newlabel{credits-license}{{}{2}{\relax }{section*.3}{}}
\HyPL@Entry{2<</P(3)>>} \HyPL@Entry{2<</P(3)>>}
\@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}{}} \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}{}} \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}{}} \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}{}} \newlabel{release-1-0-2049}{{}{3}{\relax }{section*.7}{}}
\HyPL@Entry{3<</P(4)>>} \@writefile{toc}{\contentsline {subsubsection}{Release v2.0.1}{3}{section*.8}}
\@writefile{toc}{\contentsline {subsection}{Release v2.0.0 (c0b9992)}{4}{section*.8}} \newlabel{release-v2-0-1}{{}{3}{\relax }{section*.8}{}}
\newlabel{release-v2-0-0-c0b9992}{{}{4}{\relax }{section*.8}{}}
\gdef \LT@i {\LT@entry \gdef \LT@i {\LT@entry
{1}{114.85526pt}\LT@entry {1}{114.85526pt}\LT@entry
{1}{303.50418pt}} {1}{303.50418pt}}
\HyPL@Entry{3<</P(4)>>}
\@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<</P(5)>>} \HyPL@Entry{4<</P(5)>>}
\@writefile{toc}{\contentsline {section}{Installation}{5}{section*.9}} \@writefile{toc}{\contentsline {subsubsection}{Building Coriolis}{5}{section*.11}}
\newlabel{installation}{{}{5}{\relax }{section*.9}{}} \newlabel{building-coriolis}{{}{5}{\relax }{section*.11}{}}
\@writefile{toc}{\contentsline {subsection}{Fixed Directory Tree}{5}{section*.10}} \@writefile{toc}{\contentsline {paragraph}{Additionnal Requirement under MacOS}{5}{section*.12}}
\newlabel{fixed-directory-tree}{{}{5}{\relax }{section*.10}{}} \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<</P(6)>>} \HyPL@Entry{5<</P(6)>>}
\@writefile{toc}{\contentsline {subsection}{Building Coriolis}{6}{section*.11}} \@writefile{toc}{\contentsline {subsubsection}{Hooking up into Alliance}{6}{section*.14}}
\newlabel{building-coriolis}{{}{6}{\relax }{section*.11}{}} \newlabel{hooking-up-into-alliance}{{}{6}{\relax }{section*.14}{}}
\@writefile{toc}{\contentsline {subsection}{Packaging Coriolis}{6}{section*.12}} \@writefile{toc}{\contentsline {subsubsection}{Environment Helper}{6}{section*.15}}
\newlabel{packaging-coriolis}{{}{6}{\relax }{section*.12}{}} \newlabel{environment-helper}{{}{6}{\relax }{section*.15}{}}
\@writefile{toc}{\contentsline {subsection}{Hooking up into Alliance}{6}{section*.13}}
\newlabel{hooking-up-into-alliance}{{}{6}{\relax }{section*.13}{}}
\HyPL@Entry{6<</P(7)>>} \HyPL@Entry{6<</P(7)>>}
\@writefile{toc}{\contentsline {subsection}{Environment Helper}{7}{section*.14}} \@writefile{toc}{\contentsline {subsection}{Documentation}{7}{section*.16}}
\newlabel{environment-helper}{{}{7}{\relax }{section*.14}{}} \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 \gdef \LT@ii {\LT@entry
{1}{49.60522pt}\LT@entry {1}{49.60522pt}\LT@entry
{1}{165.90092pt}\LT@entry {1}{165.90092pt}\LT@entry
{1}{217.76141pt}} {1}{217.76141pt}}
\gdef \LT@iii {\LT@entry
{1}{49.60522pt}\LT@entry
{1}{165.90092pt}\LT@entry
{5}{217.76141pt}}
\HyPL@Entry{7<</P(8)>>} \HyPL@Entry{7<</P(8)>>}
\@writefile{toc}{\contentsline {section}{Documentation}{8}{section*.15}} \@writefile{toc}{\contentsline {subsubsection}{First Stage: Symbolic Technology Selection}{8}{section*.19}}
\newlabel{documentation}{{}{8}{\relax }{section*.15}{}} \newlabel{first-stage-symbolic-technology-selection}{{}{8}{\relax }{section*.19}{}}
\@writefile{toc}{\contentsline {section}{Coriolis Configuration \& Initialisation}{8}{section*.16}} \@writefile{toc}{\contentsline {subsubsection}{Second Stage: Technology Configuration Loading}{8}{section*.20}}
\newlabel{coriolis-configuration-initialisation}{{}{8}{\relax }{section*.16}{}} \newlabel{second-stage-technology-configuration-loading}{{}{8}{\relax }{section*.20}{}}
\@writefile{toc}{\contentsline {subsection}{Configuration Helpers}{8}{section*.17}} \@writefile{toc}{\contentsline {subsubsection}{Configuration Helpers}{8}{section*.21}}
\newlabel{configuration-helpers}{{}{8}{\relax }{section*.17}{}} \newlabel{configuration-helpers}{{}{8}{\relax }{section*.21}{}}
\@writefile{toc}{\contentsline {subsubsection}{Alliance Helper}{8}{section*.18}} \@writefile{toc}{\contentsline {paragraph}{Alliance Helper}{8}{section*.22}}
\newlabel{id1}{{}{8}{\relax }{section*.18}{}} \newlabel{id1}{{}{8}{\relax }{section*.22}{}}
\newlabel{alliance-helper}{{}{8}{\relax }{section*.18}{}} \newlabel{alliance-helper}{{}{8}{\relax }{section*.22}{}}
\HyPL@Entry{8<</P(9)>>} \HyPL@Entry{8<</P(9)>>}
\HyPL@Entry{9<</P(10)>>} \HyPL@Entry{9<</P(10)>>}
\@writefile{toc}{\contentsline {subsubsection}{Tools Configuration Helpers}{10}{section*.19}} \@writefile{toc}{\contentsline {paragraph}{Tools Configuration Helpers}{10}{section*.23}}
\newlabel{tools-configuration-helpers}{{}{10}{\relax }{section*.19}{}} \newlabel{tools-configuration-helpers}{{}{10}{\relax }{section*.23}{}}
\HyPL@Entry{10<</P(11)>>} \HyPL@Entry{10<</P(11)>>}
\@writefile{toc}{\contentsline {section}{CGT - The Graphical Interface}{11}{section*.20}} \@writefile{toc}{\contentsline {subsubsection}{Hacking the Configuration Files}{11}{section*.24}}
\newlabel{cgt-the-graphical-interface}{{}{11}{\relax }{section*.20}{}} \newlabel{hacking-the-configuration-files}{{}{11}{\relax }{section*.24}{}}
\HyPL@Entry{11<</P(12)>>} \HyPL@Entry{11<</P(12)>>}
\@writefile{toc}{\contentsline {subsection}{CGT - The Graphical Interface}{12}{section*.25}}
\newlabel{cgt-the-graphical-interface}{{}{12}{\relax }{section*.25}{}}
\HyPL@Entry{12<</P(13)>>} \HyPL@Entry{12<</P(13)>>}
\@writefile{toc}{\contentsline {section}{Viewer \& Tools}{13}{section*.21}} \@writefile{toc}{\contentsline {subsection}{Viewer \& Tools}{13}{section*.26}}
\newlabel{id2}{{}{13}{\relax }{section*.21}{}} \newlabel{id2}{{}{13}{\relax }{section*.26}{}}
\newlabel{viewer-tools}{{}{13}{\relax }{section*.21}{}} \newlabel{viewer-tools}{{}{13}{\relax }{section*.26}{}}
\@writefile{toc}{\contentsline {subsection}{Stratus Netlist Capture}{13}{section*.22}} \@writefile{toc}{\contentsline {subsubsection}{Stratus Netlist Capture}{13}{section*.27}}
\newlabel{stratus-netlist-capture}{{}{13}{\relax }{section*.22}{}} \newlabel{stratus-netlist-capture}{{}{13}{\relax }{section*.27}{}}
\@writefile{toc}{\contentsline {subsection}{The Hurricane Data-Base}{13}{section*.23}} \@writefile{toc}{\contentsline {subsubsection}{The Hurricane Data-Base}{13}{section*.28}}
\newlabel{the-hurricane-data-base}{{}{13}{\relax }{section*.23}{}} \newlabel{the-hurricane-data-base}{{}{13}{\relax }{section*.28}{}}
\HyPL@Entry{13<</P(14)>>} \HyPL@Entry{13<</P(14)>>}
\@writefile{toc}{\contentsline {subsection}{Mauka -{}- Placer}{14}{section*.24}} \@writefile{toc}{\contentsline {subsubsection}{Mauka -{}- Placer}{14}{section*.29}}
\newlabel{mauka-placer}{{}{14}{\relax }{section*.24}{}} \newlabel{mauka-placer}{{}{14}{\relax }{section*.29}{}}
\@writefile{toc}{\contentsline {subsection}{Knik -{}- Global Router}{14}{section*.25}} \@writefile{toc}{\contentsline {subsubsection}{Knik -{}- Global Router}{14}{section*.30}}
\newlabel{knik-global-router}{{}{14}{\relax }{section*.25}{}} \newlabel{knik-global-router}{{}{14}{\relax }{section*.30}{}}
\@writefile{toc}{\contentsline {subsection}{Kite -{}- Detailed Router}{14}{section*.26}} \@writefile{toc}{\contentsline {subsubsection}{Kite -{}- Detailed Router}{14}{section*.31}}
\newlabel{kite-detailed-router}{{}{14}{\relax }{section*.26}{}} \newlabel{kite-detailed-router}{{}{14}{\relax }{section*.31}{}}
\gdef \LT@iii {\LT@entry
{1}{170.48116pt}\LT@entry
{1}{88.52501pt}\LT@entry
{5}{587.85477pt}}
\HyPL@Entry{14<</P(15)>>} \HyPL@Entry{14<</P(15)>>}
\@writefile{toc}{\contentsline {subsubsection}{Kite Configuration Parameters}{15}{section*.27}} \HyPL@Entry{15<</P(16)>>}
\newlabel{kite-configuration-parameters}{{}{15}{\relax }{section*.27}{}} \@writefile{toc}{\contentsline {paragraph}{Kite Configuration Parameters}{16}{section*.32}}
\@writefile{toc}{\contentsline {subsection}{Executing Python Scripts in Cgt}{15}{section*.28}} \newlabel{kite-configuration-parameters}{{}{16}{\relax }{section*.32}{}}
\newlabel{executing-python-scripts-in-cgt}{{}{15}{\relax }{section*.28}{}}
\newlabel{python-scripts-in-cgt}{{}{15}{\relax }{section*.28}{}}
\gdef \LT@iv {\LT@entry \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}{85.57443pt}\LT@entry
{1}{93.96251pt}\LT@entry {1}{93.96251pt}\LT@entry
{1}{253.3158pt}} {1}{253.3158pt}}
\HyPL@Entry{15<</P(16)>>} \HyPL@Entry{16<</P(17)>>}
\@writefile{toc}{\contentsline {subsection}{Printing \& Snapshots}{16}{section*.29}} \@writefile{toc}{\contentsline {subsubsection}{Executing Python Scripts in Cgt}{17}{section*.33}}
\newlabel{printing-snapshots}{{}{16}{\relax }{section*.29}{}} \newlabel{executing-python-scripts-in-cgt}{{}{17}{\relax }{section*.33}{}}
\gdef \LT@v {\LT@entry \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}{79.7221pt}\LT@entry
{1}{95.63461pt}\LT@entry {1}{95.63461pt}\LT@entry
{1}{257.49603pt}} {1}{257.49603pt}}
\HyPL@Entry{16<</P(17)>>} \HyPL@Entry{17<</P(18)>>}
\@writefile{toc}{\contentsline {subsection}{Memento of Shortcuts in Graphic Mode}{17}{section*.30}} \@writefile{toc}{\contentsline {subsubsection}{Memento of Shortcuts in Graphic Mode}{18}{section*.35}}
\newlabel{memento-of-shortcuts-in-graphic-mode}{{}{17}{\relax }{section*.30}{}} \newlabel{memento-of-shortcuts-in-graphic-mode}{{}{18}{\relax }{section*.35}{}}
\gdef \LT@vi {\LT@entry \gdef \LT@vii {\LT@entry
{1}{160.86342pt}\LT@entry {1}{160.86342pt}\LT@entry
{1}{252.89458pt}} {1}{252.89458pt}}
\HyPL@Entry{17<</P(18)>>}
\@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<</P(19)>>} \HyPL@Entry{18<</P(19)>>}
\@writefile{toc}{\contentsline {subsection}{Miscellaneous Settings}{19}{section*.32}} \@writefile{toc}{\contentsline {subsubsection}{Cgt Command Line Options}{19}{section*.36}}
\newlabel{miscellaneous-settings}{{}{19}{\relax }{section*.32}{}} \newlabel{cgt-command-line-options}{{}{19}{\relax }{section*.36}{}}
\@writefile{toc}{\contentsline {section}{The Controller}{19}{section*.33}} \gdef \LT@viii {\LT@entry
\newlabel{id3}{{}{19}{\relax }{section*.33}{}} {1}{191.80995pt}\LT@entry
\newlabel{the-controller}{{}{19}{\relax }{section*.33}{}} {1}{98.55759pt}\LT@entry
\@writefile{toc}{\contentsline {subsection}{The Look Tab}{19}{section*.34}} {5}{164.79716pt}}
\newlabel{id4}{{}{19}{\relax }{section*.34}{}}
\newlabel{the-look-tab}{{}{19}{\relax }{section*.34}{}}
\HyPL@Entry{19<</P(20)>>} \HyPL@Entry{19<</P(20)>>}
\@writefile{toc}{\contentsline {subsection}{The Filter Tab}{20}{section*.35}} \@writefile{toc}{\contentsline {subsubsection}{Miscellaneous Settings}{20}{section*.37}}
\newlabel{id5}{{}{20}{\relax }{section*.35}{}} \newlabel{miscellaneous-settings}{{}{20}{\relax }{section*.37}{}}
\newlabel{the-filter-tab}{{}{20}{\relax }{section*.35}{}} \@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<</P(21)>>} \HyPL@Entry{20<</P(21)>>}
\@writefile{toc}{\contentsline {subsection}{The Layers\&Go Tab}{21}{section*.36}} \@writefile{toc}{\contentsline {subsubsection}{The Look Tab}{21}{section*.39}}
\newlabel{id6}{{}{21}{\relax }{section*.36}{}} \newlabel{id4}{{}{21}{\relax }{section*.39}{}}
\newlabel{the-layers-go-tab}{{}{21}{\relax }{section*.36}{}} \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<</P(22)>>} \HyPL@Entry{21<</P(22)>>}
\@writefile{toc}{\contentsline {subsection}{The Netlist Tab}{22}{section*.37}} \@writefile{toc}{\contentsline {subsubsection}{The Layers\&Go Tab}{22}{section*.41}}
\newlabel{id7}{{}{22}{\relax }{section*.37}{}} \newlabel{id6}{{}{22}{\relax }{section*.41}{}}
\newlabel{the-netlist-tab}{{}{22}{\relax }{section*.37}{}} \newlabel{the-layers-go-tab}{{}{22}{\relax }{section*.41}{}}
\HyPL@Entry{22<</P(23)>>} \HyPL@Entry{22<</P(23)>>}
\@writefile{toc}{\contentsline {subsection}{The Selection Tab}{23}{section*.38}} \@writefile{toc}{\contentsline {subsubsection}{The Netlist Tab}{23}{section*.42}}
\newlabel{id8}{{}{23}{\relax }{section*.38}{}} \newlabel{id7}{{}{23}{\relax }{section*.42}{}}
\newlabel{the-selection-tab}{{}{23}{\relax }{section*.38}{}} \newlabel{the-netlist-tab}{{}{23}{\relax }{section*.42}{}}
\HyPL@Entry{23<</P(24)>>} \HyPL@Entry{23<</P(24)>>}
\@writefile{toc}{\contentsline {subsection}{The Inspector Tab}{24}{section*.39}} \@writefile{toc}{\contentsline {subsubsection}{The Selection Tab}{24}{section*.43}}
\newlabel{id9}{{}{24}{\relax }{section*.39}{}} \newlabel{id8}{{}{24}{\relax }{section*.43}{}}
\newlabel{the-inspector-tab}{{}{24}{\relax }{section*.39}{}} \newlabel{the-selection-tab}{{}{24}{\relax }{section*.43}{}}
\HyPL@Entry{24<</P(25)>>} \HyPL@Entry{24<</P(25)>>}
\@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<</P(26)>>} \HyPL@Entry{25<</P(26)>>}
\@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<</P(27)>>} \HyPL@Entry{26<</P(27)>>}
\@writefile{toc}{\contentsline {section}{A complete Example: AM2901}{27}{section*.41}} \@writefile{toc}{\contentsline {subsubsection}{The Settings Tab}{27}{section*.45}}
\newlabel{a-complete-example-am2901}{{}{27}{\relax }{section*.41}{}} \newlabel{id10}{{}{27}{\relax }{section*.45}{}}
\newlabel{the-settings-tab}{{}{27}{\relax }{section*.45}{}}
\HyPL@Entry{27<</P(28)>>}
\@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 \ttl@finishall

View File

@ -429,7 +429,8 @@ are avalaibles here `Coriolis Tools Documentation`_.
mimic *as closely as possible* the C++ interface, so the documentation mimic *as closely as possible* the C++ interface, so the documentation
applies to both languages with only minor syntactic changes. 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 |Coriolis| has been build with respect of the classical paradigm that the
computational instensive parts have been written in C++, and almost 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 to very specific requirements such as shared functions between modules
or C++/|Python| secure bi-directional object deletion. or C++/|Python| secure bi-directional object deletion.
|CoriolisSoftSchema|
Coriolis Configuration & Initialisation Coriolis Configuration & Initialisation
======================================= =======================================
@ -695,6 +698,44 @@ Taxonomy of the file:
#. ``DefaultValue``, the default value for that parameter. #. ``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:`<CWD>/.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 CGT - The Graphical Interface
============================= =============================
@ -871,11 +912,19 @@ the :cb:`kite.` prefix.
The |Katabatic| parameters control the layer assignment step. 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 | | Parameter Identifier | Type | Default |
+===================================+==================+============================+ +===================================+==================+============================+
| **Katabatic Parameters** | | **Katabatic Parameters** |
+-----------------------------------+------------------+----------------------------+ +-----------------------------------+------------------+----------------------------+
|``katabatic.topRoutingLayer`` | TypeString | :cb:`METAL5` |
| +------------------+----------------------------+
| | Define the highest metal layer that will be |
| | used for routing (inclusive). |
+-----------------------------------+------------------+----------------------------+
|``katabatic.globalLengthThreshold``| TypeInt | :cb:`1450` | |``katabatic.globalLengthThreshold``| TypeInt | :cb:`1450` |
| +------------------+----------------------------+ | +------------------+----------------------------+
| | This parameter is used by a layer assignment | | | This parameter is used by a layer assignment |
@ -897,12 +946,18 @@ The |Katabatic| parameters control the layer assignment step.
+-----------------------------------+------------------+----------------------------+ +-----------------------------------+------------------+----------------------------+
| **Knik Parameters** | | **Knik Parameters** |
+-----------------------------------+------------------+----------------------------+ +-----------------------------------+------------------+----------------------------+
| ``kite.edgeCapacity`` | TypePercentage | :cb:`85` | | ``kite.hTracksReservedLocal`` | TypeInt | :cb:`3` |
| +------------------+----------------------------+ | +------------------+----------------------------+
| | Adjust the maximum capacity of the global | | | To take account the tracks needed *inside* a |
| | router's edges. The GCells would be too | | | GCell to build the *local* routing, decrease |
| | saturated for the detailed router if the edge | | | the capacity of the edges of the global |
| | capacity is left to 100%. | | | router. Horizontal and vertical locally |
| | reserved capacity can be distinguished for |
| | more accuracy. |
+-----------------------------------+------------------+----------------------------+
| ``kite.vTracksReservedLocal`` | TypeInt | :cb:`3` |
| +------------------+----------------------------+
| | cf. ``kite.hTracksReservedLocal`` |
+-----------------------------------+------------------+----------------------------+ +-----------------------------------+------------------+----------------------------+
| **Kite Parameters** | | **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 it must be reachable through the ``PYTHONPATH``. You may uses the
dotted module notation. 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 with one optional argument, the graphical editor into which it may be
running (will be set to ``None`` in text mode). running (will be set to ``None`` in text mode). The Python interface to
the editor (type: :cb:`CellViewer`) is limited to basic capabilities
Asides for this requirement, the python script can contains anything valid only.
in |Python|, so don't hesitate to use any package or extention.
Any script given on the command line will be run immediatly *after* the Any script given on the command line will be run immediatly *after* the
initializations and *before* any other argument is processed. initializations and *before* any other argument is processed.
Small example of Python/Stratus script: :: For more explanation on Python scripts see `Python Interface to Coriolis`_.
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.
Printing & Snapshots Printing & Snapshots
@ -1372,6 +1407,49 @@ Here comes the description of the *Settings* tab.
|ControllerSettings_1| |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 <file:../../../index.html>`_
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 A Simple Example: AM2901
======================== ========================

View File

@ -57,6 +57,7 @@
.. |ControllerInspector_2| replace:: :raw-html:`<center><img src="https://soc-extras.lip6.fr/media/filer/2012/12/07/controller-inspector-2.png" alt="Controller Basic Snapshot"></center>` .. |ControllerInspector_2| replace:: :raw-html:`<center><img src="https://soc-extras.lip6.fr/media/filer/2012/12/07/controller-inspector-2.png" alt="Controller Basic Snapshot"></center>`
.. |ControllerInspector_3| replace:: :raw-html:`<center><img src="https://soc-extras.lip6.fr/media/filer/2012/12/07/controller-inspector-3.png" alt="Controller Basic Snapshot"></center>` .. |ControllerInspector_3| replace:: :raw-html:`<center><img src="https://soc-extras.lip6.fr/media/filer/2012/12/07/controller-inspector-3.png" alt="Controller Basic Snapshot"></center>`
.. |ControllerSettings_1| replace:: :raw-html:`<center><img src="https://soc-extras.lip6.fr/media/filer/2012/12/07/controller-settings-1.png" alt="Controller Basic Snapshot"></center>` .. |ControllerSettings_1| replace:: :raw-html:`<center><img src="https://soc-extras.lip6.fr/media/filer/2012/12/07/controller-settings-1.png" alt="Controller Basic Snapshot"></center>`
.. |CoriolisSoftSchema| replace:: :raw-html:`<center><img src="https://soc-extras.lip6.fr/media/filer/2014/06/29/Coriolis-Soft-Schema.png" alt="Coriolis Software Schematic"></center>`
.. |BigMouse| image:: https://soc-extras.lip6.fr/media/filer/2012/12/07/computermouse.png .. |BigMouse| image:: https://soc-extras.lip6.fr/media/filer/2012/12/07/computermouse.png
:scale: 25% :scale: 25%

View File

@ -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

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -10,6 +10,8 @@ try:
from Hurricane import DbU from Hurricane import DbU
from Hurricane import UpdateSession from Hurricane import UpdateSession
from Hurricane import Breakpoint from Hurricane import Breakpoint
from Hurricane import Transformation
from Hurricane import Instance
import Viewer import Viewer
import CRL import CRL
from helpers import ErrorMessage from helpers import ErrorMessage
@ -37,7 +39,7 @@ except Exception, e:
def checkForUnplaceds ( cell ): def checkForUnplaceds ( cell ):
unplaceds = [] unplaceds = []
for instance in cell.getInstances(): for instance in cell.getInstances():
if instance.getPlacementStatus() == Hurricane.PlacementStatusUNPLACED: if instance.getPlacementStatus() == Instance.PlacementStatus.UNPLACED:
unplaceds += [ instance ] unplaceds += [ instance ]
if unplaceds: if unplaceds:
message = [ 'Some instances are still unplaceds:' ] message = [ 'Some instances are still unplaceds:' ]
@ -125,8 +127,8 @@ def ScriptMain ( cell=None ):
instanceCoeur = amd2901.getInstance( 'core' ) instanceCoeur = amd2901.getInstance( 'core' )
instanceCoeur.setTransformation(Hurricane.Transformation( (chipSide-coreSide)/2 instanceCoeur.setTransformation(Hurricane.Transformation( (chipSide-coreSide)/2
, (chipSide-coreSide)/2 , (chipSide-coreSide)/2
, Hurricane.OrientationID ) ) , Transformation.Orientation.ID ) )
instanceCoeur.setPlacementStatus( Hurricane.PlacementStatusPLACED ) instanceCoeur.setPlacementStatus( Instance.PlacementStatus.PLACED )
# Placing Pads # 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' ] 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' : if key == 'south' :
xpad = abutmentBoxChip.getXMin() + padHeight + ipad*(padWidth) xpad = abutmentBoxChip.getXMin() + padHeight + ipad*(padWidth)
ypad = abutmentBoxChip.getYMin() + padHeight ypad = abutmentBoxChip.getYMin() + padHeight
pad.setTransformation( Hurricane.Transformation( xpad, ypad, Hurricane.OrientationMY) ) pad.setTransformation( Hurricane.Transformation( xpad, ypad, Transformation.Orientation.MY) )
# east # east
if key == 'east' : if key == 'east' :
xpad = abutmentBoxChip.getXMax() - padHeight xpad = abutmentBoxChip.getXMax() - padHeight
ypad = padHeight + padWidth + ipad*(padWidth) ypad = padHeight + padWidth + ipad*(padWidth)
pad.setTransformation( Hurricane.Transformation( xpad, ypad, Hurricane.OrientationR3) ) pad.setTransformation( Hurricane.Transformation( xpad, ypad, Transformation.Orientation.R3) )
# north # north
if key == 'north' : if key == 'north' :
xpad = padHeight + ipad*(padWidth) xpad = padHeight + ipad*(padWidth)
ypad = abutmentBoxChip.getYMax() - padHeight ypad = abutmentBoxChip.getYMax() - padHeight
pad.setTransformation( Hurricane.Transformation( xpad, ypad, Hurricane.OrientationID) ) pad.setTransformation( Hurricane.Transformation( xpad, ypad, Transformation.Orientation.ID) )
# west # west
if key == 'west' : if key == 'west' :
xpad = padHeight xpad = padHeight
ypad = padHeight + ipad*(padWidth) 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: except ErrorMessage, e:
print e; errorCode = e.code print e; errorCode = e.code

View File

@ -20,6 +20,7 @@
PyHorizontal.cpp PyHorizontal.cpp
PyHurricane.cpp PyHurricane.cpp
PyHyperNet.cpp PyHyperNet.cpp
PyPlacementStatus.cpp
PyInstance.cpp PyInstance.cpp
PyInstanceCollection.cpp PyInstanceCollection.cpp
PyMaterial.cpp PyMaterial.cpp
@ -37,6 +38,8 @@
PyViaLayerCollection.cpp PyViaLayerCollection.cpp
PyLibrary.cpp PyLibrary.cpp
PyNet.cpp PyNet.cpp
PyNetType.cpp
PyNetDirection.cpp
PyNetCollection.cpp PyNetCollection.cpp
PyNetExternalComponents.cpp PyNetExternalComponents.cpp
PyOccurrence.cpp PyOccurrence.cpp
@ -46,6 +49,8 @@
PyPad.cpp PyPad.cpp
PyPath.cpp PyPath.cpp
PyPin.cpp PyPin.cpp
PyPinPlacementStatus.cpp
PyPinDirection.cpp
PyPinCollection.cpp PyPinCollection.cpp
PyPlug.cpp PyPlug.cpp
PyPlugCollection.cpp PyPlugCollection.cpp
@ -57,6 +62,7 @@
PySegmentCollection.cpp PySegmentCollection.cpp
PyTechnology.cpp PyTechnology.cpp
PyTransformation.cpp PyTransformation.cpp
PyOrientation.cpp
PyDbU.cpp PyDbU.cpp
PyUpdateSession.cpp PyUpdateSession.cpp
PyVertical.cpp PyVertical.cpp
@ -76,6 +82,7 @@
hurricane/isobar/PyHorizontal.h hurricane/isobar/PyHorizontal.h
hurricane/isobar/PyHurricane.h hurricane/isobar/PyHurricane.h
hurricane/isobar/PyHyperNet.h hurricane/isobar/PyHyperNet.h
hurricane/isobar/PyPlacementStatus.h
hurricane/isobar/PyInstance.h hurricane/isobar/PyInstance.h
hurricane/isobar/PyInstanceCollection.h hurricane/isobar/PyInstanceCollection.h
hurricane/isobar/PyMaterial.h hurricane/isobar/PyMaterial.h
@ -93,6 +100,8 @@
hurricane/isobar/PyViaLayer.h hurricane/isobar/PyViaLayer.h
hurricane/isobar/PyLibrary.h hurricane/isobar/PyLibrary.h
hurricane/isobar/PyNet.h hurricane/isobar/PyNet.h
hurricane/isobar/PyNetType.h
hurricane/isobar/PyNetDirection.h
hurricane/isobar/PyNetCollection.h hurricane/isobar/PyNetCollection.h
hurricane/isobar/PyNetExternalComponents.h hurricane/isobar/PyNetExternalComponents.h
hurricane/isobar/PyOccurrence.h hurricane/isobar/PyOccurrence.h
@ -102,6 +111,8 @@
hurricane/isobar/PyPad.h hurricane/isobar/PyPad.h
hurricane/isobar/PyPath.h hurricane/isobar/PyPath.h
hurricane/isobar/PyPin.h hurricane/isobar/PyPin.h
hurricane/isobar/PyPinPlacementStatus.h
hurricane/isobar/PyPinDirection.h
hurricane/isobar/PyPinCollection.h hurricane/isobar/PyPinCollection.h
hurricane/isobar/PyPlug.h hurricane/isobar/PyPlug.h
hurricane/isobar/PyPlugCollection.h hurricane/isobar/PyPlugCollection.h
@ -113,6 +124,7 @@
hurricane/isobar/PySegmentCollection.h hurricane/isobar/PySegmentCollection.h
hurricane/isobar/PyTechnology.h hurricane/isobar/PyTechnology.h
hurricane/isobar/PyTransformation.h hurricane/isobar/PyTransformation.h
hurricane/isobar/PyOrientation.h
hurricane/isobar/PyDbU.h hurricane/isobar/PyDbU.h
hurricane/isobar/PyUpdateSession.h hurricane/isobar/PyUpdateSession.h
hurricane/isobar/PyVertical.h hurricane/isobar/PyVertical.h

View File

@ -1,36 +1,7 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2008-2014, All Rights Reserved
// Universite Pierre et Marie Curie
//
// Main contributors :
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// //
// +-----------------------------------------------------------------+ // +-----------------------------------------------------------------+
// | C O R I O L I S | // | C O R I O L I S |

View File

@ -14,8 +14,6 @@
// +-----------------------------------------------------------------+ // +-----------------------------------------------------------------+
#include "hurricane/isobar/PyPoint.h" #include "hurricane/isobar/PyPoint.h"
#include "hurricane/isobar/PyBox.h" #include "hurricane/isobar/PyBox.h"
@ -60,6 +58,59 @@ extern "C" {
DirectDestroyAttribute(PyBox_destroy, PyBox) 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 ) { static PyObject* PyBox_getCenter ( PyBox *self ) {
trace << "PyBox_getCenter()" << endl; trace << "PyBox_getCenter()" << endl;
@ -370,7 +421,8 @@ extern "C" {
DirectDeleteMethod(PyBox_DeAlloc,PyBox) DirectDeleteMethod(PyBox_DeAlloc,PyBox)
PyTypeObjectLinkPyType(Box) PyTypeObjectLinkPyTypeNewInit(Box)
//PyTypeObjectLinkPyType(Box)
#else // End of Python Module Code Part. #else // End of Python Module Code Part.
@ -380,52 +432,6 @@ extern "C" {
// x=================================================================x // 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 );
}

View File

@ -1,15 +1,14 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Software. // 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 | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul CHAPUT | // | 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" |
// +-----------------------------------------------------------------+ // +-----------------------------------------------------------------+
@ -62,6 +61,29 @@ extern "C" {
DBoDestroyAttribute(PyCell_destroy,PyCell) 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 ()" // Attribute Method : "PyCell_getLibrary ()"
@ -642,7 +664,9 @@ extern "C" {
// PyCell Attribute Method table. // PyCell Attribute Method table.
PyMethodDef PyCell_Methods[] = 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." } , { "getName" , (PyCFunction)PyCell_getName , METH_NOARGS , "Returns the name of the cell." }
, { "getInstance" , (PyCFunction)PyCell_getInstance , METH_VARARGS, "Returns the instance of name <name> if it exists, else NULL." } , { "getInstance" , (PyCFunction)PyCell_getInstance , METH_VARARGS, "Returns the instance of name <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 , { "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 | // | "PyCell" Shared Library Code Part |
// x=================================================================x // 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. // Link/Creation Method.
DBoLinkCreateMethod(Cell) DBoLinkCreateMethod(Cell)
// ---------------------------------------------------------------
// PyCell Object Definitions.
PyTypeInheritedObjectDefinitions(Cell, Entity) PyTypeInheritedObjectDefinitions(Cell, Entity)

View File

@ -63,56 +63,7 @@ extern "C" {
DBoDestroyAttribute(PyContact_destroy, PyContact) DBoDestroyAttribute(PyContact_destroy, PyContact)
static PyObject* PyContact_translate ( PyContact *self, PyObject* args ) { static PyObject* PyContact_create ( PyObject*, 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 ) {
trace << "PyContact_create()" << endl; trace << "PyContact_create()" << endl;
Contact* contact = NULL; 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. // Link/Creation Method.
DBoLinkCreateMethod(Contact) DBoLinkCreateMethod(Contact)

View File

@ -1,8 +1,7 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Software. // 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 | // | C O R I O L I S |
@ -38,7 +37,20 @@ extern "C" {
#if defined(__PYTHON_MODULE__) #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; trace << "PyDataBase_getDB()" << endl;
DataBase* db = NULL; DataBase* db = NULL;
@ -46,7 +58,7 @@ extern "C" {
HTRY HTRY
db = DataBase::getDB(); db = DataBase::getDB();
if (db == NULL) if (db == NULL)
PyErr_SetString ( HurricaneError, "DataBase has not been created yet" ); PyErr_SetString( HurricaneError, "DataBase.getDB(): DataBase has not been created yet" );
HCATCH HCATCH
return PyDataBase_Link( db ); return PyDataBase_Link( db );
@ -94,7 +106,11 @@ extern "C" {
// PyDataBase Attribute Method table. // PyDataBase Attribute Method table.
PyMethodDef PyDataBase_Methods[] = 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" } , { "getRootLibrary", (PyCFunction)PyDataBase_getRootLibrary, METH_NOARGS, "Return the root library" }
, { "destroy" , (PyCFunction)PyDataBase_destroy , METH_NOARGS , { "destroy" , (PyCFunction)PyDataBase_destroy , METH_NOARGS
, "Destroy associated hurricane object The python object remains." } , "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. // Link/Creation Method.
DBoLinkCreateMethod(DataBase) DBoLinkCreateMethod(DataBase)
PyTypeObjectDefinitions(DataBase) PyTypeObjectDefinitions(DataBase)
#endif // End of Shared Library Code Part. #endif // End of Shared Library Code Part.

View File

@ -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 | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Sophie BELLOEIL | // | Author : Sophie BELLOEIL |
// | E-mail : Sophie.Belloeil@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Module : "./PyHorizontal.cpp" | // | C++ Module : "./PyHorizontal.cpp" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#include "hurricane/isobar/PyNet.h" #include "hurricane/isobar/PyNet.h"
@ -22,7 +21,6 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane; using namespace Hurricane;
@ -59,66 +57,10 @@ extern "C" {
DBoDestroyAttribute(PyHorizontal_destroy, PyHorizontal) 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 ()" // Attribute Method : "PyHorizontal_create ()"
PyObject* PyHorizontal_create ( PyObject *module, PyObject *args ) { static PyObject* PyHorizontal_create ( PyObject*, PyObject *args ) {
trace << "PyHorizontal_create()" << endl; trace << "PyHorizontal_create()" << endl;
PyObject* arg0; 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. // Link/Creation Method.
DBoLinkCreateMethod(Horizontal) DBoLinkCreateMethod(Horizontal)

View File

@ -1,4 +1,3 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Software. // This file is part of the Coriolis Software.
@ -22,6 +21,7 @@
#include "hurricane/isobar/PyPoint.h" #include "hurricane/isobar/PyPoint.h"
#include "hurricane/isobar/PyBox.h" #include "hurricane/isobar/PyBox.h"
#include "hurricane/isobar/PyTransformation.h" #include "hurricane/isobar/PyTransformation.h"
#include "hurricane/isobar/PyOrientation.h"
#include "hurricane/isobar/PyDataBase.h" #include "hurricane/isobar/PyDataBase.h"
#include "hurricane/isobar/PyLibrary.h" #include "hurricane/isobar/PyLibrary.h"
#include "hurricane/isobar/PyEntity.h" #include "hurricane/isobar/PyEntity.h"
@ -41,12 +41,17 @@
#include "hurricane/isobar/PyRegularLayerCollection.h" #include "hurricane/isobar/PyRegularLayerCollection.h"
#include "hurricane/isobar/PyViaLayerCollection.h" #include "hurricane/isobar/PyViaLayerCollection.h"
#include "hurricane/isobar/PyPin.h" #include "hurricane/isobar/PyPin.h"
#include "hurricane/isobar/PyPinPlacementStatus.h"
#include "hurricane/isobar/PyPinDirection.h"
#include "hurricane/isobar/PyPinCollection.h" #include "hurricane/isobar/PyPinCollection.h"
#include "hurricane/isobar/PyPlacementStatus.h"
#include "hurricane/isobar/PyInstance.h" #include "hurricane/isobar/PyInstance.h"
#include "hurricane/isobar/PyInstanceCollection.h" #include "hurricane/isobar/PyInstanceCollection.h"
#include "hurricane/isobar/PyReference.h" #include "hurricane/isobar/PyReference.h"
#include "hurricane/isobar/PyReferenceCollection.h" #include "hurricane/isobar/PyReferenceCollection.h"
#include "hurricane/isobar/PyNet.h" #include "hurricane/isobar/PyNet.h"
#include "hurricane/isobar/PyNetType.h"
#include "hurricane/isobar/PyNetDirection.h"
#include "hurricane/isobar/PyNetCollection.h" #include "hurricane/isobar/PyNetCollection.h"
#include "hurricane/isobar/PyNetExternalComponents.h" #include "hurricane/isobar/PyNetExternalComponents.h"
#include "hurricane/isobar/PyHyperNet.h" #include "hurricane/isobar/PyHyperNet.h"
@ -481,26 +486,6 @@ extern "C" {
, { "DbU_getLambda" , PyDbU_toLambda , METH_VARARGS, "Converts a DbU::Unit to a symbolic value (to lambda)." } , { "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_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." } , { "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 */ , {NULL, NULL, 0, NULL} /* sentinel */
}; };
@ -516,6 +501,7 @@ extern "C" {
PyPoint_LinkPyType (); PyPoint_LinkPyType ();
PyBox_LinkPyType (); PyBox_LinkPyType ();
PyTransformation_LinkPyType (); PyTransformation_LinkPyType ();
PyOrientation_LinkPyType ();
PyDataBase_LinkPyType (); PyDataBase_LinkPyType ();
PyTechnology_LinkPyType (); PyTechnology_LinkPyType ();
PyLibrary_LinkPyType (); PyLibrary_LinkPyType ();
@ -540,6 +526,8 @@ extern "C" {
PyNetCollection_LinkPyType (); PyNetCollection_LinkPyType ();
PyNetExternalComponents_LinkPyType (); PyNetExternalComponents_LinkPyType ();
PyCellCollection_LinkPyType (); PyCellCollection_LinkPyType ();
PyPinPlacementStatus_LinkPyType ();
PyPinDirection_LinkPyType ();
PyPinCollection_LinkPyType (); PyPinCollection_LinkPyType ();
PySegmentCollection_LinkPyType (); PySegmentCollection_LinkPyType ();
PyOccurrenceCollection_LinkPyType (); PyOccurrenceCollection_LinkPyType ();
@ -547,8 +535,11 @@ extern "C" {
PyReferenceCollection_LinkPyType (); PyReferenceCollection_LinkPyType ();
PyCell_LinkPyType (); PyCell_LinkPyType ();
PyInstance_LinkPyType (); PyInstance_LinkPyType ();
PyPlacementStatus_LinkPyType ();
PyReference_LinkPyType (); PyReference_LinkPyType ();
PyNet_LinkPyType (); PyNet_LinkPyType ();
PyNetType_LinkPyType ();
PyNetDirection_LinkPyType ();
PyHyperNet_LinkPyType (); PyHyperNet_LinkPyType ();
PyHook_LinkPyType (); PyHook_LinkPyType ();
PyHookCollection_LinkPyType (); PyHookCollection_LinkPyType ();
@ -570,6 +561,7 @@ extern "C" {
PYTYPE_READY ( DbU ) PYTYPE_READY ( DbU )
PYTYPE_READY ( Box ) PYTYPE_READY ( Box )
PYTYPE_READY ( Transformation ) PYTYPE_READY ( Transformation )
PYTYPE_READY ( Orientation )
PYTYPE_READY ( DataBase ) PYTYPE_READY ( DataBase )
PYTYPE_READY ( Technology ) PYTYPE_READY ( Technology )
PYTYPE_READY ( Library ) PYTYPE_READY ( Library )
@ -589,14 +581,19 @@ extern "C" {
PYTYPE_READY ( ViaLayerCollectionLocator ) PYTYPE_READY ( ViaLayerCollectionLocator )
PYTYPE_READY ( Path ) PYTYPE_READY ( Path )
PYTYPE_READY ( Occurrence ) PYTYPE_READY ( Occurrence )
PYTYPE_READY ( PlacementStatus )
PYTYPE_READY ( InstanceCollection ) PYTYPE_READY ( InstanceCollection )
PYTYPE_READY ( InstanceCollectionLocator ) PYTYPE_READY ( InstanceCollectionLocator )
PYTYPE_READY ( PlugCollection ) PYTYPE_READY ( PlugCollection )
PYTYPE_READY ( PlugCollectionLocator ) PYTYPE_READY ( PlugCollectionLocator )
PYTYPE_READY ( NetType )
PYTYPE_READY ( NetDirection )
PYTYPE_READY ( NetCollection ) PYTYPE_READY ( NetCollection )
PYTYPE_READY ( NetCollectionLocator ) PYTYPE_READY ( NetCollectionLocator )
PYTYPE_READY ( CellCollection ) PYTYPE_READY ( CellCollection )
PYTYPE_READY ( CellCollectionLocator ) PYTYPE_READY ( CellCollectionLocator )
PYTYPE_READY ( PinPlacementStatus )
PYTYPE_READY ( PinDirection )
PYTYPE_READY ( PinCollection ) PYTYPE_READY ( PinCollection )
PYTYPE_READY ( PinCollectionLocator ) PYTYPE_READY ( PinCollectionLocator )
PYTYPE_READY ( SegmentCollection ) PYTYPE_READY ( SegmentCollection )
@ -687,6 +684,7 @@ extern "C" {
__cs.addType ( "db" , &PyTypeDataBase , "<DataBase>" , false ); __cs.addType ( "db" , &PyTypeDataBase , "<DataBase>" , false );
__cs.addType ( "techno" , &PyTypeTechnology , "<Technology>" , false ); __cs.addType ( "techno" , &PyTypeTechnology , "<Technology>" , false );
__cs.addType ( "transfo" , &PyTypeTransformation , "<Transformation>" , false ); __cs.addType ( "transfo" , &PyTypeTransformation , "<Transformation>" , false );
__cs.addType ( "orient" , &PyTypeOrientation , "<Orientation>" , false );
__cs.addType ( "vert" , &PyTypeVertical , "<Vertical>" , false, "segment" ); __cs.addType ( "vert" , &PyTypeVertical , "<Vertical>" , false, "segment" );
__cs.addType ( "path" , &PyTypePath , "<Path>" , false ); __cs.addType ( "path" , &PyTypePath , "<Path>" , false );
__cs.addType ( "occur" , &PyTypeOccurrence , "<Occurrence>" , false ); __cs.addType ( "occur" , &PyTypeOccurrence , "<Occurrence>" , false );
@ -704,6 +702,29 @@ extern "C" {
Py_INCREF ( &PyTypeDbU ); Py_INCREF ( &PyTypeDbU );
PyModule_AddObject ( module, "DbU" , (PyObject*)&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 ); Py_INCREF ( &PyTypeTechnology );
PyModule_AddObject ( module, "Technology" , (PyObject*)&PyTypeTechnology ); PyModule_AddObject ( module, "Technology" , (PyObject*)&PyTypeTechnology );
Py_INCREF ( &PyTypeLayer ); Py_INCREF ( &PyTypeLayer );
@ -730,23 +751,27 @@ extern "C" {
PyModule_AddObject ( module, "Breakpoint" , (PyObject*)&PyTypeBreakpoint ); PyModule_AddObject ( module, "Breakpoint" , (PyObject*)&PyTypeBreakpoint );
Py_INCREF ( &PyTypeQuery ); Py_INCREF ( &PyTypeQuery );
PyModule_AddObject ( module, "Query" , (PyObject*)&PyTypeQuery ); PyModule_AddObject ( module, "Query" , (PyObject*)&PyTypeQuery );
Py_INCREF ( &PyTypeReference );
PyModule_AddObject ( module, "Reference" , (PyObject*)&PyTypeReference );
Py_INCREF ( &PyTypeHook ); Py_INCREF ( &PyTypeHook );
PyModule_AddObject ( module, "Hook" , (PyObject*)&PyTypeHook ); PyModule_AddObject ( module, "Hook" , (PyObject*)&PyTypeHook );
Py_INCREF ( &PyTypeHookCollection ); Py_INCREF ( &PyTypeHookCollection );
PyModule_AddObject ( module, "HookCollection" , (PyObject*)&PyTypeHookCollection ); PyModule_AddObject ( module, "HookCollection" , (PyObject*)&PyTypeHookCollection );
Py_INCREF ( &PyTypePlug );
PyModule_AddObject ( module, "PyPlug" , (PyObject*)&PyTypePlug );
Py_INCREF ( &PyTypeRoutingPad ); Py_INCREF ( &PyTypeRoutingPad );
PyModule_AddObject ( module, "RoutingPad" , (PyObject*)&PyTypeRoutingPad ); PyModule_AddObject ( module, "RoutingPad" , (PyObject*)&PyTypeRoutingPad );
Py_INCREF ( &PyTypeVertical ); Py_INCREF ( &PyTypeVertical );
PyModule_AddObject ( module, "PyVertical" , (PyObject*)&PyTypeVertical ); PyModule_AddObject ( module, "Vertical" , (PyObject*)&PyTypeVertical );
Py_INCREF ( &PyTypeHorizontal ); Py_INCREF ( &PyTypeHorizontal );
PyModule_AddObject ( module, "PyHorizontal" , (PyObject*)&PyTypeHorizontal ); PyModule_AddObject ( module, "Horizontal" , (PyObject*)&PyTypeHorizontal );
Py_INCREF ( &PyTypeContact ); Py_INCREF ( &PyTypeContact );
PyModule_AddObject ( module, "PyContact" , (PyObject*)&PyTypeContact ); PyModule_AddObject ( module, "Contact" , (PyObject*)&PyTypeContact );
Py_INCREF ( &PyTypePlug ); Py_INCREF ( &PyTypePin );
PyModule_AddObject ( module, "PyPlug" , (PyObject*)&PyTypePlug ); PyModule_AddObject ( module, "Pin" , (PyObject*)&PyTypePin );
Py_INCREF ( &PyTypePad ); Py_INCREF ( &PyTypePad );
PyModule_AddObject ( module, "PyPad" , (PyObject*)&PyTypePad ); PyModule_AddObject ( module, "Pad" , (PyObject*)&PyTypePad );
PyObject* dictionnary = PyModule_GetDict ( module ); PyObject* dictionnary = PyModule_GetDict ( module );
@ -761,15 +786,15 @@ extern "C" {
PyDict_SetItemString ( dictionnary, "HurricaneError" , HurricaneError ); PyDict_SetItemString ( dictionnary, "HurricaneError" , HurricaneError );
DbULoadConstants( dictionnary ); DbULoadConstants( dictionnary );
TransformationLoadConstants( dictionnary );
NetLoadConstants ( dictionnary );
InstanceLoadConstants ( dictionnary );
PinLoadConstants ( dictionnary );
PyDbU_postModuleInit(); PyDbU_postModuleInit();
PyTransformation_postModuleInit();
PyLayer_postModuleInit(); PyLayer_postModuleInit();
PyBasicLayer_postModuleInit(); PyBasicLayer_postModuleInit();
PyPin_postModuleInit();
PyRoutingPad_postModuleInit(); PyRoutingPad_postModuleInit();
PyNet_postModuleInit();
PyInstance_postModuleInit();
trace << "Hurricane.so loaded " << (void*)&typeid(string) << endl; trace << "Hurricane.so loaded " << (void*)&typeid(string) << endl;
} }

View File

@ -1,14 +1,13 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Software. // 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 | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul CHAPUT | // | Author : Damien DUPUIS |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Module : "./PyHyperNet.cpp" | // | C++ Module : "./PyHyperNet.cpp" |
@ -19,7 +18,6 @@
#include "hurricane/isobar/PyCell.h" #include "hurricane/isobar/PyCell.h"
#include "hurricane/isobar/PyOccurrence.h" #include "hurricane/isobar/PyOccurrence.h"
#include "hurricane/isobar/PyOccurrenceCollection.h" #include "hurricane/isobar/PyOccurrenceCollection.h"
using namespace Hurricane; using namespace Hurricane;
@ -44,6 +42,31 @@ extern "C" {
DirectDestroyAttribute(PyHyperNet_destroy, PyHyperNet) 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) static PyObject* PyHyperNet_getNetOccurrences(PyHyperNet *self)
{ {
trace << "PyHyperNet_getNetOccurrences()" << endl; trace << "PyHyperNet_getNetOccurrences()" << endl;
@ -106,7 +129,9 @@ extern "C" {
PyMethodDef PyHyperNet_Methods[] = 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." } , { "isValid" , (PyCFunction)PyHyperNet_isValid , METH_NOARGS , "Returns trus if the HyperNet isValid." }
, { "getNetOccurrences" , (PyCFunction)PyHyperNet_getNetOccurrences , METH_NOARGS , { "getNetOccurrences" , (PyCFunction)PyHyperNet_getNetOccurrences , METH_NOARGS
, "Returns the collection of Net occurrences" } , "Returns the collection of Net occurrences" }
@ -122,7 +147,7 @@ extern "C" {
PyTypeObjectLinkPyType(HyperNet) 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) PyTypeObjectDefinitions(HyperNet)
#endif // End of Shared Library Code Part. #endif // Shared Library Code Part.
} // extern "C". } // extern "C".

View File

@ -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 | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul CHAPUT | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Module : "./PyInstance.cpp" | // | C++ Module : "./PyInstance.cpp" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#include "hurricane/isobar/PyBox.h" #include "hurricane/isobar/PyBox.h"
#include "hurricane/isobar/PyTransformation.h" #include "hurricane/isobar/PyTransformation.h"
#include "hurricane/isobar/PyLibrary.h" #include "hurricane/isobar/PyLibrary.h"
#include "hurricane/isobar/PyCell.h" #include "hurricane/isobar/PyCell.h"
#include "hurricane/isobar/PyInstance.h" #include "hurricane/isobar/PyInstance.h"
#include "hurricane/isobar/PyPlacementStatus.h"
#include "hurricane/isobar/PyNet.h" #include "hurricane/isobar/PyNet.h"
#include "hurricane/isobar/PyPlug.h" #include "hurricane/isobar/PyPlug.h"
#include "hurricane/isobar/PyPlugCollection.h" #include "hurricane/isobar/PyPlugCollection.h"
@ -48,23 +51,6 @@ extern "C" {
#if defined(__PYTHON_MODULE__) #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 // x-------------------------------------------------------------x
// | "PyInstance" Local Functions | // | "PyInstance" Local Functions |
// x-------------------------------------------------------------x // x-------------------------------------------------------------x
@ -93,18 +79,59 @@ extern "C" {
// Standart Accessors (Attributes). // Standart Accessors (Attributes).
// Standart destroy (Attribute). // Standart destroy (Attribute).
DBoDestroyAttribute(PyInstance_destroy,PyInstance) DBoDestroyAttribute(PyInstance_destroy,PyInstance)
// --------------------------------------------------------------- // ---------------------------------------------------------------
// Attribute Method : "PyInstance_getName ()" // Attribute Method : "PyInstance_getName ()"
GetNameMethod(Instance, instance) 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 ()" // Attribute Method : "PyInstance_getMasterCell ()"
@ -341,7 +368,9 @@ extern "C" {
// PyInstance Attribute Method table. // PyInstance Attribute Method table.
PyMethodDef PyInstance_Methods[] = 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." } , { "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." } , { "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." } , { "getPlacementStatus" , (PyCFunction)PyInstance_getPlacementStatus , METH_NOARGS , "Returns the placement status of the instance." }
@ -357,8 +386,7 @@ extern "C" {
, { "setTransformation" , (PyCFunction)PyInstance_setTransformation , METH_VARARGS, "Allows to modify the instance transformation." } , { "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." } , { "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." } , { "setMasterCell" , (PyCFunction)PyInstance_setMasterCell , METH_VARARGS, "Allows to change the cell referenced by this instance." }
, { "destroy" , (PyCFunction)PyInstance_destroy , METH_NOARGS , { "destroy" , (PyCFunction)PyInstance_destroy , METH_NOARGS , "Destroy associated hurricane object The python object remains." }
, "Destroy associated hurricane object The python object remains." }
, {NULL, NULL, 0, NULL} /* sentinel */ , {NULL, NULL, 0, NULL} /* sentinel */
}; };
@ -380,50 +408,6 @@ extern "C" {
// | "PyInstance" Shared Library Code Part | // | "PyInstance" Shared Library Code Part |
// x=================================================================x // 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. // Link/Creation Method.
@ -436,6 +420,14 @@ extern "C" {
PyTypeInheritedObjectDefinitions(Instance, Entity) PyTypeInheritedObjectDefinitions(Instance, Entity)
extern void PyInstance_postModuleInit ()
{
PyPlacementStatus_postModuleInit();
PyDict_SetItemString( PyTypeInstance.tp_dict, "PlacementStatus", (PyObject*)&PyTypePlacementStatus );
}
#endif // End of Shared Library Code Part. #endif // End of Shared Library Code Part.

View File

@ -1,8 +1,7 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Software. // 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 | // | C O R I O L I S |
@ -40,6 +39,35 @@ extern "C" {
GetNameMethod(Library, lib) 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 ) { static PyObject* PyLibrary_getSubLibrary ( PyLibrary *self, PyObject* args ) {
trace << "PyLibrary_getLibrary ()" << endl; trace << "PyLibrary_getLibrary ()" << endl;
@ -107,8 +135,9 @@ extern "C" {
PyMethodDef PyLibrary_Methods[] = PyMethodDef PyLibrary_Methods[] =
{ { { "create" , (PyCFunction)PyLibrary_create , METH_NOARGS|METH_STATIC
{ "getName" , (PyCFunction)PyLibrary_getName , METH_NOARGS , "Returns the name of the library." } , "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 <name>" } , { "getLibrary", (PyCFunction)PyLibrary_getSubLibrary, METH_VARARGS, "Get the sub-library named <name>" }
, { "getCell" , (PyCFunction)PyLibrary_getCell , METH_VARARGS, "Get the cell of name <name>" } , { "getCell" , (PyCFunction)PyLibrary_getCell , METH_VARARGS, "Get the cell of name <name>" }
, { "getCells" , (PyCFunction)PyLibrary_getCells , METH_NOARGS , "Returns the collection of all cells of the library." } , { "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. // Link/Creation Method.
DBoLinkCreateMethod(Library) DBoLinkCreateMethod(Library)
PyTypeObjectDefinitions(Library) PyTypeObjectDefinitions(Library)

View File

@ -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 | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Sophie BELLOEIL | // | Author : Sophie BELLOEIL |
// | E-mail : Sophie.Belloeil@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Module : "./PyNet.cpp" | // | C++ Module : "./PyNet.cpp" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#include "hurricane/isobar/PyNet.h" #include "hurricane/isobar/PyNet.h"
#include "hurricane/isobar/PyNetType.h"
#include "hurricane/isobar/PyNetDirection.h"
#include "hurricane/isobar/PyCell.h" #include "hurricane/isobar/PyCell.h"
#include "hurricane/isobar/PyPoint.h" #include "hurricane/isobar/PyPoint.h"
#include "hurricane/isobar/PyPlugCollection.h" #include "hurricane/isobar/PyPlugCollection.h"
#include "hurricane/isobar/PySegmentCollection.h" #include "hurricane/isobar/PySegmentCollection.h"
#include "hurricane/isobar/PyComponentCollection.h" #include "hurricane/isobar/PyComponentCollection.h"
#include "hurricane/isobar/PyPinCollection.h" #include "hurricane/isobar/PyPinCollection.h"
#include "hurricane/Cell.h" #include "hurricane/Cell.h"
#include "hurricane/NetExternalComponents.h" #include "hurricane/NetExternalComponents.h"
using namespace Hurricane; using namespace Hurricane;
namespace Isobar { 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 // x-------------------------------------------------------------x
// | "PyNet" Attribute Methods | // | "PyNet" Attribute Methods |
// x-------------------------------------------------------------x // x-------------------------------------------------------------x
// Standart Accessors (Attributes). // Standart Accessors (Attributes).
DirectGetLongAttribute(PyNet_getX,getX,PyNet,Net) DirectGetLongAttribute(PyNet_getX,getX,PyNet,Net)
DirectGetLongAttribute(PyNet_getY,getY,PyNet,Net) DirectGetLongAttribute(PyNet_getY,getY,PyNet,Net)
@ -141,11 +116,33 @@ extern "C" {
DBoDestroyAttribute(PyNet_destroy, PyNet) DBoDestroyAttribute(PyNet_destroy, PyNet)
// ---------------------------------------------------------------
// Attribute Method : "PyNet_getName ()"
GetNameMethod(Net, net)
// --------------------------------------------------------------- // ---------------------------------------------------------------
// Attribute Method : "PyNet_getName ()" // Attribute Method : "PyNet_create ()"
GetNameMethod(Net, net)
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. // PyNet Attribute Method table.
PyMethodDef PyNet_Methods[] = 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)." } , { "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)." } , { "getDirection" , (PyCFunction)PyNet_getDirection , METH_NOARGS , "Returns the signal direction (by default set to UNDEFINED)." }
, { "getX" , (PyCFunction)PyNet_getX , METH_NOARGS , "Returns net abscissa." } , { "getX" , (PyCFunction)PyNet_getX , METH_NOARGS , "Returns net abscissa." }
@ -497,48 +496,22 @@ extern "C" {
// x=================================================================x // 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) DBoLinkCreateMethod(Net)
// ---------------------------------------------------------------
// PyNet Object Definitions.
PyTypeInheritedObjectDefinitions(Net, Entity) 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".
} // Isobar namespace.
} // End of Isobar namespace.

View File

@ -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.

View File

@ -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.

View File

@ -58,6 +58,53 @@ extern "C" {
DirectDestroyAttribute(PyOccurrence_destroy, PyOccurrence) 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) DirectDeleteMethod(PyOccurrence_DeAlloc,PyOccurrence)
PyTypeObjectLinkPyType(Occurrence) PyTypeObjectLinkPyTypeNewInit(Occurrence)
//PyTypeObjectLinkPyType(Occurrence)
#else // End of Python Module Code Part. #else // End of Python Module Code Part.
@ -205,47 +253,6 @@ extern "C" {
// | "PyOccurrence" Shared Library Code Part | // | "PyOccurrence" Shared Library Code Part |
// x=================================================================x // 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 );
}
// --------------------------------------------------------------- // ---------------------------------------------------------------

View File

@ -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.

View File

@ -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/PyNet.h"
#include "hurricane/isobar/PyLayer.h" #include "hurricane/isobar/PyLayer.h"
#include "hurricane/isobar/PyBox.h" #include "hurricane/isobar/PyBox.h"
@ -37,6 +53,40 @@ extern "C" {
// Standard Destroy (Attribute). // Standard Destroy (Attribute).
DBoDestroyAttribute(PyPad_destroy, PyPad) 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 ()" // Attribute Method : "PyPad_getBoundingBox ()"
@ -100,7 +150,9 @@ extern "C" {
// PyPad Attribute Method table. // PyPad Attribute Method table.
PyMethodDef PyPad_Methods[] = PyMethodDef PyPad_Methods[] =
{ { "getX" , (PyCFunction)PyPad_getX , METH_NOARGS, "Return the Pad X value." } { { "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." } , { "getY" , (PyCFunction)PyPad_getY , METH_NOARGS, "Return the Pad Y value." }
, { "getBoundingBox", (PyCFunction)PyPad_getBoundingBox, METH_NOARGS, "Return the Pad Bounding Box." } , { "getBoundingBox", (PyCFunction)PyPad_getBoundingBox, METH_NOARGS, "Return the Pad Bounding Box." }
, { "setBoundingBox", (PyCFunction)PyPad_setBoundingBox, METH_VARARGS, "Sets the Pad Bounding Box." } , { "setBoundingBox", (PyCFunction)PyPad_setBoundingBox, METH_VARARGS, "Sets the Pad Bounding Box." }
@ -127,55 +179,14 @@ extern "C" {
// | "PyPad" Shared Library Code Part | // | "PyPad" Shared Library Code Part |
// x=================================================================x // 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. // Link/Creation Method.
DBoLinkCreateMethod(Pad) DBoLinkCreateMethod(Pad)
// ---------------------------------------------------------------
// PyPad Object Definitions.
PyTypeInheritedObjectDefinitions(Pad, Component) PyTypeInheritedObjectDefinitions(Pad, Component)
#endif // End of Shared Library Code Part. #endif // Shared Library Code Part.
} // extern "C".
} // End of extern "C".

View File

@ -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 | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul CHAPUT | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Module : "./PyPath.cpp" | // | C++ Module : "./PyPath.cpp" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#include "hurricane/isobar/PyTransformation.h" #include "hurricane/isobar/PyTransformation.h"
#include "hurricane/isobar/PyPath.h" #include "hurricane/isobar/PyPath.h"
@ -52,6 +54,57 @@ extern "C" {
DirectDestroyAttribute(PyPath_destroy, PyPath) 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 // x-------------------------------------------------------------x
DirectDeleteMethod(PyPath_DeAlloc,PyPath) DirectDeleteMethod(PyPath_DeAlloc,PyPath)
PyTypeObjectLinkPyType(Path) PyTypeObjectLinkPyTypeNewInit(Path)
//PyTypeObjectLinkPyType(Path)
# else // End of Python Module Code Part. # else // End of Python Module Code Part.
@ -270,51 +324,6 @@ extern "C" {
// | "PyPath" Shared Library Code Part | // | "PyPath" Shared Library Code Part |
// x=================================================================x // 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. // PyPath Object Definitions.

View File

@ -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 | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Damien DUPUIS | // | Author : Damien DUPUIS |
// | E-mail : Damien.Dupuis@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Module : "./PyPin.cpp" | // | C++ Module : "./PyPin.cpp" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#include "hurricane/isobar/PyPin.h" #include "hurricane/isobar/PyPin.h"
#include "hurricane/isobar/PyPinPlacementStatus.h"
#include "hurricane/isobar/PyPinDirection.h"
#include "hurricane/isobar/PyNet.h" #include "hurricane/isobar/PyNet.h"
#include "hurricane/isobar/PyLayer.h" #include "hurricane/isobar/PyLayer.h"
namespace Isobar { namespace Isobar {
using namespace Hurricane; using namespace Hurricane;
extern "C" { extern "C" {
@ -38,71 +41,12 @@ extern "C" {
#if defined(__PYTHON_MODULE__) #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 // x-------------------------------------------------------------x
// | "PyPin" Attribute Methods | // | "PyPin" Attribute Methods |
// x-------------------------------------------------------------x // 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 ) { static Pin::PlacementStatus PyInt_AsPlacementStatus ( PyObject* object ) {
switch ( PyInt_AsLong(object) ) { switch ( PyInt_AsLong(object) ) {
case Pin::PlacementStatus::UNPLACED : return ( Pin::PlacementStatus(Pin::PlacementStatus::UNPLACED) ); case Pin::PlacementStatus::UNPLACED : return ( Pin::PlacementStatus(Pin::PlacementStatus::UNPLACED) );
@ -113,6 +57,7 @@ extern "C" {
return ( Pin::PlacementStatus(Pin::PlacementStatus::UNPLACED) ); return ( Pin::PlacementStatus(Pin::PlacementStatus::UNPLACED) );
} }
static Pin::AccessDirection PyInt_AsAccessDirection ( PyObject* object ) { static Pin::AccessDirection PyInt_AsAccessDirection ( PyObject* object ) {
switch ( PyInt_AsLong(object) ) { switch ( PyInt_AsLong(object) ) {
case Pin::AccessDirection::UNDEFINED : return ( Pin::AccessDirection(Pin::AccessDirection::UNDEFINED) ); case Pin::AccessDirection::UNDEFINED : return ( Pin::AccessDirection(Pin::AccessDirection::UNDEFINED) );
@ -125,10 +70,11 @@ extern "C" {
return ( Pin::AccessDirection(Pin::AccessDirection::UNDEFINED) ); return ( Pin::AccessDirection(Pin::AccessDirection::UNDEFINED) );
} }
// --------------------------------------------------------------- // ---------------------------------------------------------------
// Attribute Method : "PyPin_create ()" // Attribute Method : "PyPin_create ()"
PyObject* PyPin_create ( PyObject *module, PyObject *args ) { static PyObject* PyPin_create ( PyObject*, PyObject *args ) {
Pin* pin = NULL; Pin* pin = NULL;
HTRY HTRY
@ -203,18 +149,65 @@ extern "C" {
} }
// Standart Accessors (Attributes).
// Link/Creation Method. PyObject* PyPin_getAccessDirection( PyPin* self ) {
DBoLinkCreateMethod(Pin) trace << "PyNet_getAccessDirection ()" << endl;
METHOD_HEAD ( "Net.getAccessDirection()" )
return (PyObject *)Py_BuildValue("l", pin->getAccessDirection().getCode() );
}
// --------------------------------------------------------------- // ---------------------------------------------------------------
// PyPin Object Definitions. // 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)
PyTypeInheritedObjectDefinitions(Pin, Contact) 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. #endif // End of Shared Library Code Part.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -1,61 +1,22 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2006-2014, All Rights Reserved
// Universite Pierre et Marie Curie
// //
// Main contributors : // +-----------------------------------------------------------------+
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// ===================================================================
//
// $Id: PyPoint.cpp,v 1.17 2006/09/22 11:27:32 tsunami Exp $
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul CHAPUT | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Module : "./PyPoint.cpp" | // | C++ Module : "./PyPoint.cpp" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#include "hurricane/isobar/PyPoint.h" #include "hurricane/isobar/PyPoint.h"
namespace Isobar { namespace Isobar {
using namespace Hurricane; using namespace Hurricane;
@ -78,6 +39,53 @@ extern "C" {
// x-------------------------------------------------------------x // 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 ()" // Attribute Method : "PyPoint_Translate ()"
@ -140,7 +148,8 @@ extern "C" {
DirectDeleteMethod(PyPoint_DeAlloc,PyPoint) DirectDeleteMethod(PyPoint_DeAlloc,PyPoint)
PyTypeObjectLinkPyType(Point) PyTypeObjectLinkPyTypeNewInit(Point)
//PyTypeObjectLinkPyType(Point)
#else // End of Python Module Code Part. #else // End of Python Module Code Part.
@ -150,59 +159,12 @@ extern "C" {
// x=================================================================x // 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) PyTypeObjectDefinitions(Point)
#endif // End of Shared Library Code Part. #endif // Shared Library Code Part.
} // extern "C".
} // Isobar namespace.
} // End of extern "C".
} // End of Isobar namespace.

View File

@ -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 | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul Chaput | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Module : "./PyReference.cpp" | // | C++ Module : "./PyReference.cpp" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#include "hurricane/isobar/PyReference.h" #include "hurricane/isobar/PyReference.h"
@ -51,6 +51,49 @@ extern "C" {
GetNameMethod(Reference, reference) 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 ()" // Attribute Method : "PyReference_getPoint ()"
@ -120,7 +163,9 @@ extern "C" {
// PyReference Attribute Method table. // PyReference Attribute Method table.
PyMethodDef PyReference_Methods[] = 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." } , "destroy associated hurricane object, the python object remains." }
, { "getName" , (PyCFunction)PyReference_getName , METH_NOARGS , "Returns the name of the reference." } , { "getName" , (PyCFunction)PyReference_getName , METH_NOARGS , "Returns the name of the reference." }
, { "getPoint" , (PyCFunction)PyReference_getPoint , METH_NOARGS , "Return the reference point." } , { "getPoint" , (PyCFunction)PyReference_getPoint , METH_NOARGS , "Return the reference point." }
@ -148,50 +193,6 @@ extern "C" {
// x=================================================================x // 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 );
}
// Link/Creation Method. // Link/Creation Method.
DBoLinkCreateMethod(Reference) DBoLinkCreateMethod(Reference)

View File

@ -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 | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul CHAPUT | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Module : "./PyTransformation.cpp" | // | C++ Module : "./PyTransformation.cpp" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#include "hurricane/isobar/PyPoint.h" #include "hurricane/isobar/PyPoint.h"
#include "hurricane/isobar/PyBox.h" #include "hurricane/isobar/PyBox.h"
#include "hurricane/isobar/PyTransformation.h" #include "hurricane/isobar/PyTransformation.h"
#include "hurricane/isobar/PyOrientation.h"
namespace Isobar { namespace Isobar {
@ -40,27 +37,6 @@ extern "C" {
#if defined(__PYTHON_MODULE__) #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 // x-------------------------------------------------------------x
// | "PyTransformation" Attribute Methods | // | "PyTransformation" Attribute Methods |
// x-------------------------------------------------------------x // x-------------------------------------------------------------x
@ -75,6 +51,80 @@ extern "C" {
DirectDestroyAttribute(PyTransformation_destroy, PyTransformation) 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. // PyTransformation Attribute Method table.
@ -487,14 +535,13 @@ extern "C" {
}; };
// x-------------------------------------------------------------x // x-------------------------------------------------------------x
// | "PyTransformation" Object Methods | // | "PyTransformation" Object Methods |
// x-------------------------------------------------------------x // x-------------------------------------------------------------x
DirectDeleteMethod(PyTransformation_DeAlloc,PyTransformation) DirectDeleteMethod(PyTransformation_DeAlloc,PyTransformation)
PyTypeObjectLinkPyType(Transformation) PyTypeObjectLinkPyTypeNewInit(Transformation)
//PyTypeObjectLinkPyType(Transformation)
#else // End of Python Module Code Part. #else // End of Python Module Code Part.
@ -504,83 +551,20 @@ extern "C" {
// | "PyTransformation" Shared Library Code Part | // | "PyTransformation" Shared Library Code Part |
// x=================================================================x // 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. // PyTransformation Object Definitions.
PyTypeObjectDefinitions(Transformation) PyTypeObjectDefinitions(Transformation)
extern void PyTransformation_postModuleInit ()
{
PyOrientation_postModuleInit();
PyDict_SetItemString( PyTypeTransformation.tp_dict, "Orientation", (PyObject*)&PyTypeOrientation );
}
#endif // End of Shared Library Code Part. #endif // End of Shared Library Code Part.

View File

@ -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 | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Sophie BELLOEIL | // | Author : Sophie BELLOEIL |
// | E-mail : Sophie.Belloeil@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Module : "./PyVertical.cpp" | // | C++ Module : "./PyCell.cpp" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#include "hurricane/isobar/PyNet.h" #include "hurricane/isobar/PyNet.h"
@ -56,65 +55,10 @@ extern "C" {
DBoDestroyAttribute(PyVertical_destroy, PyVertical) 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 ()" // Attribute Method : "PyVertical_create ()"
PyObject* PyVertical_create ( PyObject *module, PyObject *args ) { static PyObject* PyVertical_create ( PyObject*, PyObject *args ) {
trace << "PyVertical_create()" << endl; trace << "PyVertical_create()" << endl;
PyObject* arg0; 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. // Link/Creation Method.
DBoLinkCreateMethod(Vertical) DBoLinkCreateMethod(Vertical)

View File

@ -1,70 +1,28 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2006-2014, All Rights Reserved
// Universite Pierre et Marie Curie
// //
// Main contributors : // +-----------------------------------------------------------------+
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// ===================================================================
//
// $Id: PyBox.h,v 1.7 2006/05/03 14:00:01 jpc Exp $
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul CHAPUT | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./PyBox.h" | // | C++ Header : "./hurricane/isobar/PyBox.h" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef PY_BOX_H
#define PY_BOX_H
# ifndef __PYBOX__
# define __PYBOX__
#include "hurricane/isobar/PyHurricane.h" #include "hurricane/isobar/PyHurricane.h"
#include "hurricane/Box.h" #include "hurricane/Box.h"
namespace Isobar { namespace Isobar {
extern "C" { extern "C" {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -76,15 +34,12 @@ extern "C" {
} PyBox; } PyBox;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.cpp". // Functions & Types exported to "PyHurricane.cpp".
extern PyTypeObject PyTypeBox; extern PyTypeObject PyTypeBox;
extern PyMethodDef PyBox_Methods[]; extern PyMethodDef PyBox_Methods[];
extern PyObject* PyBox_create ( PyObject* self, PyObject* args );
extern void PyBox_LinkPyType (); extern void PyBox_LinkPyType ();
@ -93,13 +48,8 @@ extern "C" {
#define PYBOX_O(v) ( PYBOX(v)->_object ) #define PYBOX_O(v) ( PYBOX(v)->_object )
} // End of extern "C". } // extern "C".
} // Isobar namespace.
#endif // PY_BOX_H
} // End of Isobar namespace.
# endif

View File

@ -1,60 +1,21 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2006-2014, All Rights Reserved
// Universite Pierre et Marie Curie
// //
// Main contributors : // +-----------------------------------------------------------------+
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// ===================================================================
//
// $Id: PyCell.h,v 1.9 2006/05/03 14:00:01 jpc Exp $
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul CHAPUT | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./PyCell.h" | // | C++ Header : "./hurricane/isobar/PyCell.h" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef PY_CELL_H
#define PY_CELL_H
#ifndef __PYCELL__
#define __PYCELL__
#include "hurricane/isobar/PyEntity.h" #include "hurricane/isobar/PyEntity.h"
#include "hurricane/Cell.h" #include "hurricane/Cell.h"
@ -79,7 +40,6 @@ extern "C" {
extern PyTypeObject PyTypeCell; extern PyTypeObject PyTypeCell;
extern PyMethodDef PyCell_Methods[]; extern PyMethodDef PyCell_Methods[];
extern PyObject* PyCell_create ( PyObject* module, PyObject* args );
extern PyObject* PyCell_Link ( Hurricane::Cell* object ); extern PyObject* PyCell_Link ( Hurricane::Cell* object );
extern void PyCell_LinkPyType (); extern void PyCell_LinkPyType ();
@ -89,11 +49,8 @@ extern "C" {
#define PYCELL_O(v) (static_cast<Cell*>(PYCELL(v)->_baseObject._object)) #define PYCELL_O(v) (static_cast<Cell*>(PYCELL(v)->_baseObject._object))
} // End of extern "C". } // extern "C".
} // Isobar namespace.
#endif // PY_CELL_H
} // End of Isobar namespace.
#endif

View File

@ -1,64 +1,23 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2006-2014, All Rights Reserved
// Universite Pierre et Marie Curie
// //
// Main contributors : // +-----------------------------------------------------------------+
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// ===================================================================
//
// $Id: PyContact.h,v 1.6 2006/05/03 14:00:02 jpc Exp $
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul Chaput | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./PyContact.h" | // | C++ Header : "./hurricane/isobar/PyContact.h" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef PY_CONTACT_H
#define PY_CONTACT_H
#ifndef __PYCONTACT__
#define __PYCONTACT__
#include "hurricane/isobar/PyComponent.h" #include "hurricane/isobar/PyComponent.h"
#include "hurricane/Contact.h" #include "hurricane/Contact.h"
@ -66,7 +25,6 @@ namespace Isobar {
extern "C" { extern "C" {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Python Object : "PyContact". // Python Object : "PyContact".
@ -75,33 +33,23 @@ extern "C" {
} PyContact; } PyContact;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp". // Functions & Types exported to "PyHurricane.ccp".
extern PyTypeObject PyTypeContact; extern PyTypeObject PyTypeContact;
extern PyMethodDef PyContact_Methods[]; extern PyMethodDef PyContact_Methods[];
extern PyObject* PyContact_create ( PyObject* module, PyObject* args );
extern PyObject* PyContact_Link ( Hurricane::Contact* object ); extern PyObject* PyContact_Link ( Hurricane::Contact* object );
extern void PyContact_LinkPyType (); extern void PyContact_LinkPyType ();
#define IsPyContact(v) ( (v)->ob_type == &PyTypeContact ) #define IsPyContact(v) ( (v)->ob_type == &PyTypeContact )
#define PYCONTACT(v) ( (PyContact*)(v) ) #define PYCONTACT(v) ( (PyContact*)(v) )
#define PYCONTACT_O(v) ( PYCONTACT(v)->_baseObject._baseObject._object ) #define PYCONTACT_O(v) ( PYCONTACT(v)->_baseObject._baseObject._object )
} // End of extern "C". } // extern "C".
} // Isobar namespace.
#endif // PY_CONTACT_H
} // End of Isobar namespace.
#endif

View File

@ -1,73 +1,30 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2008-2014, All Rights Reserved
// Universite Pierre et Marie Curie
// //
// Main contributors : // +-----------------------------------------------------------------+
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// ===================================================================
//
// $Id: PyDataBase.h,v 1.1 2008/02/07 19:09:58 xtof Exp $
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul CHAPUT | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./PyDataBase.h" | // | C++ Header : "./hurricane/isobar/PyDataBase.h" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef PY_DATABASE_H
#define PY_DATABASE_H
#ifndef __PYDATABASE__
#define __PYDATABASE__
#include "hurricane/isobar/PyHurricane.h" #include "hurricane/isobar/PyHurricane.h"
#include "hurricane/DataBase.h" #include "hurricane/DataBase.h"
namespace Isobar { namespace Isobar {
extern "C" { extern "C" {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Python Object : "PyDataBase". // Python Object : "PyDataBase".
@ -77,17 +34,12 @@ extern "C" {
} PyDataBase; } PyDataBase;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp". // Functions & Types exported to "PyHurricane.ccp".
extern PyTypeObject PyTypeDataBase; extern PyTypeObject PyTypeDataBase;
extern PyMethodDef PyDataBase_Methods[]; 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 PyObject* PyDataBase_Link ( Hurricane::DataBase* db );
extern void PyDataBase_LinkPyType (); extern void PyDataBase_LinkPyType ();
@ -97,14 +49,8 @@ extern "C" {
#define PYDATABASE_O(v) ( PYDATABASE(v)->_object ) #define PYDATABASE_O(v) ( PYDATABASE(v)->_object )
} // End of extern "C". } // extern "C".
} // Isobar namespace.
#endif // PY_DATABASE_H
} // End of Isobar namespace.
# endif

View File

@ -1,73 +1,30 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2007-2014, All Rights Reserved
// Universite Pierre et Marie Curie
// //
// Main contributors : // +-----------------------------------------------------------------+
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// ===================================================================
//
// $Id: PyHorizontal.h,v 1.6 2007/01/30 14:47:24 cobell Exp $
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Sophie BELLOEIL | // | Author : Sophie BELLOEIL |
// | E-mail : Sophie.Belloeil@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./PyHorizontal.h" | // | C++ Header : "./hurricane/isobar/PyCell.h" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef PY_HORIZONTAL_H
#define PY_HORIZONTAL_H
#ifndef __PYHORIZONTAL__
#define __PYHORIZONTAL__
#include "hurricane/isobar/PySegment.h" #include "hurricane/isobar/PySegment.h"
#include "hurricane/Horizontal.h" #include "hurricane/Horizontal.h"
namespace Isobar { namespace Isobar {
extern "C" { extern "C" {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Python Object : "PyHorizontal". // Python Object : "PyHorizontal".
@ -76,15 +33,12 @@ extern "C" {
} PyHorizontal; } PyHorizontal;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp". // Functions & Types exported to "PyHurricane.ccp".
extern PyTypeObject PyTypeHorizontal; extern PyTypeObject PyTypeHorizontal;
extern PyMethodDef PyHorizontal_Methods[]; extern PyMethodDef PyHorizontal_Methods[];
extern PyObject* PyHorizontal_create ( PyObject* module, PyObject* args );
extern PyObject* PyHorizontal_Link ( Hurricane::Horizontal* object ); extern PyObject* PyHorizontal_Link ( Hurricane::Horizontal* object );
extern void PyHorizontal_LinkPyType (); extern void PyHorizontal_LinkPyType ();
@ -95,14 +49,8 @@ extern "C" {
#define PYHORIZONTAL_O(v) ( PYHORIZONTAL(v)->_baseObject._baseObject._baseObject._object ) #define PYHORIZONTAL_O(v) ( PYHORIZONTAL(v)->_baseObject._baseObject._baseObject._object )
} // End of extern "C". } // extern "C".
} // Isobar namespace.
#endif // PY_HORIZONTAL_H
} // End of Isobar namespace.
#endif

View File

@ -1,66 +1,28 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2007-2014, All Rights Reserved
// Universite Pierre et Marie Curie
// //
// Main contributors : // +-----------------------------------------------------------------+
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// ===================================================================
//
// $Id: PyHyperNet.h,v 1.2 2007/05/10 11:15:56 d2 Exp $
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Damien DUPUIS | // | Author : Damien DUPUIS |
// | E-mail : Damien.Dupuis@lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./PyHyperNet.h" | // | C++ Header : "./hurricane/isobar/PyHyperNet.h" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef __PYHYPERNET__
#define __PYHYPERNET__
#ifndef PY_HYPERNET_H
#define PY_HYPERNET_H
#include "hurricane/isobar/PyHurricane.h" #include "hurricane/isobar/PyHurricane.h"
#include "hurricane/HyperNet.h" #include "hurricane/HyperNet.h"
namespace Isobar { namespace Isobar {
extern "C" { extern "C" {
@ -73,15 +35,12 @@ extern "C" {
} PyHyperNet; } PyHyperNet;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp". // Functions & Types exported to "PyHurricane.ccp".
extern PyTypeObject PyTypeHyperNet; extern PyTypeObject PyTypeHyperNet;
extern PyMethodDef PyHyperNet_Methods[]; extern PyMethodDef PyHyperNet_Methods[];
extern PyObject* PyHyperNet_create ( PyObject* module, PyObject* args );
extern void PyHyperNet_LinkPyType(); extern void PyHyperNet_LinkPyType();
@ -90,14 +49,8 @@ extern "C" {
#define PYHYPERNET_O(v) ( PYHYPERNET(v)->_object ) #define PYHYPERNET_O(v) ( PYHYPERNET(v)->_object )
} // End of extern "C". } // extern "C".
} // Isobar namespace.
#endif // PY_HYPERNET_H
} // End of Isobar namespace.
# endif

View File

@ -1,76 +1,34 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2006-2014, All Rights Reserved
// Universite Pierre et Marie Curie
// //
// Main contributors : // +-----------------------------------------------------------------+
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// ===================================================================
//
// $Id: PyInstance.h,v 1.9 2006/05/03 14:00:03 jpc Exp $
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul CHAPUT | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./PyInstance.h" | // | C++ Header : "./hurricane/isobar/PyInstance.h" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef PY_INSTANCE_H
#define PY_INSTANCE_H
#ifndef __PYINSTANCE__
#define __PYINSTANCE__
#include "hurricane/isobar/PyEntity.h" #include "hurricane/isobar/PyEntity.h"
#include "hurricane/Instance.h" #include "hurricane/Instance.h"
namespace Isobar { namespace Isobar {
using namespace Hurricane; using namespace Hurricane;
extern "C" { extern "C" {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Python Object : "PyInstance". // Python Object : "PyInstance".
@ -79,19 +37,15 @@ extern "C" {
} PyInstance; } PyInstance;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp". // Functions & Types exported to "PyHurricane.ccp".
extern PyTypeObject PyTypeInstance; extern PyTypeObject PyTypeInstance;
extern PyMethodDef PyInstance_Methods[]; extern PyMethodDef PyInstance_Methods[];
extern PyObject* PyInstance_create ( PyObject* module, PyObject* args );
extern PyObject* PyInstance_Link ( Hurricane::Instance* object); extern PyObject* PyInstance_Link ( Hurricane::Instance* object);
extern void InstanceLoadConstants ( PyObject* dictionnary );
extern void PyInstance_LinkPyType (); extern void PyInstance_LinkPyType ();
extern void PyInstance_postModuleInit ();
#define IsPyInstance(v) ((v)->ob_type == &PyTypeInstance ) #define IsPyInstance(v) ((v)->ob_type == &PyTypeInstance )
@ -99,14 +53,8 @@ extern "C" {
#define PYINSTANCE_O(v) (static_cast<Instance*>(PYINSTANCE(v)->_baseObject._object)) #define PYINSTANCE_O(v) (static_cast<Instance*>(PYINSTANCE(v)->_baseObject._object))
} // End of extern "C". } // extern "C".
} // Isobar namespace.
#endif // PY_INSTANCE_H
} // End of Isobar namespace.
#endif

View File

@ -1,72 +1,33 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2008-2014, All Rights Reserved
// Universite Pierre et Marie Curie
// //
// Main contributors : // +-----------------------------------------------------------------+
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// ===================================================================
//
// $Id: PyLibrary.h,v 1.7 2006/05/03 14:00:03 jpc Exp $
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul CHAPUT | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./PyLibrary.h" | // | C++ Module : "./PyLibrary.cpp" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef __PYLIBRARY__
#define __PYLIBRARY__
#ifndef PY_LIBRARY_H
#define PY_LIBRARY_H
#include "hurricane/isobar/PyHurricane.h" #include "hurricane/isobar/PyHurricane.h"
#include "hurricane/Library.h" #include "hurricane/Library.h"
namespace Isobar { namespace Isobar {
using namespace Hurricane; using namespace Hurricane;
extern "C" { extern "C" {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Python Object : "PyLibrary". // Python Object : "PyLibrary".
@ -76,16 +37,12 @@ extern "C" {
} PyLibrary; } PyLibrary;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp". // Functions & Types exported to "PyHurricane.ccp".
extern PyTypeObject PyTypeLibrary; extern PyTypeObject PyTypeLibrary;
extern PyMethodDef PyLibrary_Methods[]; 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 PyObject* PyLibrary_Link ( Hurricane::Library* lib );
extern void PyLibrary_LinkPyType (); extern void PyLibrary_LinkPyType ();
@ -95,11 +52,8 @@ extern "C" {
#define PYLIBRARY_O(v) ( PYLIBRARY(v)->_object ) #define PYLIBRARY_O(v) ( PYLIBRARY(v)->_object )
} // End of extern "C". } // extern "C".
} // Isobar namespace.
# endif // PY_LIBRARY_H
} // End of Isobar namespace.
# endif

View File

@ -1,33 +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 | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Sophie BELLOEIL | // | Author : Sophie BELLOEIL |
// | E-mail : Sophie.Belloeil@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./PyNet.h" | // | C++ Header : "./hurricane/isobar/PyNet.h" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef PY_NET_H
#define PY_NET_H
#ifndef __PYNET__
#define __PYNET__
#include "hurricane/isobar/PyEntity.h" #include "hurricane/isobar/PyEntity.h"
#include "hurricane/Net.h" #include "hurricane/Net.h"
namespace Isobar { namespace Isobar {
extern "C" { extern "C" {
@ -39,18 +34,15 @@ extern "C" {
} PyNet; } PyNet;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp". // Functions & Types exported to "PyHurricane.ccp".
extern PyTypeObject PyTypeNet; extern PyTypeObject PyTypeNet;
extern PyMethodDef PyNet_Methods[]; extern PyMethodDef PyNet_Methods[];
extern PyObject* PyNet_create ( PyObject* module, PyObject* args );
extern PyObject* PyNet_Link ( Hurricane::Net* object ); extern PyObject* PyNet_Link ( Hurricane::Net* object );
extern void NetLoadConstants ( PyObject* dictionnary );
extern void PyNet_LinkPyType (); extern void PyNet_LinkPyType ();
extern void PyNet_postModuleInit ();
@ -59,14 +51,8 @@ extern "C" {
#define PYNET_O(v) (dynamic_cast<Net*>(PYNET(v)->_baseObject._object)) #define PYNET_O(v) (dynamic_cast<Net*>(PYNET(v)->_baseObject._object))
} // End of extern "C". } // extern "C".
} // Isobar namespace.
#endif // PY_NET_H
} // End of Isobar namespace.
#endif

View File

@ -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

View File

@ -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

View File

@ -1,70 +1,28 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2006-2014, All Rights Reserved
// Universite Pierre et Marie Curie
// //
// Main contributors : // +-----------------------------------------------------------------+
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// ===================================================================
//
// $Id: PyOccurrence.h,v 1.2 2006/05/03 14:00:03 jpc Exp $
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul CHAPUT | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./PyOccurrence.h" | // | C++ Header : "./hurricane/isobar/PyOccurrence.h" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef PY_OCCURRENCE_H
#define PY_OCCURRENCE_H
# ifndef __PYOCCURRENCE__
# define __PYOCCURRENCE__
#include "hurricane/isobar/PyHurricane.h" #include "hurricane/isobar/PyHurricane.h"
#include "hurricane/Occurrence.h" #include "hurricane/Occurrence.h"
namespace Isobar { namespace Isobar {
extern "C" { extern "C" {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -76,15 +34,12 @@ extern "C" {
} PyOccurrence; } PyOccurrence;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.cpp". // Functions & Types exported to "PyHurricane.cpp".
extern PyTypeObject PyTypeOccurrence; extern PyTypeObject PyTypeOccurrence;
extern PyMethodDef PyOccurrence_Methods[]; extern PyMethodDef PyOccurrence_Methods[];
extern PyObject* PyOccurrence_create ( PyObject* module, PyObject* args );
extern void PyOccurrence_LinkPyType (); extern void PyOccurrence_LinkPyType ();
@ -93,14 +48,8 @@ extern "C" {
#define PYOCCURRENCE_O(v) ( PYOCCURRENCE(v)->_object ) #define PYOCCURRENCE_O(v) ( PYOCCURRENCE(v)->_object )
} // End of extern "C". } // extern "C".
} // Isobar namespace.
#endif // PY_OCCURRENCE_H
} // End of Isobar namespace.
# endif

View File

@ -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

View File

@ -1,15 +1,28 @@
#ifndef __PYPAD_H // -*- C++ -*-
#define __PYPAD_H //
// 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/isobar/PyComponent.h"
#include "hurricane/Pad.h" #include "hurricane/Pad.h"
namespace Isobar { namespace Isobar {
extern "C" { extern "C" {
@ -21,15 +34,12 @@ extern "C" {
} PyPad; } PyPad;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp". // Functions & Types exported to "PyHurricane.ccp".
extern PyTypeObject PyTypePad; extern PyTypeObject PyTypePad;
extern PyMethodDef PyPad_Methods[]; extern PyMethodDef PyPad_Methods[];
extern PyObject* PyPad_create ( PyObject* module, PyObject* args );
extern PyObject* PyPad_Link ( Hurricane::Pad* object ); extern PyObject* PyPad_Link ( Hurricane::Pad* object );
extern void PyPad_LinkPyType (); extern void PyPad_LinkPyType ();
@ -39,14 +49,8 @@ extern "C" {
#define PYPAD_O(v) ( PYPAD(v)->_baseObject._baseObject._object ) #define PYPAD_O(v) ( PYPAD(v)->_baseObject._baseObject._object )
} // End of extern "C". } // extern "C".
} // Isobar namespace.
#endif // PY_PAD_H
} // End of Isobar namespace.
#endif /* __PYPAD_H */

View File

@ -1,70 +1,28 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2006-2014, All Rights Reserved
// Universite Pierre et Marie Curie
// //
// Main contributors : // +-----------------------------------------------------------------+
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// ===================================================================
//
// $Id: PyPath.h,v 1.2 2006/05/03 14:00:04 jpc Exp $
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul CHAPUT | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./PyPath.h" | // | C++ Header : "./hurricane/isobar/PyPath.h" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef PY_PATH_H
#define PY_PATH_H
#ifndef __PYPATH__
#define __PYPATH__
#include "hurricane/isobar/PyHurricane.h" #include "hurricane/isobar/PyHurricane.h"
#include "hurricane/Path.h" #include "hurricane/Path.h"
namespace Isobar { namespace Isobar {
extern "C" { extern "C" {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -76,15 +34,12 @@ extern "C" {
} PyPath; } PyPath;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.cpp". // Functions & Types exported to "PyHurricane.cpp".
extern PyTypeObject PyTypePath; extern PyTypeObject PyTypePath;
extern PyMethodDef PyPath_Methods[]; extern PyMethodDef PyPath_Methods[];
extern PyObject* PyPath_create ( PyObject* module, PyObject* args );
extern void PyPath_LinkPyType (); extern void PyPath_LinkPyType ();
@ -93,14 +48,8 @@ extern "C" {
#define PYPATH_O(v) ( PYPATH(v)->_object ) #define PYPATH_O(v) ( PYPATH(v)->_object )
} // End of extern "C". } // extern "C".
} // Isobar namespace.
#endif // PY_PATH_H
} // End of Isobar namespace.
#endif

View File

@ -1,56 +1,21 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2006-2014, All Rights Reserved
// Universite Pierre et Marie Curie
// //
// Main contributors : // +-----------------------------------------------------------------+
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// ===================================================================
//
// $Id: PyPin.h,v 1.9 2006/11/29 10:40:25 d2 Exp $
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Damien DUPUIS | // | Author : Damien DUPUIS |
// | E-mail : Damien.Dupuis@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./PyPin.h" | // | C++ Header : "./hurricane/isobar/PyPin.h" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef __PYPIN__
#define __PYPIN__ #ifndef PY_PIN_H
#define PY_PIN_H
#include "hurricane/isobar/PyContact.h" #include "hurricane/isobar/PyContact.h"
#include "hurricane/Pin.h" #include "hurricane/Pin.h"
@ -58,8 +23,6 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
extern "C" { extern "C" {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -76,18 +39,18 @@ extern "C" {
extern PyTypeObject PyTypePin; extern PyTypeObject PyTypePin;
extern PyMethodDef PyPin_Methods[]; extern PyMethodDef PyPin_Methods[];
extern PyObject* PyPin_create ( PyObject* module, PyObject* args );
extern PyObject* PyPin_Link (Hurricane::Pin* object ); extern PyObject* PyPin_Link (Hurricane::Pin* object );
extern void PinLoadConstants ( PyObject* dictionnary );
extern void PyPin_LinkPyType (); extern void PyPin_LinkPyType ();
extern void PyPin_postModuleInit ();
# define IsPyPin(v) ( (v)->ob_type == &PyTypePin ) # define IsPyPin(v) ( (v)->ob_type == &PyTypePin )
# define PYPIN(v) ( (PyPin*)(v) ) # define PYPIN(v) ( (PyPin*)(v) )
# define PYPIN_O(v) ( PYPIN(v)->_baseObject._baseObject._baseObject._object ) # 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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,73 +1,30 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2006-2014, All Rights Reserved
// Universite Pierre et Marie Curie
// //
// Main contributors : // +-----------------------------------------------------------------+
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// ===================================================================
//
// $Id: PyPoint.h,v 1.6 2006/05/03 14:00:04 jpc Exp $
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul CHAPUT | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./PyPoint.h" | // | C++ Header : "./hurricane/isobar/PyPoint.h" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef PY_POINT_H
#define PY_POINT_H
# ifndef __PYPOINT__
# define __PYPOINT__
#include "hurricane/isobar/PyHurricane.h" #include "hurricane/isobar/PyHurricane.h"
#include "hurricane/Point.h" #include "hurricane/Point.h"
namespace Isobar { namespace Isobar {
extern "C" { extern "C" {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Python Object : "PyPoint". // Python Object : "PyPoint".
@ -77,15 +34,12 @@ extern "C" {
} PyPoint; } PyPoint;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp". // Functions & Types exported to "PyHurricane.ccp".
extern PyTypeObject PyTypePoint; extern PyTypeObject PyTypePoint;
extern PyMethodDef PyPoint_Methods[]; extern PyMethodDef PyPoint_Methods[];
extern PyObject* PyPoint_create ( PyObject* self, PyObject* args );
extern void PyPoint_LinkPyType(); extern void PyPoint_LinkPyType();
@ -94,14 +48,8 @@ extern "C" {
# define PYPOINT_O(v) ( PYPOINT(v)->_object ) # define PYPOINT_O(v) ( PYPOINT(v)->_object )
} // End of extern "C". } // extern "C".
} // Isobar namespace.
#endif // PY_POINT_H
} // End of Isobar namespace.
# endif

View File

@ -1,64 +1,23 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2008-2014, All Rights Reserved
// Universite Pierre et Marie Curie
// //
// Main contributors : // +-----------------------------------------------------------------+
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// ===================================================================
//
// $Id: PyReference.h,v 1.2 2006/05/03 14:00:04 jpc Exp $
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul Chaput | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./PyReference.h" | // | C++ Header : "./hurricane/isobar/PyReference.cpp" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef PY_REFERENCE_H
#define PY_REFERENCE_H
#ifndef __PYREFERENCE__
#define __PYREFERENCE__
#include "hurricane/isobar/PyEntity.h" #include "hurricane/isobar/PyEntity.h"
#include "hurricane/Reference.h" #include "hurricane/Reference.h"
@ -75,15 +34,12 @@ extern "C" {
} PyReference; } PyReference;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp". // Functions & Types exported to "PyHurricane.ccp".
extern PyTypeObject PyTypeReference; extern PyTypeObject PyTypeReference;
extern PyMethodDef PyReference_Methods[]; extern PyMethodDef PyReference_Methods[];
extern PyObject* PyReference_create ( PyObject* module, PyObject* args );
extern PyObject* PyReference_Link ( Hurricane::Reference* object ); extern PyObject* PyReference_Link ( Hurricane::Reference* object );
extern void PyReference_LinkPyType (); extern void PyReference_LinkPyType ();
@ -94,14 +50,8 @@ extern "C" {
#define PYREFERENCE_O(v) (PYREFERENCE(v)->_baseObject._object) #define PYREFERENCE_O(v) (PYREFERENCE(v)->_baseObject._object)
} // End of extern "C". } // extern "C".
} // End of Isobar namespace.
} // Isobar namespace.
#endif #endif

View File

@ -1,70 +1,29 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2006-2014, All Rights Reserved
// Universite Pierre et Marie Curie
// //
// Main contributors : // +-----------------------------------------------------------------+
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// ===================================================================
//
// $Id: PyTransformation.h,v 1.6 2006/05/03 14:00:05 jpc Exp $
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Jean-Paul CHAPUT | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./PyTransformation.h" | // | C++ Header : "./hurricane/isobar/PyTransformation.h" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef PY_TRANSFORMATION_H
#define PY_TRANSFORMATION_H
#ifndef __PYTRANSFORMATION__
#define __PYTRANSFORMATION__
#include "hurricane/isobar/PyHurricane.h" #include "hurricane/isobar/PyHurricane.h"
#include "hurricane/Transformation.h" #include "hurricane/Transformation.h"
namespace Isobar { namespace Isobar {
extern "C" { extern "C" {
@ -77,17 +36,14 @@ extern "C" {
} PyTransformation; } PyTransformation;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp". // Functions & Types exported to "PyHurricane.ccp".
extern PyTypeObject PyTypeTransformation; extern PyTypeObject PyTypeTransformation;
extern PyMethodDef PyTransformation_Methods[]; 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 ) # define IsPyTransformation(v) ( (v)->ob_type == &PyTypeTransformation )
@ -95,8 +51,8 @@ extern "C" {
# define PYTRANSFORMATION_O(v) ( PYTRANSFORMATION(v)->_object ) # define PYTRANSFORMATION_O(v) ( PYTRANSFORMATION(v)->_object )
} // End of extern "C". } // extern "C".
} // End of Isobar namespace. } // Isobar namespace.
#endif #endif // PY_TRANSFORMATION_H

View File

@ -1,73 +1,30 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Project. // This file is part of the Coriolis Software.
// Copyright (C) Laboratoire LIP6 - Departement ASIM // Copyright (c) UPMC 2007-2014, All Rights Reserved
// Universite Pierre et Marie Curie
// //
// Main contributors : // +-----------------------------------------------------------------+
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
// Hugo Clément <Hugo.Clement@lip6.fr>
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
// Damien Dupuis <Damien.Dupuis@lip6.fr>
// Christian Masson <Christian.Masson@lip6.fr>
// Marek Sroka <Marek.Sroka@lip6.fr>
//
// The Coriolis Project is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// The Coriolis Project is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Coriolis Project; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
// License-Tag
// Authors-Tag
// ===================================================================
//
// $Id: PyVertical.h,v 1.6 2007/01/30 14:47:25 cobell Exp $
//
// x-----------------------------------------------------------------x
// | |
// | C O R I O L I S | // | C O R I O L I S |
// | I s o b a r - Hurricane / Python Interface | // | I s o b a r - Hurricane / Python Interface |
// | | // | |
// | Author : Sophie BELLOEIL | // | Author : Sophie BELLOEIL |
// | E-mail : Sophie.Belloeil@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./PyVertical.h" | // | C++ Header : "./hurricane/isobar/PyVertical.h" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef PY_VERTICAL_H
#define PY_VERTICAL_H
#ifndef __PYVERTICAL__
#define __PYVERTICAL__
#include "hurricane/isobar/PySegment.h" #include "hurricane/isobar/PySegment.h"
#include "hurricane/Vertical.h" #include "hurricane/Vertical.h"
namespace Isobar { namespace Isobar {
extern "C" { extern "C" {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Python Object : "PyVertical". // Python Object : "PyVertical".
@ -76,33 +33,23 @@ extern "C" {
} PyVertical; } PyVertical;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Functions & Types exported to "PyHurricane.ccp". // Functions & Types exported to "PyHurricane.ccp".
extern PyTypeObject PyTypeVertical; extern PyTypeObject PyTypeVertical;
extern PyMethodDef PyVertical_Methods[]; extern PyMethodDef PyVertical_Methods[];
extern PyObject* PyVertical_create ( PyObject* module, PyObject* args );
extern PyObject* PyVertical_Link ( Hurricane::Vertical* object ); extern PyObject* PyVertical_Link ( Hurricane::Vertical* object );
extern void PyVertical_LinkPyType (); extern void PyVertical_LinkPyType ();
#define IsPyVertical(v) ((v)->ob_type == &PyTypeVertical) #define IsPyVertical(v) ((v)->ob_type == &PyTypeVertical)
#define PYVERTICAL(v) ((PyVertical*)(v)) #define PYVERTICAL(v) ((PyVertical*)(v))
#define PYVERTICAL_O(v) (PYVERTICAL(v)->_baseObject._baseObject._baseObject._object) #define PYVERTICAL_O(v) (PYVERTICAL(v)->_baseObject._baseObject._baseObject._object)
} // End of extern "C". } // extern "C".
} // Isobar namespace.
#endif // PY_VERTICAL_H
} // End of Isobar namespace.
#endif

View File

@ -208,7 +208,7 @@ class Inst :
err = "\n[Stratus ERROR] HurricanePlug : Problem of hurricane cell.\nTry to contact Coriolis team.\n" err = "\n[Stratus ERROR] HurricanePlug : Problem of hurricane cell.\nTry to contact Coriolis team.\n"
raise Exception ( err ) raise Exception ( err )
inst = Instance ( self._st_cell._hur_cell inst = Instance.create ( self._st_cell._hur_cell
, self._name , self._name
, self._hur_masterCell , self._hur_masterCell
) )

View File

@ -934,24 +934,24 @@ class net :
self._hur_net += [cat[0]._hur_net[cat[1]]] self._hur_net += [cat[0]._hur_net[cat[1]]]
return 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 ) if self._ext : net.setExternal ( True )
else : net.setExternal ( False ) else : net.setExternal ( False )
if self._ext : if self._ext :
if self._direct == "IN" : net.setDirection ( DirectionIN ) if self._direct == "IN" : net.setDirection ( Net.Direction.IN )
elif self._direct == "OUT" : net.setDirection ( DirectionOUT ) elif self._direct == "OUT" : net.setDirection ( Net.Direction.OUT )
elif self._direct == "INOUT" : net.setDirection ( DirectionINOUT ) elif self._direct == "INOUT" : net.setDirection ( Net.Direction.INOUT )
elif self._direct == "TRISTATE" : net.setDirection ( DirectionTRISTATE ) elif self._direct == "TRISTATE" : net.setDirection ( Net.Direction.TRISTATE )
elif self._direct == "UNKNOWN" : net.setDirection ( DirectionUNDEFINED ) elif self._direct == "UNKNOWN" : net.setDirection ( Net.Direction.UNDEFINED )
if '_h_type' in self.__dict__ : if '_h_type' in self.__dict__ :
if self._h_type == "POWER" : net.setType ( TypePOWER ) if self._h_type == "POWER" : net.setType ( Net.Type.POWER )
elif self._h_type == "GROUND" : net.setType ( TypeGROUND ) elif self._h_type == "GROUND" : net.setType ( Net.Type.GROUND )
elif self._h_type == "CLOCK" : net.setType ( TypeCLOCK ) elif self._h_type == "CLOCK" : net.setType ( Net.Type.CLOCK )
self._hur_net += [net] self._hur_net += [net]
@ -1015,15 +1015,15 @@ class net :
else : self._ext = False else : self._ext = False
if hur_net.isExternal() : if hur_net.isExternal() :
if hur_net.getDirection() == DirectionIN : self._direct = "IN" if hur_net.getDirection() == Net.Direction.IN : self._direct = "IN"
elif hur_net.getDirection() == DirectionOUT : self._direct = "OUT" elif hur_net.getDirection() == Net.Direction.OUT : self._direct = "OUT"
elif hur_net.getDirection() == DirectionINOUT : self._direct = "INOUT" elif hur_net.getDirection() == Net.Direction.INOUT : self._direct = "INOUT"
elif hur_net.getDirection() == DirectionTRISTATE : self._direct = "TRISTATE" elif hur_net.getDirection() == Net.Direction.TRISTATE : self._direct = "TRISTATE"
elif hur_net.getDirection() == DirectionUNDEFINED : self._direct = "UNDEFINED" elif hur_net.getDirection() == Net.Direction.UNDEFINED : self._direct = "UNDEFINED"
if hur_net.getType() == TypePOWER : self._h_type = "POWER" if hur_net.getType() == Net.Type.POWER : self._h_type = "POWER"
elif hur_net.getType() == TypeGROUND : self._h_type = "GROUND" elif hur_net.getType() == Net.Type.GROUND : self._h_type = "GROUND"
elif hur_net.getType() == TypeCLOCK : self._h_type = "CLOCK" elif hur_net.getType() == Net.Type.CLOCK : self._h_type = "CLOCK"
self._hur_net = [hur_net] self._hur_net = [hur_net]

View File

@ -390,7 +390,7 @@ def placement ( st_inst, sym, x, y, plac = FIXED, cell = None, fonction = None )
raise Exception ( err ) raise Exception ( err )
# Error : if the instance is already placed # 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" err = "\n[Stratus ERROR] Placement : the instance " + st_inst._name + " is already placed.\n"
raise Exception ( err ) raise Exception ( err )
@ -409,45 +409,45 @@ def placement ( st_inst, sym, x, y, plac = FIXED, cell = None, fonction = None )
cell._insref = st_inst cell._insref = st_inst
##### Placement ##### ##### Placement #####
if st_inst._sym == OrientationID : if st_inst._sym == Transformation.Orientation.ID :
st_inst._x = x st_inst._x = x
st_inst._y = y st_inst._y = y
elif st_inst._sym == OrientationMX : elif st_inst._sym == Transformation.Orientation.MX :
abtemp = ab ( st_inst, cell ) abtemp = ab ( st_inst, cell )
st_inst._x = x + abtemp.getWidth () st_inst._x = x + abtemp.getWidth ()
st_inst._y = y st_inst._y = y
elif st_inst._sym == OrientationMY : elif st_inst._sym == Transformation.Orientation.MY :
abtemp = ab ( st_inst, cell ) abtemp = ab ( st_inst, cell )
st_inst._x = x st_inst._x = x
st_inst._y = y + abtemp.getHeight () st_inst._y = y + abtemp.getHeight ()
elif st_inst._sym == OrientationR2 : elif st_inst._sym == Transformation.Orientation.R2 :
abtemp = ab ( st_inst, cell ) abtemp = ab ( st_inst, cell )
st_inst._x = x + abtemp.getWidth () st_inst._x = x + abtemp.getWidth ()
st_inst._y = y + abtemp.getHeight () st_inst._y = y + abtemp.getHeight ()
elif st_inst._sym == OrientationR1 : elif st_inst._sym == Transformation.Orientation.R1 :
abtemp = ab ( st_inst, cell ) abtemp = ab ( st_inst, cell )
st_inst._x = x + abtemp.getHeight () st_inst._x = x + abtemp.getHeight ()
st_inst._y = y st_inst._y = y
elif st_inst._sym == OrientationR3 : elif st_inst._sym == Transformation.Orientation.R3 :
abtemp = ab ( st_inst, cell ) abtemp = ab ( st_inst, cell )
st_inst._x = x st_inst._x = x
st_inst._y = y + abtemp.getWidth () st_inst._y = y + abtemp.getWidth ()
elif st_inst._sym == OrientationYR : elif st_inst._sym == Transformation.Orientation.YR :
st_inst._x = x st_inst._x = x
st_inst._y = y st_inst._y = y
elif st_inst._sym == OrientationXR : elif st_inst._sym == Transformation.Orientation.XR :
abtemp = ab ( st_inst, cell ) abtemp = ab ( st_inst, cell )
st_inst._x = x + abtemp.getHeight () 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" ) raise Exception ( "\n[Stratus ERROR] Placement : wrong transformation.\n" )
# if the abutment box is not at 0 0 FIXME # 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() x = st_inst._x + hur_inst.getAbutmentBox().getXMin()
y = st_inst._y + hur_inst.getAbutmentBox().getYMin() y = st_inst._y + hur_inst.getAbutmentBox().getYMin()
else : else :
@ -470,12 +470,12 @@ def placement ( st_inst, sym, x, y, plac = FIXED, cell = None, fonction = None )
if plac == PLACED : if plac == PLACED :
cell._hur_cell.setAbutmentBox ( cell._hur_cell.getAbutmentBox ().merge ( hur_inst.getAbutmentBox () ) ) 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 : elif plac == FIXED :
cell._hur_cell.setAbutmentBox ( cell._hur_cell.getAbutmentBox ().merge ( hur_inst.getAbutmentBox () ) ) 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 : elif plac == UNPLACED :
hur_inst.setPlacementStatus ( PlacementStatusUNPLACED ) hur_inst.setPlacementStatus ( Instance.PlacementStatus.UNPLACED )
else : else :
raise Exception ( "\n[Stratus ERROR] Placement : wrong argument for type of placement.\n" ) 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 ## ## Two names for the symetry ##
def transformation ( symetry ) : def transformation ( symetry ) :
if symetry == NOSYM or symetry == OrientationID : transf = OrientationID if symetry == NOSYM or symetry == Transformation.Orientation.ID : transf = Transformation.Orientation.ID
elif symetry == SYM_X or symetry == OrientationMX : transf = OrientationMX elif symetry == SYM_X or symetry == Transformation.Orientation.MX : transf = Transformation.Orientation.MX
elif symetry == SYM_Y or symetry == OrientationMY : transf = OrientationMY elif symetry == SYM_Y or symetry == Transformation.Orientation.MY : transf = Transformation.Orientation.MY
elif symetry == SYMXY or symetry == OrientationR2 : transf = OrientationR2 elif symetry == SYMXY or symetry == Transformation.Orientation.R2 : transf = Transformation.Orientation.R2
elif symetry == ROT_P or symetry == OrientationR1 : transf = OrientationR1 elif symetry == ROT_P or symetry == Transformation.Orientation.R1 : transf = Transformation.Orientation.R1
elif symetry == ROT_M or symetry == OrientationR3 : transf = OrientationR3 elif symetry == ROT_M or symetry == Transformation.Orientation.R3 : transf = Transformation.Orientation.R3
elif symetry == SY_RP or symetry == OrientationYR : transf = OrientationYR elif symetry == SY_RP or symetry == Transformation.Orientation.YR : transf = Transformation.Orientation.YR
elif symetry == SY_RM or symetry == OrientationXR : transf = OrientationXR elif symetry == SY_RM or symetry == Transformation.Orientation.XR : transf = Transformation.Orientation.XR
else : else :
err = "\n[Stratus ERROR] Placement :Illegal transformation.\n" err = "\n[Stratus ERROR] Placement :Illegal transformation.\n"
raise Exception ( err ) raise Exception ( err )
@ -519,19 +519,19 @@ def width ( ins ) :
## Test of symetry ## ## Test of symetry ##
def vertical ( sym ) : 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 ) : 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 ) : 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 ) : 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 ) : 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 ) : 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