Adds openroad in image and enables PnR process#87
Merged
Conversation
…egfault The mlir-neura-opt mapper crashes (exit code 139, SIGSEGV) whenever any entry appears in tile_overrides, including the 'existence: true' field that was being emitted for every enabled tile. Changes: - converter.js: hardcode tile_overrides to [] and derive tile_defaults from the union of all enabled tile operations (superset strategy) - converter.js: remove 'existence: true' from generateTileOverrides (function kept as dead code for future use with disabled tiles) - converter.js: switch deriveDefaultOperations from most-common to union so no per-tile override is needed - converter.test.js: update tests to assert tile_overrides is empty and tile_defaults contains the union of all tile operations - mappingExecutor.js: pick up VERILOG_DOCKER_TIMEOUT_MS, patchSeededTestFile, and minimum 2x2 multi-CGRA grid guard (uncommitted changes)
… Verilator OOM VectorCGRA's Verilated model compilation (g++ cc1plus) is killed by the Linux OOM killer when per-CGRA tiles > 2x2. A 4x4 per-CGRA grid produces ~16x more RTL than the reference 2x2 arch, exceeding g++ compilation memory limits. Cap perRows/perCols at 2 to match the reference arch.yaml and all passing VectorCGRA tests. Per-CGRA size > 2x2 silently works in the dataflow mapper (which has its own arch description) but breaks SVerilog Verilator compilation.
# Conflicts: # src/workspace/LayoutTab.jsx # src/workspace/VerificationTab.jsx
|
@yuqisun is attempting to deploy a commit to the syifan's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR switches the project to the cgra/cgra-flow:web-ui Docker image and adds a real “layout” (OpenROAD PnR) job end-to-end: frontend submission + realtime progress UI + runner execution + artifact upload.
Changes:
- Update default Docker image tag from
cgra/cgra-flow:ui→cgra/cgra-flow:web-uiacross scripts, runner executors, and docs. - Add a new
layoutjob type:submitLayoutJobin the frontend,LayoutTabwiring for progress/results, andrunner/layoutExecutor.jsto run OpenROAD PnR in Docker and uploadlayout.png. - Add spec/proposal/design documentation under
openspec/changes/layout-openroad-pnr/.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| test_verilog_simple.js | Updates default DOCKER_IMAGE tag to :web-ui for local test runs. |
| test_vectorcgra_verilog.js | Updates default DOCKER_IMAGE tag to :web-ui. |
| test_vectorcgra_fixed.js | Updates default DOCKER_IMAGE tag to :web-ui. |
| test_vectorcgra_complete.js | Updates default DOCKER_IMAGE tag to :web-ui. |
| src/workspace/services/verificationService.js | Adds submitLayoutJob(...) API for inserting layout jobs. |
| src/workspace/LayoutTab.jsx | Replaces mock layout UI with real job submission + realtime progress + result image rendering. |
| runner/testExecutor.js | Updates docstring + default DOCKER_IMAGE tag to :web-ui. |
| runner/synthesisExecutor.js | Updates docstring + default DOCKER_IMAGE tag to :web-ui. |
| runner/mappingExecutor.js | Updates default DOCKER_IMAGE tag to :web-ui. |
| runner/layoutExecutor.js | New runner executor that runs OpenROAD/ORFS flow in Docker and uploads layout image to Supabase Storage. |
| runner/jobProcessor.js | Registers layout job type dispatch to executeLayoutJob. |
| runner/collect_benchmark_ops.js | Updates default DOCKER_IMAGE tag to :web-ui. |
| runner/README.md | Updates example DOCKER_IMAGE to :web-ui. |
| runner/.env.example | Updates example DOCKER_IMAGE to :web-ui. |
| public/benchmark_ops_index.json | Updates recorded docker image tag to :web-ui. |
| openspec/changes/layout-openroad-pnr/tasks.md | Adds task checklist for the layout/OpenROAD integration. |
| openspec/changes/layout-openroad-pnr/specs/layout-pnr-panel/spec.md | Specifies expected Layout tab behavior (job submit, progress, image, errors). |
| openspec/changes/layout-openroad-pnr/specs/layout-pnr-job/spec.md | Specifies expected runner behavior for layout jobs (sv2v, PnR, progress, upload). |
| openspec/changes/layout-openroad-pnr/proposal.md | Describes why/what/impact of enabling real layout PnR. |
| openspec/changes/layout-openroad-pnr/design.md | Design notes, decisions, risks for layout PnR flow. |
| openspec/changes/layout-openroad-pnr/.openspec.yaml | Adds OpenSpec metadata for the change. |
| docs/LOCAL_SETUP.md | Updates local setup instructions to pull/use :web-ui. |
| cgra-flow-docker/Dockerfile.openroad | Adds Dockerfile layering OpenROAD/ORFS onto cgra/cgra-flow:web-ui. |
| README.md | Updates root README to pull/use :web-ui. |
| CGRA-Flow-sample/layout/constraint.sdc | Updates sample constraint to target CgraTemplateRTL and formatting. |
| CGRA-Flow-sample/layout/config.mk | Updates sample config.mk to ORFS-style config and paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+45
to
+48
| const LAYOUT_DOCKER_TIMEOUT_MS = parseInt( | ||
| process.env.LAYOUT_DOCKER_TIMEOUT_MS || '0', | ||
| 10 | ||
| ); // 0 = no timeout |
Comment on lines
+65
to
+69
| try { | ||
| const sdcContent = sdcFile ? await sdcFile.text() : null; | ||
| const mkContent = mkFile ? await mkFile.text() : null; | ||
| const id = await submitLayoutJob(projectId, sdcContent, mkContent); | ||
| setJobId(id); |
Comment on lines
+115
to
+131
| export async function submitLayoutJob(projectId, sdcContent = null, mkContent = null) { | ||
| const { | ||
| data: { user } | ||
| } = await supabase.auth.getUser(); | ||
|
|
||
| const { data: newJob, error } = await supabase | ||
| .from('jobs') | ||
| .insert({ | ||
| project_id: projectId, | ||
| user_id: user?.id, | ||
| type: 'layout', | ||
| status: 'queued', | ||
| info: { | ||
| ...(sdcContent ? { sdcContent } : {}), | ||
| ...(mkContent ? { mkContent } : {}), | ||
| } | ||
| }) |
Comment on lines
+38
to
+47
| ### Requirement: Executor runs OpenROAD place-and-route via mflowgen inside Docker | ||
| The executor SHALL write a shell script, mount a temp directory into the Docker container, and run mflowgen with OpenROAD through to the final routing step. | ||
|
|
||
| #### Scenario: Docker container is started for PnR | ||
| - **WHEN** the layout job begins executing | ||
| - **THEN** `docker run --rm -v <tempDir>:/layout <DOCKER_IMAGE> bash /layout/layout.sh` is invoked with the `cgra/cgra-flow:web-ui` image | ||
|
|
||
| #### Scenario: mflowgen drives the flow | ||
| - **WHEN** the layout shell script runs inside Docker | ||
| - **THEN** mflowgen is configured for the `nangate45` process node and `make` is called to run through the final routing step |
Comment on lines
+77
to
+79
| ### Requirement: Layout job executor has a configurable timeout | ||
| The executor SHALL respect a `LAYOUT_DOCKER_TIMEOUT_MS` environment variable (default: 3 600 000 ms = 60 min). | ||
|
|
Comment on lines
28
to
+35
| function LayoutTab({ projectId, sverilogReady }) { | ||
| const [sdcPath, setSdcPath] = useState(''); | ||
| const [mkPath, setMkPath] = useState(''); | ||
| const [sdcFile, setSdcFile] = useState(null); | ||
| const [mkFile, setMkFile] = useState(null); | ||
| const [process, setProcess] = useState('asap7'); | ||
| const [loading, setLoading] = useState(false); | ||
| const [showResult, setShowResult] = useState(false); | ||
| const [jobId, setJobId] = useState(null); | ||
| const [jobStatus, setJobStatus] = useState(null); |
Comment on lines
+1
to
+3
| ## 1. Runner �?Layout Job Executor | ||
|
|
||
| - [x] 1.1 Create `runner/layoutExecutor.js` with the same module structure as `synthesisExecutor.js`: dotenv config, Supabase client init, `DOCKER_IMAGE`, `GRAPH_BUCKET`, `LAYOUT_DOCKER_TIMEOUT_MS` (default 3 600 000 ms) constants, UUID validation pattern, `patchJobInfo`, `updateProgress`, and `runWithProgress` helpers |
Comment on lines
+13
to
+16
| **Non-Goals:** | ||
| - Supporting custom SDC / config.mk files uploaded by the user (the file-picker fields in LayoutTab remain UI-only for now). | ||
| - Supporting process nodes other than `nangate45` in the first iteration (OpenROAD's bundled PDK in orfs). | ||
| - Cancelling an in-flight layout job. |
Comment on lines
+51
to
+56
| ### Requirement: Executor reports intermediate progress to Supabase | ||
| The executor SHALL update `job.info` with `{ progress, stage, timeCost }` at key milestones via `PROGRESS:<n>:<label>` markers streamed from the Docker process. | ||
|
|
||
| #### Scenario: Progress milestones are emitted | ||
| - **WHEN** the Docker process emits `PROGRESS:10:starting`, `PROGRESS:20:sv2v`, `PROGRESS:50:pnr-init`, `PROGRESS:80:routing`, `PROGRESS:95:image-export` | ||
| - **THEN** the runner patches `job.info` with the corresponding progress value and stage label |
| # This avoids rebuilding the entire cgra-flow image from scratch. | ||
| # | ||
| # orfs base: Ubuntu 22.04 (Jammy) | ||
| # cgra-flow:ui base: Ubuntu 24.04 (Noble) |
tancheng
approved these changes
Mar 14, 2026
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.