name everything back to spblock_512w64b8w now that missing blackbox
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 28 Apr 2021 17:22:57 +0000 (17:22 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 28 Apr 2021 17:22:57 +0000 (17:22 +0000)
cell issue has been found

experiments9/coriolis2/settings.py
experiments9/freepdk_c4m45/coriolis2/settings.py
experiments9/non_generated/full_core_4_4ksram_libresoc.v
experiments9/non_generated/spblock512w64b8w.v [deleted file]
experiments9/non_generated/spblock512w64b8w.vbe [deleted file]
experiments9/non_generated/spblock_512w64b8w.v [new file with mode: 0644]
experiments9/non_generated/spblock_512w64b8w.vbe [new file with mode: 0644]
experiments9/tsmc_c018/coriolis2/settings.py

index 5c1ea662331aa1ed2a50a484ac21f7a9456fd229..b97952cc8de00f0694c691c70f643a08e7343b7c 100644 (file)
@@ -1,9 +1,12 @@
 # -*- Mode:Python -*-
 
 import Cfg
+from   Hurricane import DataBase, Cell, Instance, Net
+from   CRL     import AllianceFramework, RoutingLayerGauge
 import CRL
 import Viewer
 from   helpers.overlay import CfgCache
+from   helpers   import overlay, l, u, n
 import symbolic.cmos45  # do not remove
 import os
 
@@ -12,6 +15,46 @@ if os.environ.has_key('CELLS_TOP'):
 else:
     cellsTop = '../../../alliance-check-toolkit/cells'
 
+db = DataBase.getDB()
+af = AllianceFramework.get()
+
+
+def createSramBlackbox ():
+    global db, af
+    print( '  o  Creating SRAM blackboxes for "ls180" design.' )
+    rootlib  = db.getRootLibrary()
+    lib      = rootlib.getLibrary( 'LibreSOCMem' )
+    sramName = 'spblock_512w64b8w'
+    sram     = lib.getCell( sramName )
+    if not sram:
+        raise ErrorMessage( 1, 'settings.createSramBlocks(): '
+                                'SRAM Cell "{}" not found.' \
+                               .format(sramName) )
+    sram.setAbstractedSupply( True )
+    blackboxeNames = [ 'spblock_512w64b8w'
+                     ]
+    for blackboxName in blackboxeNames:
+        cell     = Cell.create( lib, blackboxName )
+        instance = Instance.create( cell, 'real_sram', sram )
+        state    = af.getCatalog().getState( blackboxName, True )
+        state.setCell( cell )
+        state.setLogical( True )
+        state.setInMemory( True )
+        print( '     - {}.'.format(cell) )
+        for masterNet in sram.getNets():
+            if not masterNet.isExternal():
+                continue
+            net = Net.create( cell, masterNet.getName() )
+            net.setDirection( masterNet.getDirection() )
+            net.setType( masterNet.getType() )
+            net.setExternal( True )
+            net.setGlobal( masterNet.isGlobal() )
+            if masterNet.isSupply():
+                continue
+            plug = instance.getPlug( masterNet )
+            plug.setNet( net )
+
+
 with CfgCache('', priority=Cfg.Parameter.Priority.UserFile) as cfg:
     cfg.misc.catchCore               = False
     cfg.misc.info                    = False
@@ -75,5 +118,12 @@ with CfgCache('', priority=Cfg.Parameter.Priority.UserFile) as cfg:
 
 Viewer.Graphics.setStyle('Alliance.Classic [black]')
 
+# XXX cannot run this in non-NDA'd mode because there is no
+# equivalent to NDA.node180.tsmc_c018.LibreSOCMem (or PLL)
+# TODO: create a fake one
+#with overlay.UpdateSession():
+#    createSramBlackbox()
+
 print( '  o  Successfully run "<>/coriolis2/settings.py".' )
 print( '     - CELLS_TOP = "{}"'.format(cellsTop) )
+
index 5a7e6c3b12d143e3026e7e86997a8c5749751e3e..5988d94da6dc477771e2559fd69b4973ac488ba6 100644 (file)
@@ -47,10 +47,7 @@ def createSramBlackbox ():
                                 'SRAM Cell "{}" not found.' \
                                .format(sramName) )
     sram.setAbstractedSupply( True )
-    blackboxeNames = [ 'spblock512w64b8w_0'
-                     , 'spblock512w64b8w_1'
-                     , 'spblock512w64b8w_2'
-                     , 'spblock512w64b8w_3'
+    blackboxeNames = [ 'spblock_512w64b8w'
                      ]
     for blackboxName in blackboxeNames:
         cell     = Cell.create( lib, blackboxName )
@@ -94,5 +91,8 @@ with overlay.CfgCache(priority=Cfg.Parameter.Priority.UserFile) as cfg:
     env = af.getEnvironment()
     env.setCLOCK( '^sys_clk$|^ck|^jtag_tck$' )
 
+# XXX cannot run this in non-NDA'd mode because there is no
+# NDA.node45.freepdk45_c4m.LibreSOCMem (or PLL)
+# TODO: create a fake one
 with overlay.UpdateSession():
     createSramBlackbox()
index 6f3af85e368b91c6338a2543a4cbd53289300099..d504dacb718747f10a5eef328afa01bb87d07d83 100644 (file)
@@ -193401,7 +193401,7 @@ module sram4k_0(rst, enable, sram4k_0_wb__cyc, sram4k_0_wb__stb, sram4k_0_wb__ac
   assign \$1  = sram4k_0_wb__cyc & (* src = "/home/lkcl/src/libresoc/soc/src/soc/bus/SPBlock512W64B8W.py:56" *) sram4k_0_wb__stb;
   always @(posedge clk)
     sram4k_0_wb__ack <= \sram4k_0_wb__ack$next ;
-  spblock_512w64b8w spblock512w64b8w_0 (
+  spblock_512w64b8w spblock_512w64b8w (
     .a(a),
     .clk(clk),
     .d(d),
@@ -193545,7 +193545,7 @@ module sram4k_1(rst, enable, sram4k_1_wb__cyc, sram4k_1_wb__stb, sram4k_1_wb__ac
   assign \$1  = sram4k_1_wb__cyc & (* src = "/home/lkcl/src/libresoc/soc/src/soc/bus/SPBlock512W64B8W.py:56" *) sram4k_1_wb__stb;
   always @(posedge clk)
     sram4k_1_wb__ack <= \sram4k_1_wb__ack$next ;
-   spblock_512w64b8w spblock512w64b8w_1 (
+   spblock_512w64b8w spblock_512w64b8w  (
     .a(a),
     .clk(clk),
     .d(d),
@@ -193689,7 +193689,7 @@ module sram4k_2(rst, enable, sram4k_2_wb__cyc, sram4k_2_wb__stb, sram4k_2_wb__ac
   assign \$1  = sram4k_2_wb__cyc & (* src = "/home/lkcl/src/libresoc/soc/src/soc/bus/SPBlock512W64B8W.py:56" *) sram4k_2_wb__stb;
   always @(posedge clk)
     sram4k_2_wb__ack <= \sram4k_2_wb__ack$next ;
-   spblock_512w64b8w spblock512w64b8w_2 (
+   spblock_512w64b8w spblock_512w64b8w (
     .a(a),
     .clk(clk),
     .d(d),
@@ -193833,7 +193833,7 @@ module sram4k_3(rst, enable, sram4k_3_wb__cyc, sram4k_3_wb__stb, sram4k_3_wb__ac
   assign \$1  = sram4k_3_wb__cyc & (* src = "/home/lkcl/src/libresoc/soc/src/soc/bus/SPBlock512W64B8W.py:56" *) sram4k_3_wb__stb;
   always @(posedge clk)
     sram4k_3_wb__ack <= \sram4k_3_wb__ack$next ;
-   spblock_512w64b8w spblock512w64b8w_3 (
+   spblock_512w64b8w spblock_512w64b8w (
     .a(a),
     .clk(clk),
     .d(d),
diff --git a/experiments9/non_generated/spblock512w64b8w.v b/experiments9/non_generated/spblock512w64b8w.v
deleted file mode 100644 (file)
index 4555b15..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<* blackbox = 1 *)
-module spblock_512w64b8w(a, d, q, we, clk);
-       input [8:0] a;
-       input [63:0] d;
-       output [63:0] q;
-       input [7:0] we;
-       input clk;
-endmodule // SPBlock_512W64B8W
-
diff --git a/experiments9/non_generated/spblock512w64b8w.vbe b/experiments9/non_generated/spblock512w64b8w.vbe
deleted file mode 100644 (file)
index de2d3df..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
--- Phony VHDL interface for SRAM block.
-
-entity spblock512w64b8w is
-   port ( clk     : in  bit
-        ; we      : in  bit_vector( 7 downto 0)
-        ; a       : in  bit_vector( 8 downto 0)
-        ; d       : in  bit_vector(63 downto 0)
-        ; q       : out bit_vector(63 downto 0)
-        ; vdd     : in  bit
-        ; vss     : in  bit
-        );
-end spblock512w64b8w;
-
-architecture behavioral of spblock512w64b8w is
-
-begin
-
-end behavioral;
diff --git a/experiments9/non_generated/spblock_512w64b8w.v b/experiments9/non_generated/spblock_512w64b8w.v
new file mode 100644 (file)
index 0000000..4555b15
--- /dev/null
@@ -0,0 +1,9 @@
+<* blackbox = 1 *)
+module spblock_512w64b8w(a, d, q, we, clk);
+       input [8:0] a;
+       input [63:0] d;
+       output [63:0] q;
+       input [7:0] we;
+       input clk;
+endmodule // SPBlock_512W64B8W
+
diff --git a/experiments9/non_generated/spblock_512w64b8w.vbe b/experiments9/non_generated/spblock_512w64b8w.vbe
new file mode 100644 (file)
index 0000000..999c8da
--- /dev/null
@@ -0,0 +1,18 @@
+-- Phony VHDL interface for SRAM block.
+
+entity spblock_512w64b8w is
+   port ( clk     : in  bit
+        ; we      : in  bit_vector( 7 downto 0)
+        ; a       : in  bit_vector( 8 downto 0)
+        ; d       : in  bit_vector(63 downto 0)
+        ; q       : out bit_vector(63 downto 0)
+        ; vdd     : in  bit
+        ; vss     : in  bit
+        );
+end spblock_512w64b8w;
+
+architecture behavioral of spblock_512w64b8w is
+
+begin
+
+end behavioral;
index cd266380f3786fcb1481f05a7e3aa73e1e33d1c9..80211c385ded0c201499ae5948ff1dbfccb361d2 100644 (file)
@@ -46,10 +46,7 @@ def createSramBlackbox ():
         raise ErrorMessage( 1, 'settings.createSramBlocks(): SRAM Cell "{}" not found.' \
                                .format(sramName) )
     sram.setAbstractedSupply( True )
-    blackboxeNames = [ 'spblock512w64b8w_0'
-                     , 'spblock512w64b8w_1'
-                     , 'spblock512w64b8w_2'
-                     , 'spblock512w64b8w_3'
+    blackboxeNames = [ 'spblock_512w64b8w' # go back to only one blackbox
                      ]
     for blackboxName in blackboxeNames:
         cell     = Cell.create( lib, blackboxName )