From 1c6de4591dc4e9078b22721aba58ee62087f4186 Mon Sep 17 00:00:00 2001 From: mrg Date: Tue, 23 Feb 2021 13:32:00 -0800 Subject: [PATCH 01/26] Remove vertical power pin vias. --- compiler/modules/sense_amp_array.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/modules/sense_amp_array.py b/compiler/modules/sense_amp_array.py index c26347c6..01b74c84 100644 --- a/compiler/modules/sense_amp_array.py +++ b/compiler/modules/sense_amp_array.py @@ -146,10 +146,10 @@ class sense_amp_array(design.design): inst = self.local_insts[i] for gnd_pin in inst.get_pins("gnd"): - self.copy_power_pin(gnd_pin, directions=("V", "V")) + self.copy_power_pin(gnd_pin) for vdd_pin in inst.get_pins("vdd"): - self.copy_power_pin(vdd_pin, directions=("V", "V")) + self.copy_power_pin(vdd_pin) bl_pin = inst.get_pin(inst.mod.get_bl_names()) br_pin = inst.get_pin(inst.mod.get_br_names()) From 549112fcf88fc3e925a3241dff209d50b5be4c15 Mon Sep 17 00:00:00 2001 From: mrg Date: Tue, 23 Feb 2021 13:32:13 -0800 Subject: [PATCH 02/26] PEP8 cleanup --- compiler/router/direction.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/compiler/router/direction.py b/compiler/router/direction.py index 8237f679..c13abdd3 100644 --- a/compiler/router/direction.py +++ b/compiler/router/direction.py @@ -7,6 +7,8 @@ # from enum import Enum from vector3d import vector3d +import debug + class direction(Enum): NORTH = 1 @@ -20,31 +22,30 @@ class direction(Enum): SOUTHEAST = 9 SOUTHWEST = 10 - def get_offset(direct): """ Returns the vector offset for a given direction. """ if direct==direction.NORTH: - offset = vector3d(0,1,0) + offset = vector3d(0, 1, 0) elif direct==direction.SOUTH: - offset = vector3d(0,-1,0) + offset = vector3d(0, -1 ,0) elif direct==direction.EAST: - offset = vector3d(1,0,0) + offset = vector3d(1, 0, 0) elif direct==direction.WEST: - offset = vector3d(-1,0,0) + offset = vector3d(-1, 0, 0) elif direct==direction.UP: - offset = vector3d(0,0,1) + offset = vector3d(0, 0, 1) elif direct==direction.DOWN: - offset = vector3d(0,0,-1) + offset = vector3d(0, 0, -1) elif direct==direction.NORTHEAST: - offset = vector3d(1,1,0) + offset = vector3d(1, 1, 0) elif direct==direction.NORTHWEST: - offset = vector3d(-1,1,0) + offset = vector3d(-1, 1, 0) elif direct==direction.SOUTHEAST: - offset = vector3d(1,-1,0) + offset = vector3d(1, -1, 0) elif direct==direction.SOUTHWEST: - offset = vector3d(-1,-1,0) + offset = vector3d(-1, -1, 0) else: debug.error("Invalid direction {}".format(direct)) @@ -67,8 +68,8 @@ class direction(Enum): return [direction.get_offset(d) for d in direction.all_directions()] def all_neighbors(cell): - return [cell+x for x in direction.all_offsets()] + return [cell + x for x in direction.all_offsets()] def cardinal_neighbors(cell): - return [cell+x for x in direction.cardinal_offsets()] + return [cell + x for x in direction.cardinal_offsets()] From 013836bb3d66e5857feb281ffe53978ef34f3629 Mon Sep 17 00:00:00 2001 From: mrg Date: Tue, 23 Feb 2021 13:33:14 -0800 Subject: [PATCH 03/26] PEP8 cleanup --- compiler/router/supply_tree_router.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/compiler/router/supply_tree_router.py b/compiler/router/supply_tree_router.py index ff65b4f9..0b29119d 100644 --- a/compiler/router/supply_tree_router.py +++ b/compiler/router/supply_tree_router.py @@ -37,12 +37,12 @@ class supply_tree_router(router): """ Route the two nets in a single layer) """ - debug.info(1,"Running supply router on {0} and {1}...".format(vdd_name, gnd_name)) + debug.info(1, "Running supply router on {0} and {1}...".format(vdd_name, gnd_name)) self.vdd_name = vdd_name self.gnd_name = gnd_name # Clear the pins if we have previously routed - if (hasattr(self,'rg')): + if (hasattr(self, 'rg')): self.clear_pins() else: # Creat a routing grid over the entire area @@ -53,14 +53,14 @@ class supply_tree_router(router): # Get the pin shapes start_time = datetime.now() self.find_pins_and_blockages([self.vdd_name, self.gnd_name]) - print_time("Finding pins and blockages",datetime.now(), start_time, 3) + print_time("Finding pins and blockages", datetime.now(), start_time, 3) # Route the supply pins to the supply rails # Route vdd first since we want it to be shorter start_time = datetime.now() self.route_pins(vdd_name) self.route_pins(gnd_name) - print_time("Maze routing supplies",datetime.now(), start_time, 3) + print_time("Maze routing supplies", datetime.now(), start_time, 3) # self.write_debug_gds("final_tree_router.gds",False) @@ -79,11 +79,11 @@ class supply_tree_router(router): """ remaining_components = sum(not x.is_routed() for x in self.pin_groups[pin_name]) - debug.info(1,"Routing {0} with {1} pin components to connect.".format(pin_name, - remaining_components)) + debug.info(1, "Routing {0} with {1} pin components to connect.".format(pin_name, + remaining_components)) # Create full graph - debug.info(2,"Creating adjacency matrix") + debug.info(2, "Creating adjacency matrix") pin_size = len(self.pin_groups[pin_name]) adj_matrix = [[0] * pin_size for i in range(pin_size)] @@ -95,7 +95,7 @@ class supply_tree_router(router): adj_matrix[index1][index2] = dist # Find MST - debug.info(2,"Finding MinimumSpanning Tree") + debug.info(2, "Finding MinimumSpanning Tree") X = csr_matrix(adj_matrix) Tcsr = minimum_spanning_tree(X) mst = Tcsr.toarray().astype(int) @@ -144,6 +144,7 @@ class supply_tree_router(router): self.add_pin_component_source(pin_name, src_idx) # Marks all pin components except index as target + # which unmarks it as a blockage too self.add_pin_component_target(pin_name, dest_idx) # Actually run the A* router From 2a9b5db6d47c11e4205479e56c431978f7f327a0 Mon Sep 17 00:00:00 2001 From: mrg Date: Fri, 26 Feb 2021 11:14:08 -0800 Subject: [PATCH 04/26] Rewrite enclose grids to be cleaner --- compiler/router/pin_group.py | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/compiler/router/pin_group.py b/compiler/router/pin_group.py index 01a8b074..5f9da465 100644 --- a/compiler/router/pin_group.py +++ b/compiler/router/pin_group.py @@ -34,7 +34,6 @@ class pin_group: # Remove any redundant pins (i.e. contained in other pins) self.remove_redundant_pins() - self.router = router # These are the corresponding pin grids for each pin group. self.grids = set() @@ -101,13 +100,11 @@ class pin_group: if local_debug: debug.info(0, "INITIAL: {}".format(pin_list)) - new_pin_list = pin_list.copy() - - remove_indices = set() + add_indices = set(range(len(pin_list))) # This is n^2, but the number is small for index1, pin1 in enumerate(pin_list): # If we remove this pin, it can't contain other pins - if index1 in remove_indices: + if index1 not in add_indices: continue for index2, pin2 in enumerate(pin_list): @@ -117,17 +114,15 @@ class pin_group: if index1 == index2: continue # If we already removed it, can't remove it again... - if index2 in remove_indices: + if index2 not in add_indices: continue if pin1.contains(pin2): if local_debug: debug.info(0, "{0} contains {1}".format(pin1, pin2)) - remove_indices.add(index2) + add_indices.remove(index2) - # Remove them in decreasing order to not invalidate the indices - for i in sorted(remove_indices, reverse=True): - del new_pin_list[i] + new_pin_list = [pin_list[x] for x in add_indices] if local_debug: debug.info(0, "FINAL : {}".format(new_pin_list)) @@ -423,13 +418,15 @@ class pin_group: # We may have started with an empty set debug.check(len(self.grids) > 0, "Cannot seed an grid empty set.") + common_blockages = self.router.get_blocked_grids() & self.grids + # Start with the ll and make the widest row row = [ll] # Move in dir1 while we can while True: next_cell = row[-1] + offset1 # Can't move if not in the pin shape - if next_cell in self.grids and next_cell not in self.router.get_blocked_grids(): + if next_cell in self.grids and next_cell not in common_blockages: row.append(next_cell) else: break @@ -438,7 +435,7 @@ class pin_group: next_row = [x + offset2 for x in row] for cell in next_row: # Can't move if any cell is not in the pin shape - if cell not in self.grids or cell in self.router.get_blocked_grids(): + if cell not in self.grids or cell in common_blockages: break else: row = next_row @@ -619,6 +616,11 @@ class pin_group: # Set of track adjacent to or paritally overlap a pin (not full DRC connection) partial_set = set() + # for pin in self.pins: + # lx = pin.lx() + # ly = pin.by() + # if lx > 87.9 and lx < 87.99 and ly > 18.56 and ly < 18.6: + # breakpoint() for pin in self.pins: debug.info(4, " Converting {0}".format(pin)) # Determine which tracks the pin overlaps @@ -632,7 +634,8 @@ class pin_group: blockage_in_tracks = self.router.convert_blockage(pin) # Must include the pins here too because these are computed in a different # way than blockages. - self.blockages.update(sufficient | insufficient | blockage_in_tracks) + blockages = sufficient | insufficient | blockage_in_tracks + self.blockages.update(blockages) # If we have a blockage, we must remove the grids # Remember, this excludes the pin blockages already From 9f0ab0d081f6a9904dfe591be5831d8084195cc4 Mon Sep 17 00:00:00 2001 From: mrg Date: Fri, 26 Feb 2021 11:14:39 -0800 Subject: [PATCH 05/26] Route perimeter signals before power grid --- compiler/sram/sram_1bank.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/sram/sram_1bank.py b/compiler/sram/sram_1bank.py index be3e16e8..d831c047 100644 --- a/compiler/sram/sram_1bank.py +++ b/compiler/sram/sram_1bank.py @@ -325,13 +325,13 @@ class sram_1bank(sram_base): # they might create some blockages self.add_layout_pins() - # Route the supplies first since the MST is not blockage aware - # and signals can route to anywhere on sides (it is flexible) - self.route_supplies() - # Route the pins to the perimeter if OPTS.perimeter_pins: self.route_escape_pins() + + # Route the supplies first since the MST is not blockage aware + # and signals can route to anywhere on sides (it is flexible) + self.route_supplies() def route_dffs(self, add_routes=True): From 0c2ed487d9dcc4abb7e7331b8d86476a83c5ca29 Mon Sep 17 00:00:00 2001 From: mrg Date: Fri, 26 Feb 2021 11:16:19 -0800 Subject: [PATCH 06/26] Redundant check if pin contains another --- compiler/router/router.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/compiler/router/router.py b/compiler/router/router.py index cd20d858..8da1d265 100644 --- a/compiler/router/router.py +++ b/compiler/router/router.py @@ -504,14 +504,21 @@ class router(router_tech): ll = vector(boundary[0], boundary[1]) ur = vector(boundary[2], boundary[3]) rect = [ll, ur] - new_pin = pin_layout("blockage{}".format(len(self.blockages)), - rect, - lpp) + new_shape = pin_layout("blockage{}".format(len(self.blockages)), + rect, + lpp) + # If there is a rectangle that is the same in the pins, # it isn't a blockage! - if new_pin not in self.all_pins: - self.blockages.append(new_pin) + if new_shape not in self.all_pins and not self.pin_contains(new_shape): + self.blockages.append(new_shape) + def pin_contains(self, shape): + for pin in self.all_pins: + if pin.contains(shape): + return True + return False + def convert_point_to_units(self, p): """ Convert a path set of tracks to center line path. From dc3c293575eab2a782ccc8f4430f19f024aa314c Mon Sep 17 00:00:00 2001 From: mrg Date: Fri, 26 Feb 2021 16:17:45 -0800 Subject: [PATCH 07/26] Add temp workspace path --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a7cd73b..9a09f511 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,14 +11,14 @@ jobs: . /home/github-runner/setup-paths.sh export OPENRAM_HOME="`pwd`/compiler" export OPENRAM_TECH="`pwd`/technology:/software/PDKs/skywater-tech" - export OPENRAM_TMP="`pwd`/scn4me_subm" - python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 48 -t scn4m_subm + export OPENRAM_TMP="${{ github.workspace }}/scn4me_subm" + python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 20 -t scn4m_subm - name: Archive if: ${{ failure() }} uses: actions/upload-artifact@v2 with: name: scn4me_subm Archives - path: $OPENRAM_TMP/ + path: ${{ github.workspace }}/scn4me_subm/ freepdk45: runs-on: self-hosted steps: @@ -29,14 +29,14 @@ jobs: . /home/github-runner/setup-paths.sh export OPENRAM_HOME="`pwd`/compiler" export OPENRAM_TECH="`pwd`/technology:/software/PDKs/skywater-tech" - export OPENRAM_TMP="`pwd`/freepdk45" - python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 48 -t freepdk45 + export OPENRAM_TMP="${{ github.workspace }}/freepdk45" + python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 20 -t freepdk45 - name: Archive if: ${{ failure() }} uses: actions/upload-artifact@v2 with: name: FreePDK45 Archives - path: $OPENRAM_TMP/ + path: ${{ github.workspace }}/freepdk45/ coverage: if: ${{ always() }} needs: [scn4me_subm, freepdk45] From a57a443a4c95502fc0e73c8a2eb6f98c18065bbc Mon Sep 17 00:00:00 2001 From: mrg Date: Fri, 26 Feb 2021 16:31:41 -0800 Subject: [PATCH 08/26] Change coverage report location --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a09f511..6d55448b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,10 +46,10 @@ jobs: run: | python3-coverage combine python3-coverage report - python3-coverage html -d coverage_html + python3-coverage html -d ${{ github.workspace }}/coverage_html - name: Archive coverage uses: actions/upload-artifact@v2 with: name: code-coverage-report - path: coverage_html/ + path: ${{ github.workspace }}/coverage_html/ From ef78ad7249613b51612586d55a29740102272178 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 10:12:37 -0800 Subject: [PATCH 09/26] Upload workflow --- .github/workflows/ci.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d55448b..fb6d96e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,15 @@ name: ci on: [push] + coverage_cleanup: + if: ${{ always() }} + runs-on: self-hosted + steps: + - name: Coverage cleanup + run: | + python3-coverage erase jobs: scn4me_subm: + needs: [coverage_cleaup] runs-on: self-hosted steps: - name: Check out repository @@ -12,14 +20,16 @@ jobs: export OPENRAM_HOME="`pwd`/compiler" export OPENRAM_TECH="`pwd`/technology:/software/PDKs/skywater-tech" export OPENRAM_TMP="${{ github.workspace }}/scn4me_subm" + rm -rf $OPENRAM_TMP python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 20 -t scn4m_subm - name: Archive if: ${{ failure() }} uses: actions/upload-artifact@v2 with: name: scn4me_subm Archives - path: ${{ github.workspace }}/scn4me_subm/ + path: ${{ github.workspace }}/scn4me_subm/*/ freepdk45: + needs: [coverage_cleaup] runs-on: self-hosted steps: - name: Check out repository @@ -30,14 +40,15 @@ jobs: export OPENRAM_HOME="`pwd`/compiler" export OPENRAM_TECH="`pwd`/technology:/software/PDKs/skywater-tech" export OPENRAM_TMP="${{ github.workspace }}/freepdk45" + rm -rf $OPENRAM_TMP python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 20 -t freepdk45 - name: Archive if: ${{ failure() }} uses: actions/upload-artifact@v2 with: name: FreePDK45 Archives - path: ${{ github.workspace }}/freepdk45/ - coverage: + path: ${{ github.workspace }}/freepdk45/*/ + coverage_stats: if: ${{ always() }} needs: [scn4me_subm, freepdk45] runs-on: self-hosted @@ -52,4 +63,7 @@ jobs: with: name: code-coverage-report path: ${{ github.workspace }}/coverage_html/ + - name: Cleanup + run: | + python3-coverage erase From ab0b9ca37bae70d5c01f3a58f22d476f03074bd2 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 10:15:33 -0800 Subject: [PATCH 10/26] Fix syntax error in workflow --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb6d96e1..48778ce8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,6 @@ name: ci on: [push] +jobs: coverage_cleanup: if: ${{ always() }} runs-on: self-hosted @@ -7,7 +8,6 @@ on: [push] - name: Coverage cleanup run: | python3-coverage erase -jobs: scn4me_subm: needs: [coverage_cleaup] runs-on: self-hosted From 59915962a05f5b3ac6de080961eea671104e7d45 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 10:19:36 -0800 Subject: [PATCH 11/26] Update workflow syntax --- .github/workflows/ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48778ce8..2cd6b6fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,11 +2,12 @@ name: ci on: [push] jobs: coverage_cleanup: - if: ${{ always() }} runs-on: self-hosted steps: - name: Coverage cleanup run: | + echo "Cleaning up previous run" + rm -rf "${{ github.workspace }}" python3-coverage erase scn4me_subm: needs: [coverage_cleaup] @@ -20,8 +21,7 @@ jobs: export OPENRAM_HOME="`pwd`/compiler" export OPENRAM_TECH="`pwd`/technology:/software/PDKs/skywater-tech" export OPENRAM_TMP="${{ github.workspace }}/scn4me_subm" - rm -rf $OPENRAM_TMP - python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 20 -t scn4m_subm + python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 16 -t scn4m_subm - name: Archive if: ${{ failure() }} uses: actions/upload-artifact@v2 @@ -40,8 +40,7 @@ jobs: export OPENRAM_HOME="`pwd`/compiler" export OPENRAM_TECH="`pwd`/technology:/software/PDKs/skywater-tech" export OPENRAM_TMP="${{ github.workspace }}/freepdk45" - rm -rf $OPENRAM_TMP - python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 20 -t freepdk45 + python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 16 -t freepdk45 - name: Archive if: ${{ failure() }} uses: actions/upload-artifact@v2 From 26eed77de0d86a017257426f651f65b6aebf8904 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 10:20:48 -0800 Subject: [PATCH 12/26] Update workflow syntax --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2cd6b6fe..b9447b17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: name: scn4me_subm Archives path: ${{ github.workspace }}/scn4me_subm/*/ freepdk45: - needs: [coverage_cleaup] + needs: [coverage_cleanup] runs-on: self-hosted steps: - name: Check out repository From ec783f58b89d7001461fc6cee3315e8756dbe337 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 10:22:30 -0800 Subject: [PATCH 13/26] Update workflow syntax --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9447b17..87313c28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: rm -rf "${{ github.workspace }}" python3-coverage erase scn4me_subm: - needs: [coverage_cleaup] + needs: [coverage_cleanup] runs-on: self-hosted steps: - name: Check out repository From 0556b931a9f30ed075c6a79cf1293d98a9f84702 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 10:27:56 -0800 Subject: [PATCH 14/26] Update workflow syntax --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87313c28..95a0abbb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,8 +7,11 @@ jobs: - name: Coverage cleanup run: | echo "Cleaning up previous run" + echo ${{ github.workspace }} + ls ${{ github.workspace }} + echo ${{ github.home }} + ls ${{ github.home }} rm -rf "${{ github.workspace }}" - python3-coverage erase scn4me_subm: needs: [coverage_cleanup] runs-on: self-hosted From 7355fc91f82a4e95eb3ddd14e81d287ac478b4ae Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 10:28:47 -0800 Subject: [PATCH 15/26] Update workflow syntax --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95a0abbb..06c093ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,10 +7,10 @@ jobs: - name: Coverage cleanup run: | echo "Cleaning up previous run" - echo ${{ github.workspace }} - ls ${{ github.workspace }} - echo ${{ github.home }} - ls ${{ github.home }} + echo "${{ github.workspace }}" + ls "${{ github.workspace }}" + echo "${{ github.home }}" + ls "${{ github.home }}" rm -rf "${{ github.workspace }}" scn4me_subm: needs: [coverage_cleanup] From f7d66b7d2c68aabccf2c6fc786f3b602172ed1ac Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 10:31:32 -0800 Subject: [PATCH 16/26] Update workflow syntax --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06c093ea..3aab9322 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,10 +7,8 @@ jobs: - name: Coverage cleanup run: | echo "Cleaning up previous run" - echo "${{ github.workspace }}" - ls "${{ github.workspace }}" - echo "${{ github.home }}" - ls "${{ github.home }}" + echo "github.workspace = ${{ github.workspace }}" + echo "GITHUB_WORKSPACE = $GITHUB_WORKSPACE" rm -rf "${{ github.workspace }}" scn4me_subm: needs: [coverage_cleanup] From 0ba1ceff6a93492820124681a6bafbc093546834 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 10:33:57 -0800 Subject: [PATCH 17/26] Separate checkout step --- .github/workflows/ci.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3aab9322..54a0215a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,12 +10,15 @@ jobs: echo "github.workspace = ${{ github.workspace }}" echo "GITHUB_WORKSPACE = $GITHUB_WORKSPACE" rm -rf "${{ github.workspace }}" - scn4me_subm: + checkout_code: needs: [coverage_cleanup] + runs-on: self-hosted + - name: Checkout code + uses: actions/checkout@v1 + scn4me_subm: + needs: [checkout_code] runs-on: self-hosted steps: - - name: Check out repository - uses: actions/checkout@v1 - name: SCMOS test run: | . /home/github-runner/setup-paths.sh @@ -30,11 +33,9 @@ jobs: name: scn4me_subm Archives path: ${{ github.workspace }}/scn4me_subm/*/ freepdk45: - needs: [coverage_cleanup] + needs: [checkout_code] runs-on: self-hosted steps: - - name: Check out repository - uses: actions/checkout@v1 - name: FreePDK45 test run: | . /home/github-runner/setup-paths.sh @@ -63,7 +64,4 @@ jobs: with: name: code-coverage-report path: ${{ github.workspace }}/coverage_html/ - - name: Cleanup - run: | - python3-coverage erase From c6baef1c59b3ec73453b45e807deee156a411594 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 10:34:46 -0800 Subject: [PATCH 18/26] Remove tabs --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54a0215a..879f3984 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,8 +7,8 @@ jobs: - name: Coverage cleanup run: | echo "Cleaning up previous run" - echo "github.workspace = ${{ github.workspace }}" - echo "GITHUB_WORKSPACE = $GITHUB_WORKSPACE" + echo "github.workspace = ${{ github.workspace }}" + echo "GITHUB_WORKSPACE = $GITHUB_WORKSPACE" rm -rf "${{ github.workspace }}" checkout_code: needs: [coverage_cleanup] From 5b6bfce7e068f8da163674236c3c97cf47981548 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 10:37:33 -0800 Subject: [PATCH 19/26] Add steps --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 879f3984..8e5b38ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,8 @@ jobs: checkout_code: needs: [coverage_cleanup] runs-on: self-hosted - - name: Checkout code + steps: + - name: Checkout code uses: actions/checkout@v1 scn4me_subm: needs: [checkout_code] From 27c197026ff67d00caca4f15d97b36b237872c67 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 10:50:37 -0800 Subject: [PATCH 20/26] Only remove temp dirs, erase coverage --- .github/workflows/ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e5b38ca..f213eafd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,8 +8,9 @@ jobs: run: | echo "Cleaning up previous run" echo "github.workspace = ${{ github.workspace }}" - echo "GITHUB_WORKSPACE = $GITHUB_WORKSPACE" - rm -rf "${{ github.workspace }}" + rm -rf "${{ github.workspace }}/scn4me_subm_temp" + rm -rf "${{ github.workspace }}/freepdk45_temp" + python3-coverage erase checkout_code: needs: [coverage_cleanup] runs-on: self-hosted @@ -25,14 +26,14 @@ jobs: . /home/github-runner/setup-paths.sh export OPENRAM_HOME="`pwd`/compiler" export OPENRAM_TECH="`pwd`/technology:/software/PDKs/skywater-tech" - export OPENRAM_TMP="${{ github.workspace }}/scn4me_subm" + export OPENRAM_TMP="${{ github.workspace }}/scn4me_subm_temp" python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 16 -t scn4m_subm - name: Archive if: ${{ failure() }} uses: actions/upload-artifact@v2 with: name: scn4me_subm Archives - path: ${{ github.workspace }}/scn4me_subm/*/ + path: ${{ github.workspace }}/scn4me_subm_temp/*/ freepdk45: needs: [checkout_code] runs-on: self-hosted @@ -42,14 +43,14 @@ jobs: . /home/github-runner/setup-paths.sh export OPENRAM_HOME="`pwd`/compiler" export OPENRAM_TECH="`pwd`/technology:/software/PDKs/skywater-tech" - export OPENRAM_TMP="${{ github.workspace }}/freepdk45" + export OPENRAM_TMP="${{ github.workspace }}/freepdk45_temp" python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 16 -t freepdk45 - name: Archive if: ${{ failure() }} uses: actions/upload-artifact@v2 with: name: FreePDK45 Archives - path: ${{ github.workspace }}/freepdk45/*/ + path: ${{ github.workspace }}/freepdk45_temp/*/ coverage_stats: if: ${{ always() }} needs: [scn4me_subm, freepdk45] From 7c15773e173c5c6fc6ff7d87fcc040eca2eff409 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 10:51:09 -0800 Subject: [PATCH 21/26] Only remove temp dirs, erase coverage --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f213eafd..8e719306 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: echo "github.workspace = ${{ github.workspace }}" rm -rf "${{ github.workspace }}/scn4me_subm_temp" rm -rf "${{ github.workspace }}/freepdk45_temp" - python3-coverage erase + python3-coverage erase checkout_code: needs: [coverage_cleanup] runs-on: self-hosted From 5ab67214e5fd039169dfce1772b8b765c007bf0e Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 11:37:42 -0800 Subject: [PATCH 22/26] Make sure to add path when source and target --- compiler/router/router.py | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/router/router.py b/compiler/router/router.py index 8da1d265..dc0c8e8d 100644 --- a/compiler/router/router.py +++ b/compiler/router/router.py @@ -1055,6 +1055,7 @@ class router(router_tech): # Double check source and taget are not same node, if so, we are done! for k, v in self.rg.map.items(): if v.source and v.target: + self.paths.append([k]) return True # returns the path in tracks From bedd1b3d154ee7679fd530a2ed22b568e4bbb1d4 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 11:40:58 -0800 Subject: [PATCH 23/26] Don't need to cleanup as checkout does it. --- .github/workflows/ci.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e719306..6d3b4a2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,18 +1,7 @@ name: ci on: [push] jobs: - coverage_cleanup: - runs-on: self-hosted - steps: - - name: Coverage cleanup - run: | - echo "Cleaning up previous run" - echo "github.workspace = ${{ github.workspace }}" - rm -rf "${{ github.workspace }}/scn4me_subm_temp" - rm -rf "${{ github.workspace }}/freepdk45_temp" - python3-coverage erase checkout_code: - needs: [coverage_cleanup] runs-on: self-hosted steps: - name: Checkout code From 01094ae4f0744dbe7add97d5f47bdbe3c3795dd3 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 14:56:56 -0800 Subject: [PATCH 24/26] Don't upload coverage artifacts --- .github/workflows/ci.yml | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d3b4a2a..17901f2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,8 @@ jobs: export OPENRAM_HOME="`pwd`/compiler" export OPENRAM_TECH="`pwd`/technology:/software/PDKs/skywater-tech" export OPENRAM_TMP="${{ github.workspace }}/scn4me_subm_temp" - python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 16 -t scn4m_subm + #python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 12 -t scn4m_subm + $OPENRAM_HOME/tests/regress.py -j 12 -t scn4m_subm - name: Archive if: ${{ failure() }} uses: actions/upload-artifact@v2 @@ -33,26 +34,27 @@ jobs: export OPENRAM_HOME="`pwd`/compiler" export OPENRAM_TECH="`pwd`/technology:/software/PDKs/skywater-tech" export OPENRAM_TMP="${{ github.workspace }}/freepdk45_temp" - python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 16 -t freepdk45 + #python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 12 -t freepdk45 + $OPENRAM_HOME/tests/regress.py -j 12 -t freepdk45 - name: Archive if: ${{ failure() }} uses: actions/upload-artifact@v2 with: name: FreePDK45 Archives path: ${{ github.workspace }}/freepdk45_temp/*/ - coverage_stats: - if: ${{ always() }} - needs: [scn4me_subm, freepdk45] - runs-on: self-hosted - steps: - - name: Coverage stats - run: | - python3-coverage combine - python3-coverage report - python3-coverage html -d ${{ github.workspace }}/coverage_html - - name: Archive coverage - uses: actions/upload-artifact@v2 - with: - name: code-coverage-report - path: ${{ github.workspace }}/coverage_html/ + # coverage_stats: + # if: ${{ always() }} + # needs: [scn4me_subm, freepdk45] + # runs-on: self-hosted + # steps: + # - name: Coverage stats + # run: | + # python3-coverage combine + # python3-coverage report + # python3-coverage html -d ${{ github.workspace }}/coverage_html + # - name: Archive coverage + # uses: actions/upload-artifact@v2 + # with: + # name: code-coverage-report + # path: ${{ github.workspace }}/coverage_html/ From 96faf06b7cc7f66be9a337efb73817a187fe94c3 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 14:58:55 -0800 Subject: [PATCH 25/26] Each job must checkout with multiple runners --- .github/workflows/ci.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17901f2d..ab4a7527 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,15 +1,11 @@ name: ci on: [push] jobs: - checkout_code: - runs-on: self-hosted + scn4me_subm: + runs-on: self-hosted steps: - name: Checkout code uses: actions/checkout@v1 - scn4me_subm: - needs: [checkout_code] - runs-on: self-hosted - steps: - name: SCMOS test run: | . /home/github-runner/setup-paths.sh @@ -25,9 +21,10 @@ jobs: name: scn4me_subm Archives path: ${{ github.workspace }}/scn4me_subm_temp/*/ freepdk45: - needs: [checkout_code] runs-on: self-hosted steps: + - name: Checkout code + uses: actions/checkout@v1 - name: FreePDK45 test run: | . /home/github-runner/setup-paths.sh From 1614dc140d00bfd32e338c666e1fb018244a4894 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 1 Mar 2021 14:59:49 -0800 Subject: [PATCH 26/26] Remove tab --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab4a7527..8103d1eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: export OPENRAM_TECH="`pwd`/technology:/software/PDKs/skywater-tech" export OPENRAM_TMP="${{ github.workspace }}/freepdk45_temp" #python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 12 -t freepdk45 - $OPENRAM_HOME/tests/regress.py -j 12 -t freepdk45 + $OPENRAM_HOME/tests/regress.py -j 12 -t freepdk45 - name: Archive if: ${{ failure() }} uses: actions/upload-artifact@v2