From 0ce2dd279108a500e43ec4f316ee51a88d699a32 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Tue, 28 Aug 2018 11:03:44 -0700 Subject: [PATCH] Add supply_grid file --- compiler/router/supply_grid.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 compiler/router/supply_grid.py diff --git a/compiler/router/supply_grid.py b/compiler/router/supply_grid.py new file mode 100644 index 00000000..b9e1f81b --- /dev/null +++ b/compiler/router/supply_grid.py @@ -0,0 +1,27 @@ +import debug +from vector3d import vector3d +import grid + + +class supply_grid(grid.grid): + """ + A two layer routing map. Each cell can be blocked in the vertical + or horizontal layer. + """ + + def __init__(self): + """ Create a routing map of width x height cells and 2 in the z-axis. """ + grid.grid.__init__(self) + + # list of the vdd/gnd rail cells + self.vdd_rails = [] + self.gnd_rails = [] + + def reinit(self): + """ Reinitialize everything for a new route. """ + + # Reset all the cells in the map + for p in self.map.values(): + p.reset() + +