mirror of https://github.com/VLSIDA/OpenRAM.git
Rename test classes.
This commit is contained in:
parent
2350be8e39
commit
7cac1a0357
|
|
@ -118,13 +118,18 @@ class router:
|
||||||
for layer in self.layers:
|
for layer in self.layers:
|
||||||
self.write_obstacle(self.top_name)
|
self.write_obstacle(self.top_name)
|
||||||
|
|
||||||
def clear_pins(self):
|
def clear(self):
|
||||||
"""
|
"""
|
||||||
Reset the source and destination pins to start a new routing.
|
Reset the source and destination pins to start a new routing.
|
||||||
|
Convert the source/dest to blockages.
|
||||||
|
Keep the other blockages.
|
||||||
|
Clear other pins from blockages?
|
||||||
|
|
||||||
"""
|
"""
|
||||||
self.source = []
|
self.source = []
|
||||||
self.dest = []
|
self.dest = []
|
||||||
|
|
||||||
|
|
||||||
def route(self, layers, src, dest):
|
def route(self, layers, src, dest):
|
||||||
"""
|
"""
|
||||||
Route a single source-destination net and return
|
Route a single source-destination net and return
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import debug
|
||||||
import calibre
|
import calibre
|
||||||
|
|
||||||
|
|
||||||
class no_blockages_test(unittest.TestCase):
|
class blockages_test(unittest.TestCase):
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
globals.init_openram("config_{0}".format(OPTS.tech_name))
|
globals.init_openram("config_{0}".format(OPTS.tech_name))
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import debug
|
||||||
import calibre
|
import calibre
|
||||||
|
|
||||||
|
|
||||||
class no_blockages_test(unittest.TestCase):
|
class same_layer_pins_test(unittest.TestCase):
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
globals.init_openram("config_{0}".format(OPTS.tech_name))
|
globals.init_openram("config_{0}".format(OPTS.tech_name))
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import debug
|
||||||
import calibre
|
import calibre
|
||||||
|
|
||||||
|
|
||||||
class no_blockages_test(unittest.TestCase):
|
class diff_layer_pins_test(unittest.TestCase):
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
globals.init_openram("config_{0}".format(OPTS.tech_name))
|
globals.init_openram("config_{0}".format(OPTS.tech_name))
|
||||||
|
|
@ -49,21 +49,12 @@ class no_blockages_test(unittest.TestCase):
|
||||||
self.gdsname = "{0}/{1}.gds".format(os.path.dirname(os.path.realpath(__file__)),gdsname)
|
self.gdsname = "{0}/{1}.gds".format(os.path.dirname(os.path.realpath(__file__)),gdsname)
|
||||||
r=router.router(self.gdsname)
|
r=router.router(self.gdsname)
|
||||||
layer_stack =("metal1","via1","metal2")
|
layer_stack =("metal1","via1","metal2")
|
||||||
(src_rect,path,dest_rect)=r.route(layer_stack,src="A",dest="B")
|
r.route(layer_stack,src="A",dest="B")
|
||||||
self.add_rect(layer=layer_stack[0],
|
r.add_route(self)
|
||||||
offset=src_rect[0],
|
|
||||||
width=src_rect[1].x-src_rect[0].x,
|
|
||||||
height=src_rect[1].y-src_rect[0].y)
|
|
||||||
self.add_wire(layer_stack,path)
|
|
||||||
self.add_rect(layer=layer_stack[0],
|
|
||||||
offset=dest_rect[0],
|
|
||||||
width=dest_rect[1].x-dest_rect[0].x,
|
|
||||||
height=dest_rect[1].y-dest_rect[0].y)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
r = routing("test1", "04_diff_layer_pins_test")
|
||||||
r = routing("test1", "AB_diff_layer_pins")
|
|
||||||
self.local_check(r)
|
self.local_check(r)
|
||||||
|
|
||||||
# fails if there are any DRC errors on any cells
|
# fails if there are any DRC errors on any cells
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import debug
|
||||||
import calibre
|
import calibre
|
||||||
|
|
||||||
|
|
||||||
class no_blockages_test(unittest.TestCase):
|
class two_nets_test(unittest.TestCase):
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
globals.init_openram("config_{0}".format(OPTS.tech_name))
|
globals.init_openram("config_{0}".format(OPTS.tech_name))
|
||||||
|
|
@ -49,18 +49,14 @@ class no_blockages_test(unittest.TestCase):
|
||||||
self.gdsname = "{0}/{1}.gds".format(os.path.dirname(os.path.realpath(__file__)),gdsname)
|
self.gdsname = "{0}/{1}.gds".format(os.path.dirname(os.path.realpath(__file__)),gdsname)
|
||||||
r=router.router(self.gdsname)
|
r=router.router(self.gdsname)
|
||||||
layer_stack =("metal1","via1","metal2")
|
layer_stack =("metal1","via1","metal2")
|
||||||
path=r.route(layer_stack,src="A",dest="B")
|
r.route(layer_stack,src="A",dest="B")
|
||||||
self.add_wire(layer_stack,path)
|
r.add_route(self)
|
||||||
|
|
||||||
path=r.route(layer_stack,src="C",dest="D")
|
r.route(layer_stack,src="A",dest="B")
|
||||||
self.add_wire(layer_stack,path)
|
r.add_route(self)
|
||||||
|
|
||||||
r.rg.view()
|
|
||||||
|
|
||||||
|
|
||||||
|
r = routing("test1", "05_two_nets_test")
|
||||||
|
|
||||||
r = routing("test1", "ABCD_two_nets")
|
|
||||||
self.local_check(r)
|
self.local_check(r)
|
||||||
|
|
||||||
# fails if there are any DRC errors on any cells
|
# fails if there are any DRC errors on any cells
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue