From 7caf8f0c0e8e60e9c9e6121a3a4efbbe250e0474 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Mon, 29 Mar 2021 20:53:40 +0200 Subject: [PATCH] Add a placeholder for the PLL in the doDesign.py for ls180. --- experiments9/tsmc_c018/doDesign.py | 51 +++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/experiments9/tsmc_c018/doDesign.py b/experiments9/tsmc_c018/doDesign.py index bb6cd27..dbd4dde 100644 --- a/experiments9/tsmc_c018/doDesign.py +++ b/experiments9/tsmc_c018/doDesign.py @@ -2,6 +2,7 @@ from __future__ import print_function import os +import re import json import sys import traceback @@ -12,7 +13,9 @@ from helpers import trace, l, u, n 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 @@ -113,15 +116,22 @@ def rsetAbutmentBox ( cell, ab ): 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' @@ -210,7 +220,7 @@ def scriptMain (**kw): 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 @@ -253,19 +263,38 @@ def scriptMain (**kw): 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\d+)__(?P[\d+])$' + # , r'^mem_1_(?P\d+)__(?P[\d+])$' + # , r'^mem_2_(?P\d+)__(?P[\d+])$' + # , r'^mem_3_(?P\d+)__(?P[\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() -- 2.30.2