Skip to content

Bender Book#295

Open
fischeti wants to merge 35 commits intomasterfrom
book
Open

Bender Book#295
fischeti wants to merge 35 commits intomasterfrom
book

Conversation

@fischeti
Copy link
Copy Markdown
Contributor

@fischeti fischeti commented Mar 30, 2026

TODOs

  • Change structure maybe? Put book.toml in root directory
  • Figure out how to deploy to GH pages in a nice way (Github artifacts)
  • Align Mention in installer: replace init with version-aware router #285, remove website branch
  • Figure out what to do with commands section
  • Remove sources workflow?
  • Shorten README significantly and refer to the book
  • Change pages deployment: Settings -> Pages -> Source: change from website to "Github Actions"

@fischeti fischeti force-pushed the book branch 6 times, most recently from 7e6cbaf to 74864c0 Compare April 1, 2026 13:52
@fischeti fischeti marked this pull request as ready for review April 1, 2026 14:07
@fischeti fischeti requested a review from micprog April 1, 2026 14:08
@micprog
Copy link
Copy Markdown
Member

micprog commented Apr 16, 2026

@fischeti Does this already include the bender install script (and possibly updates from #285)? If we change the pointer from branch to pages, then the install script is no longer available (if I'm not mistaken). If possible, I'd like to ensure continuity on that front.

@fischeti
Copy link
Copy Markdown
Contributor Author

No not yet. You are right, we should merge both of them at the same time. Let me rebase #285 onto this branch. Then we can merge it in here and push both book and new install scripts at once.

@micprog
Copy link
Copy Markdown
Member

micprog commented Apr 16, 2026

No not yet. You are right, we should merge both of them at the same time. Let me rebase #285 onto this branch. Then we can merge it in here and push both book and new install scripts at once.

I see the website/init file in the diff now, while reviewing. It exists and looks to be placed in the correct spot, but it is still the old version. We will have to figure out how to get latest working correctly only once 0.32.0 is released, but I think we can manage.

@fischeti
Copy link
Copy Markdown
Contributor Author

ah, right. I forgot that I also added it here already. This means this PR is independent from #285 and should not break anything regarding the installation script.

Copy link
Copy Markdown
Member

@micprog micprog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are some points to address... I have not checked the README (I want to ensure all content previously covered within is properly covered in the book) and the commands (I want to ensure all are present), but figured I'd share the comments I already have.

Comment thread book/.gitignore
@@ -0,0 +1 @@
book No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: newline at end of file

Comment thread book/src/workflows.md

- **[Initialization](./workflow/init.md):** Setting up a new Bender package from scratch.
- **[Adding and Updating Dependencies](./workflow/dependencies.md):** Managing external packages and ensuring reproducible builds.
- **[Inspecting Source Files](./workflow/sources.md):** Exploring and filtering the source files in your project.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this part is around anymore.

Suggested change
- **[Inspecting Source Files](./workflow/sources.md):** Exploring and filtering the source files in your project.

Comment thread book/src/workflows.md
- **[Inspecting Source Files](./workflow/sources.md):** Exploring and filtering the source files in your project.
- **[Generating Tool Scripts](./workflow/scripts.md):** Creating compilation and simulation scripts for various EDA tools.
- **[Package Development](./workflow/package_dev.md):** Developing multiple packages simultaneously using the `clone` and `snapshot` flow.
- **[Vendorizing External Code](./workflow/vendor.md):** Managing external repositories that don't natively support Bender.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we want to add the ci section here as well, or is this linked elsewhere?

@@ -0,0 +1,54 @@
name: Deploy Documentation
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this flow tested somewhere (e.g., on a temporary fork)? Just to ensure there are no issues here.

Comment thread book/src/workflow/ci.md

## GitLab CI

For GitLab CI, you can use the standard [installation script](../installation.md) to fetch the Bender binary at the start of your job.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For GitLab CI, you can use the standard [installation script](../installation.md) to fetch the Bender binary at the start of your job.
For GitLab CI, you can use the standard [installation script](../installation.md) to fetch the Bender binary at the start of your job if bender is not already installed in the system.

Once your changes are stable and you are ready to "release" them:

1. **Tag the Dependency:** Push your changes to the remote repository and create a new version tag (e.g., `v1.2.2`).
2. **Update Manifest:** Update the version requirement in your top-level `Bender.yml` to include the new version.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. **Update Manifest:** Update the version requirement in your top-level `Bender.yml` to include the new version.
2. **Update Manifest:** Update the version requirement in your `Bender.yml` to include the new version.

- **`-e/--exclude <PKG>`**: Exclude a specific package from the generated script.

### RTL Assumption
- **`--assume-rtl`**: Automatically adds the `rtl` target to any source group that does not have an explicit target specification. This is a common shorthand for generating synthesis scripts without having to tag every RTL file.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **`--assume-rtl`**: Automatically adds the `rtl` target to any source group that does not have an explicit target specification. This is a common shorthand for generating synthesis scripts without having to tag every RTL file.
- **`--assume-rtl`**: Automatically adds the `rtl` target to any source group that does not have an explicit target specification. This is an optional shorthand for generating synthesis scripts without having to tag every RTL file.


```sh
bender script template --template my_custom_format.tera > output.txt
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To assist in development, bender can dump the json it provides to the template using bender script template_json


Bender's `vendor` command allows you to manage external dependencies that aren't natively packaged for Bender. It works by copying a subset of files from an upstream Git repository into a local directory within your project, allowing you to track changes and maintain local patches.

This flow is heavily inspired by the `vendor.py` script used in the [OpenTitan](https://opentitan.org/) project.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a direct link to the script?

```

Bender clones the upstream repository, filters the files based on your rules, and copies them to your project. If a `patch_dir` is specified, any existing patches are applied automatically.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a note or some information here (or in a better spot) that the files listed in vendor are not automatically included as source files for the bender project! These need to be additionally specified in the source list in the manifest!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants