from __future__ import print_function
import os
+import re
import json
import sys
import traceback
from helpers.io import ErrorMessage, WarningMessage
from helpers.overlay import UpdateSession
import plugins
-from Hurricane import Breakpoint, DataBase, DbU, Transformation, Box, Instance
+from Hurricane import Breakpoint, DataBase, DbU, Transformation, Point, Box, \
+ Cell, Instance
+from plugins.alpha.block.matrix import RegisterMatrix
from plugins.alpha.macro.macro import Macro
from plugins.alpha.block.iospecs import IoSpecs
from plugins.alpha.block.block import Block
masterCell = occurrence.getEntity().getMasterCell()
masterCell.setAbutmentBox( ab )
+def addPllPlaceHolder ( cell ):
+ pllPlaceHolder = Cell.create( af.getLibrary(0), 'pllplaceholder' )
+ pllPlaceHolder.setAbutmentBox( Box( u(0.0), u(0.0), u(200.0), u(200.0) ))
+ pllPlaceHolder.setTerminalNetlist( True )
+ instance = Instance.create( cell, 'pllPlaceholder', pllPlaceHolder )
+ return instance
+
def scriptMain (**kw):
"""The mandatory function to be called by Coriolis CGT/Unicorn."""
global af
#helpers.setTraceLevel( 550 )
- #Breakpoint.setStopLevel( 99 )
+ #Breakpoint.setStopLevel( 100 )
rvalue = True
#coreSize = u(37*90.0)
- coreSize = u(61*90.0)
+ coreSize = u(59*90.0)
chipBorder = u(2*214.0 + 10*13.0)
ioSpecs = IoSpecs()
#pinmuxFile = './non_generated/litex_pinpads.json'
ls180Conf.cfg.katana.vTracksReservedLocal = 3
ls180Conf.cfg.katana.hTracksReservedMin = 3
ls180Conf.cfg.katana.vTracksReservedMin = 1
- ls180Conf.cfg.block.spareSide = u(9*13)
+ ls180Conf.cfg.block.spareSide = u(7*13)
ls180Conf.cfg.chip.supplyRailWidth = u(35)
ls180Conf.cfg.chip.supplyRailPitch = u(90)
ls180Conf.editor = editor
sramAb = sram.getAbutmentBox()
coreAb = cell.getAbutmentBox()
sliceHeight = chipBuilder.conf.sliceHeight
+ originX = coreAb.getXMin() + 2*chipBuilder.conf.sliceStep
for i in range(4):
sram = rgetInstance( cell, sramPaths[i] )
chipBuilder.placeMacro \
( sramPaths[i]
- , Transformation( coreAb.getXMin() + (sramAb.getWidth () + 2*sliceHeight)*i
- , coreAb.getYMax() - sramAb.getHeight() - 2*sliceHeight
+ , Transformation( originX
+ , coreAb.getYMax() - sramAb.getHeight() - 2*sliceHeight
, Transformation.Orientation.ID )
)
- ls180Conf.placeArea = Box( coreAb.getXMin()
- , coreAb.getYMin()
- , coreAb.getXMax() - chipBuilder.conf.sliceStep
- , coreAb.getYMax() - sramAb.getHeight() - 2*sliceHeight
- )
+ originX += sramAb.getWidth () + 3*sliceHeight
+ pll = addPllPlaceHolder( cell )
+ pllAb = pll.getAbutmentBox()
+ pll.setTransformation( Transformation( coreAb.getXMax() - pllAb.getWidth()
+ , coreAb.getYMax() - pllAb.getHeight()
+ , Transformation.Orientation.ID ) )
+ pll.setPlacementStatus( Instance.PlacementStatus.FIXED )
+ #ls180Conf.placeArea = Box( coreAb.getXMin()
+ # , coreAb.getYMin()
+ # , coreAb.getXMax() - chipBuilder.conf.sliceStep
+ # , coreAb.getYMax() - sramAb.getHeight() - 2*sliceHeight
+ # )
+ #memPatterns = [ r'^mem_(?P<i>\d+)__(?P<j>[\d+])$'
+ # , r'^mem_1_(?P<i>\d+)__(?P<j>[\d+])$'
+ # , r'^mem_2_(?P<i>\d+)__(?P<j>[\d+])$'
+ # , r'^mem_3_(?P<i>\d+)__(?P<j>[\d+])$'
+ # ]
+ #originX += 2*sliceHeight
+ #originY = coreAb.getYMax()
+ #for i in range(len(memPatterns)):
+ # mem = RegisterMatrix( ls180Conf, cell, memPatterns[i] )
+ # originY -= mem.getHeight()
+ # mem.place( Point(originX,originY) )
Breakpoint.stop( 99, 'After core placement.' )
rvalue = chipBuilder.doPnR()