Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move generic information to bazel-orfs #63

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ git_override(
commit = "72403c0ed232130a5ec23cb22c2c9608c03490e0",
)

# Read: https://github.com/The-OpenROAD-Project/megaboom?tab=readme-ov-file#local-workspace
# Read: https://github.com/The-OpenROAD-Project/bazel-orfs?tab=readme-ov-file#usage
#
# TL;DR
#
Expand Down
38 changes: 7 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Bazel on OpenROAD-flow-scripts(ORFS) with MegaBoom use case
===========================================================

Demonstrates a practical workflow for large designs in a git repository that is not a fork of OpenROAD-flow-scripts and that is using its own file layout layout: similar to a private repository or a large project.
Demonstrates a practical workflow for large designs in a git repository that is not a fork of [OpenROAD-flow-scripts](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts) and that is using its own file layout: similar to a private repository or a large project.

MegaBoom(a RISC-V SoC from Chipyard) has been chosen as a test-case as it is large, familiar and interesting in itself.

Expand All @@ -24,35 +24,13 @@ make with the design configuration and forwards arguments to make to view the re
Setup
-----

For running bazel flow for the ORFS, megaboom uses [bazel-orfs](https://github.com/The-OpenROAD-Project/bazel-orfs).
It provides two different bazel flows for running Physical Design flow with [OpenROAD-flow-scripts](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts).
For running Bazel flow for the ORFS, MegaBoom uses [bazel-orfs](https://github.com/The-OpenROAD-Project/bazel-orfs).
It provides two different Bazel flows for running Physical Design Flow with OpenROAD-flow-scripts.
For the installation and usage guide, please refer to [bazel-orfs's README](https://github.com/The-OpenROAD-Project/bazel-orfs/blob/main/README.md).

`bazel-orfs` must be specified in megaboom as the external dependency.
Bazel-orfs must be specified in MegaBoom as the external dependency.
It can be pinned to a specific revision of [the upstream repository](https://github.com/The-OpenROAD-Project/bazel-orfs) or the dependency can point to a local bazel-orfs workspace available on disk.

### Upstream repository

In `MODULE.bazel` use [git_override](https://bazel.build/rules/lib/globals/module#git_override) to pin `bazel-orfs` version at specific commit:

```
git_override(
module_name = "bazel-orfs",
remote = "https://github.com/The-OpenROAD-Project/bazel-orfs.git",
commit = "<commit hash>",
)
```

### Local workspace

For testing changes made to `bazel-orfs` it is useful to set the dependency to a local bazel-orfs workspace.
In order to do that, in `MODULE.bazel` use [local_path_override](https://bazel.build/rules/lib/globals/module#local_path_override):

```
local_path_override(
module_name = "bazel-orfs", path = "<path to local bazel-orfs workspace>"
)
```
Setup can be modified in [MODULE.bazel](./MODULE.bazel) file.

Using the OpenROAD project Bazel artifact server to download pre-built results
------------------------------------------------------------------------------
Expand All @@ -73,7 +51,7 @@ To use this feature, copy the snippet below into `.bazelrc` and specify your use

`cred_helper.py` will parse `.bazelrc` and look for the username in the comment.

**NOTE:** To test the credential helper, make sure to restart Bazel to avoid using a previous
> **Note:** To test the credential helper, make sure to restart Bazel to avoid using a previous
cached authorization:

bazel shutdown
Expand All @@ -87,9 +65,7 @@ About the MegaBoom RTL code

Based on: https://chipyard.readthedocs.io/en/stable/VLSI/Sky130-OpenROAD-Tutorial.html#initial-setup

```
**Note:** Chipyard main does not work smoothly with MegaBoom as of writing as Chipyard is mixing SFC and MFC.
```
> **Note:** Chipyard main does not work smoothly with MegaBoom as of writing as Chipyard is mixing SFC and MFC.

Follow https://github.com/ucb-bar/chipyard/issues/1623 for latest updates.

Expand Down