diff --git a/BUILD.bazel b/BUILD.bazel index fabde8d..caf24b4 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,4 +1,5 @@ -load("@bazel-orfs//:openroad.bzl", "build_openroad", "add_options_all_stages") +load("@bazel-orfs//:openroad.bzl", "build_openroad", "add_options_all_stages", "create_out_rule") +create_out_rule() filegroup( name = "util", diff --git a/MODULE.bazel b/MODULE.bazel index e312b9a..f33d8c0 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -8,7 +8,7 @@ bazel_dep(name = "bazel-orfs") git_override( module_name = "bazel-orfs", remote = "https://github.com/The-OpenROAD-Project/bazel-orfs.git", - commit = "44378cf64346f64eeab5fec7860634a680c88c6c", + commit = "b434ee1b2fce89616f58f6bb0c2d6a6eeb540a85", ) # Read: https://github.com/The-OpenROAD-Project/megaboom?tab=readme-ov-file#local-workspace diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index d01d8fb..62ceb86 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -1,6 +1,6 @@ { "lockFileVersion": 3, - "moduleFileHash": "d3f4a2449e6dc736b45c5392bce24124a4931dc276f64ba55aea4eafa97b10aa", + "moduleFileHash": "bf6a9e371451d6c56b1a3bbbc52c290371200dc404688212ba37d7268d2e2726", "flags": { "cmdRegistries": [ "https://bcr.bazel.build/" @@ -56,7 +56,7 @@ "tagName": "pull", "attributeValues": { "name": "orfs_image", - "digest": "sha256:b13b35193bec45cb708bd9a5ee3546a7f20378e3c977a4c49f00e9c1c8a71181", + "digest": "sha256:ef18800147f1b09fd00366c32b2266da4944d59d588680ed05d2685fbae2531a", "image": "ghcr.io/antmicro/openroad-flow-scripts/ubuntu22.04", "platforms": [ "linux/amd64" @@ -1873,7 +1873,7 @@ "scheme": "https", "registry": "ghcr.io", "repository": "antmicro/openroad-flow-scripts/ubuntu22.04", - "identifier": "sha256:b13b35193bec45cb708bd9a5ee3546a7f20378e3c977a4c49f00e9c1c8a71181", + "identifier": "sha256:ef18800147f1b09fd00366c32b2266da4944d59d588680ed05d2685fbae2531a", "platforms": { "@@platforms//cpu:x86_64": "@orfs_image_linux_amd64" }, @@ -2208,7 +2208,7 @@ "scheme": "https", "registry": "ghcr.io", "repository": "antmicro/openroad-flow-scripts/ubuntu22.04", - "identifier": "sha256:b13b35193bec45cb708bd9a5ee3546a7f20378e3c977a4c49f00e9c1c8a71181", + "identifier": "sha256:ef18800147f1b09fd00366c32b2266da4944d59d588680ed05d2685fbae2531a", "platform": "linux/amd64", "target_name": "orfs_image_linux_amd64" } diff --git a/README.md b/README.md index a8a9771..8f0eb28 100644 --- a/README.md +++ b/README.md @@ -82,19 +82,6 @@ cached authorization: To gain access to the https://storage.googleapis.com/megaboom-bazel-artifacts bucket, reach out to Tom Spyrou, Precision Innovations (https://www.linkedin.com/in/tomspyrou/). -Staring at logs ---------------- - -In ORFS it is oftentimes useful to view the tail of the single running -stage on a machine, `./out` is in this project to "stare at logs": - -``` -tail -f $(./out -t) -``` - -Currently, this script depends on bazel cache residing under `~/.cache/bazel/`. -This directory is scanned for the newest log file which name of gets printed to the standard output. - About the MegaBoom RTL code =========================== diff --git a/out b/out deleted file mode 100755 index 41b3b75..0000000 --- a/out +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env python3 - -# Find this path: -# -# /home/user/.cache/bazel/_bazel_user/7e6ad621f3f951c3ee6f5b179289b54e/execroot/_main/bazel-out/k8-fastbuild/bin/ -# -# Where: -# _bazel_user is a folder where "user" is the username -# 7e6ad621f3f951c3ee6f5b179289b54e is the MD5 hash of the path name of workspace root -# (as described in https://bazel.build/remote/output-directories#layout) -# -# Then print out the path - -import os -import sys -import re -import argparse -import hashlib -from pathlib import Path -from glob import glob - -PROJECT_DIR = Path(__file__).parent.resolve() - - -def find_path(): - path = os.path.expanduser("~/.cache/bazel/_bazel_" + os.getlogin()) - if not os.path.exists(path): - print("Path does not exist: " + path) - sys.exit(1) - - hash = hashlib.new("md5") - hash.update(str(PROJECT_DIR).encode()) - d = hash.hexdigest() - if re.match(r'[a-z0-9]{32}', d): - path2 = os.path.join(path, d, - "execroot/_main/bazel-out/k8-fastbuild/bin") - if os.path.exists(path2): - return path2 - - print("Could not find path") - sys.exit(1) - - -def find_newest_log(path): - files = glob(path + "/**/*.log", recursive=True) - return max(files, key=os.path.getmtime, default=None) - - -if __name__ == "__main__": - path = find_path() - args = sys.argv[1:] - parser = argparse.ArgumentParser() - # add actions in argparser - # print - default action - # tail - print last 10 lines - parser.add_argument("-t", "--tail", action="store_true") - args = parser.parse_args(args) - if args.tail: - # scan recursively to find the most recent file ending in - # .tmp.log: - # - # path + '/logs/asap7/DigitalTop/2_6_floorplan_pdn.tmp.log' - tmpfile = find_newest_log(path + '/logs') - if tmpfile is None: - print("Could not find tmp file") - sys.exit(1) - print(tmpfile) - else: - print(path)