from helpers.io import ErrorMessage, WarningMessage
from helpers.overlay import UpdateSession
import plugins
-from Hurricane import Breakpoint, DbU, Transformation, Box, Instance
+from Hurricane import Breakpoint, DbU, Point, Box, Transformation, Instance, \
+ DataBase
+from plugins.alpha.macro.macro import Macro
from plugins.alpha.block.block import Block
from plugins.alpha.block.configuration import IoPin, GaugeConf
from plugins.alpha.core2chip.libresocio import CoreToChip
global af
rvalue = True
try:
- #helpers.setTraceLevel( 540 )
+ #helpers.setTraceLevel( 550 )
Breakpoint.setStopLevel( 100 )
buildChip = True
cell, editor = plugins.kwParseMain( **kw )
#memoryConf.cfg.chip.padCoreSide = 'North'
#memoryConf.cfg.chip.use45corners = False
memoryConf.cfg.chip.useAbstractPads = True
+ memoryConf.cfg.chip.supplyRailWidth = u(35)
+ memoryConf.cfg.chip.supplyRailPitch = u(90)
memoryConf.editor = editor
- memoryConf.useSpares = False
- memoryConf.useClockTree = False
+ memoryConf.useSpares = True
+ memoryConf.useClockTree = True
memoryConf.useHFNS = False
memoryConf.bColumns = 2
memoryConf.bRows = 3
memoryConf.chipSize = ( u(2000.0), u(2000.0) )
with UpdateSession():
- sliceHeight = memoryConf.sliceHeight
- coreAb = Box( 0, 0, u(988.0), u(988.0) )
+ coreAb = Box( 0, 0, u(988.0), u(988.0) )
cell.setAbutmentBox( coreAb )
- sramName = 'subckt_500_SPBlock_512W64B8W'
- sram = cell.getInstance( sramName )
- if not sram:
- print( '[ERROR] SRAM instance "{}" not found.'.format(sramName) )
- else:
- sramAb = sram.getMasterCell().getAbutmentBox()
- sram.setTransformation( Transformation( coreAb.getXMax() - sramAb.getWidth()
- , u(0.0)
- , Transformation.Orientation.ID ) )
- sram.setPlacementStatus( Instance.PlacementStatus.FIXED )
- sramAb = sram.getAbutmentBox()
- memoryConf.placeArea = Box( coreAb.getXMin()
- , coreAb.getYMax() - sliceHeight*10
- , coreAb.getXMax()
- , coreAb.getYMax()
- )
- Breakpoint.stop( 99, 'After core block placement.' )
if buildChip:
- arlet6502ToChip = CoreToChip( memoryConf )
- arlet6502ToChip.buildChip()
+ memoryToChip = CoreToChip( memoryConf )
+ memoryToChip.buildChip()
chipBuilder = Chip( memoryConf )
+ chipBuilder.doChipFloorplan()
+ with UpdateSession():
+ sramName = 'spblock_512w64b8w'
+ sram = DataBase.getDB().getCell( 'spblock_512w64b8w' )
+ if not sram:
+ print( '[ERROR] SRAM cell "{}" not found.'.format(sramName) )
+ else:
+ sliceHeight = memoryToChip.conf.sliceHeight
+ coreAb = cell.getAbutmentBox()
+ sramAb = sram.getAbutmentBox()
+ position = Transformation( coreAb.getXMax() - sramAb.getWidth() - 2*sliceHeight
+ , u(0.0)
+ , Transformation.Orientation.ID )
+ chipBuilder.placeMacro( 'spblock_512w64b8w', position )
+ memoryConf.placeArea = Box( coreAb.getXMin()
+ , coreAb.getYMax() - sliceHeight*26
+ , coreAb.getXMin() + sliceHeight*25
+ , coreAb.getYMax()
+ )
+ Breakpoint.stop( 99, 'After core block placement.' )
rvalue = chipBuilder.doPnR()
chipBuilder.save()
CRL.Gds.save( memoryConf.chip )