From: Luke Kenneth Casson Leighton Date: Fri, 30 Apr 2021 10:51:11 +0000 (+0000) Subject: add complete series of pins onto fake SRAM X-Git-Tag: LS180_RC3~72 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f97de0df2b50c8774e45862392b94748c336c5b;p=soclayout.git add complete series of pins onto fake SRAM --- diff --git a/experiments9/LibreSOCMem.py b/experiments9/LibreSOCMem.py index 8206506..eaf9fe2 100644 --- a/experiments9/LibreSOCMem.py +++ b/experiments9/LibreSOCMem.py @@ -22,7 +22,7 @@ def createRL(tech, net, layer, coords): Rectilinear.create(net, tech.getLayer(layer), coords) def _routing(): - return + return # all commented-out for now af = CRL.AllianceFramework.get() db = DataBase.getDB() tech = db.getTechnology() @@ -211,14 +211,11 @@ def _load(): cell = Cell.create(lib, 'real_sram') with UpdateSession(): cell.setAbutmentBox(Box( - u(0.0), u(0.0), u(16.0), u(40.0), + u(0.0), u(0.0), u(110.0), u(100.0), )) nets = { '*': Net.create(cell, '*'), 'clk': Net.create(cell, 'clk'), - 'i0': Net.create(cell, 'i0'), - 'i1': Net.create(cell, 'i1'), - 'q': Net.create(cell, 'q'), 'vdd': Net.create(cell, 'vdd'), 'vss': Net.create(cell, 'vss'), } @@ -231,6 +228,28 @@ def _load(): cname = "%s(%d)" % (name, i) nets[cname] = Net.create(cell, cname) + # create series of stepped pins + x = 0.135*20 + wid = 0.135 / 2 + step = wid*10 + for name, qty in (('a', 8), + ('d', 63), + ('q', 63), + ('we', 8), + ): + for i in range(qty): + cname = "%s(%d)" % (name, i) + net = nets[cname] + pin = Vertical.create( + net, tech.getLayer('metal1'), + u(x), u(wid), u(0), u(3.455), + ) + x += step + net.setExternal(True) + NetExternalComponents.setExternal(pin) + # separate the pin groups + x += step * 3 + net = nets['*'] createRL( tech, net, 'active', @@ -371,30 +390,6 @@ def _load(): tech, net, 'active', ((0.305,1.38),(0.495,1.38),(0.495,0.62),(0.1625,0.62),(0.1625,1.38),(0.305,1.38)), ) - net = nets['i0'] - createRL( - tech, net, 'poly', - ((0.425,1.385),(0.425,0.565),(0.375,0.565),(0.375,1.9625),(0.2025,1.9625),(0.2025,2.0375),(0.375,2.0375),(0.375,3.455),(0.425,3.455),(0.425,1.385)), - ) - createRL( - tech, net, 'metal1', - ((0.2325,1.9325),(0.2325,1.4125),(0.1675,1.4125),(0.1675,3.455),(0.2325,3.455),(0.2325,2.0675),(0.2725,2.0675),(0.2725,1.9325),(0.2325,1.9325)), - ) - if False: - Vertical.create( - net, tech.getLayer('metal1.pin'), - u(0.2), u(0.065), u(1.4125), u(3.455), - ) - pin = Vertical.create( - net, tech.getLayer('metal1'), - u(0.2), u(0.065), u(1.4125), u(3.455), - ) - net.setExternal(True) - NetExternalComponents.setExternal(pin) - createRL( - tech, net, 'contact', - ((0.2075,1.9675),(0.2725,1.9675),(0.2725,2.0325),(0.2075,2.0325),(0.2075,1.9675)), - ) net = nets['*'] createRL( tech, net, 'active', @@ -405,7 +400,7 @@ def _load(): tech, net, 'active', ((0.705,1.0),(1.0375,1.0),(1.0375,0.24),(0.555,0.24),(0.555,1.0),(0.705,1.0)), ) - net = nets['i1'] + net = nets['clk'] createRL( tech, net, 'poly', ((0.775,0.185),(0.775,1.2375),(0.9975,1.2375),(0.9975,1.1625),(0.825,1.1625),(0.825,0.185),(0.775,0.185)), @@ -421,11 +416,11 @@ def _load(): if False: Vertical.create( net, tech.getLayer('metal1.pin'), - u(1.0), u(0.065), u(0.545), u(3.455), + u(1.0), u(0.065), u(0), u(3.455), ) pin = Vertical.create( net, tech.getLayer('metal1'), - u(1.0), u(0.065), u(0.545), u(3.455), + u(1.0), u(0.065), u(0), u(3.455), ) net.setExternal(True) NetExternalComponents.setExternal(pin) @@ -442,78 +437,6 @@ def _load(): tech, net, 'active', ((0.775,2.6),(0.705,2.6),(0.705,3.4),(0.955,3.4),(0.955,3.7825),(1.045,3.7825),(1.045,2.6),(0.775,2.6)), ) - net = nets['q'] - createRL( - tech, net, 'metal1', - ((1.4325,2.185),(1.4325,0.545),(1.3675,0.545),(1.3675,3.455),(1.4325,3.455),(1.4325,2.185)), - ) - if False: - Vertical.create( - net, tech.getLayer('metal1.pin'), - u(1.4), u(0.065), u(0.545), u(3.455), - ) - pin = Vertical.create( - net, tech.getLayer('metal1'), - u(1.4), u(0.065), u(0.545), u(3.455), - ) - net.setExternal(True) - NetExternalComponents.setExternal(pin) - createRL( - tech, net, 'active', - ((1.3625,2.215),(1.4375,2.215),(1.4375,3.41),(1.3625,3.41),(1.3625,2.215)), - ) - createRL( - tech, net, 'active', - ((1.3625,0.61),(1.4375,0.61),(1.4375,0.965),(1.3625,0.965),(1.3625,0.61)), - ) - createRL( - tech, net, 'contact', - ((1.3675,2.22),(1.4325,2.22),(1.4325,2.285),(1.3675,2.285),(1.3675,2.22)), - ) - createRL( - tech, net, 'contact', - ((1.3675,2.36),(1.4325,2.36),(1.4325,2.425),(1.3675,2.425),(1.3675,2.36)), - ) - createRL( - tech, net, 'contact', - ((1.3675,2.5),(1.4325,2.5),(1.4325,2.565),(1.3675,2.565),(1.3675,2.5)), - ) - createRL( - tech, net, 'contact', - ((1.3675,2.64),(1.4325,2.64),(1.4325,2.705),(1.3675,2.705),(1.3675,2.64)), - ) - createRL( - tech, net, 'contact', - ((1.3675,2.78),(1.4325,2.78),(1.4325,2.845),(1.3675,2.845),(1.3675,2.78)), - ) - createRL( - tech, net, 'contact', - ((1.3675,2.92),(1.4325,2.92),(1.4325,2.985),(1.3675,2.985),(1.3675,2.92)), - ) - createRL( - tech, net, 'contact', - ((1.3675,3.06),(1.4325,3.06),(1.4325,3.125),(1.3675,3.125),(1.3675,3.06)), - ) - createRL( - tech, net, 'contact', - ((1.3675,3.2),(1.4325,3.2),(1.4325,3.265),(1.3675,3.265),(1.3675,3.2)), - ) - createRL( - tech, net, 'contact', - ((1.3675,3.34),(1.4325,3.34),(1.4325,3.405),(1.3675,3.405),(1.3675,3.34)), - ) - createRL( - tech, net, 'contact', - ((1.3675,0.615),(1.4325,0.615),(1.4325,0.68),(1.3675,0.68),(1.3675,0.615)), - ) - createRL( - tech, net, 'contact', - ((1.3675,0.755),(1.4325,0.755),(1.4325,0.82),(1.3675,0.82),(1.3675,0.755)), - ) - createRL( - tech, net, 'contact', - ((1.3675,0.895),(1.4325,0.895),(1.4325,0.96),(1.3675,0.96),(1.3675,0.895)), - ) af.wrapLibrary(lib, 0)