dc: add unified bbdev dc command and workflow#8
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a unified “dc” (Design Compiler) workflow to the bbdev CLI and Motia API so DC synthesis can be invoked via bbdev dc ... and /dc/run, with an optional pre-step to generate Ball verilog.
Changes:
- Add a dedicated
bbdev dccommand (direct args, no--runwrapper) and map it to thedc.runworkflow operation. - Introduce a new Motia API trigger (
POST /dc/run) that enqueuesdc.run. - Add a new Motia event step to execute DC synthesis (and optionally generate Ball verilog first).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
bbdev |
Adds dc CLI command parsing and wiring to the workflow submit/poll logic. |
api/steps/dc/01_run_api.step.py |
Adds REST endpoint /dc/run to enqueue the dc.run topic. |
api/steps/dc/01_run_event.step.py |
Implements the dc.run queue handler that runs verilog generation (optional) and then DC script execution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+177
to
+183
| # [--balltype ...] [--config ...] [--output-dir ...] | ||
| dc_parser = subparsers.add_parser("dc", parents=[common], help="Run DC synthesis") | ||
| dc_parser.add_argument("--srcdir", type=str, required=True, help="Design source directory relative to repo root") | ||
| dc_parser.add_argument("--top", type=str, default=None, help="Top module name") | ||
| dc_parser.add_argument("--keep-hierarchy", action="store_true", help="Keep hierarchy during compile") | ||
| dc_parser.add_argument("--balltype", type=str, default=None, help="Optional Ball type for pre-verilog generation, e.g. ReluBall") | ||
| dc_parser.add_argument("--config", type=str, default="sims.verilator.BuckyballToyVerilatorConfig", help="Verilog generation config when --balltype is set") |
| top = input_data.get("top") | ||
| keep_hierarchy = bool(input_data.get("keep_hierarchy", False)) | ||
| balltype = input_data.get("balltype") | ||
| config_name = input_data.get("config", "sims.verilator.BuckyballToyVerilatorConfig") |
| "top": body.get("top"), | ||
| "keep_hierarchy": bool(body.get("keep_hierarchy", False)), | ||
| "balltype": body.get("balltype"), | ||
| "config": body.get("config", "sims.verilator.BuckyballToyVerilatorConfig"), |
Member
|
Thanks! We really need this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.