Generate floorplan guide documents and layout diagrams for physical design (PD) teams based on RTL source code analysis. Use this skill whenever the user mentions floorplan, floor plan, FP guide, PD guide, physical design planning, chip layout, macro placement, timing-driven placement, module placement strategy, die floorplan, or asks to analyze RTL for physical implementation. Also trigger when the user wants to create placement constraints, identify critical timing paths for PD, estimate module areas, plan power grid strategy, or produce any deliverable intended for a physical design team — even if they don't explicitly say "floorplan".
Generate a PD-ready floorplan guide and visual layout diagram by systematically analyzing RTL source code. The output helps physical design engineers understand module hierarchy, timing-critical paths, area distribution, and optimal placement strategy.
When executing this skill, read the relevant reference files on-demand:
references/guide_template.md — Markdown template for the floorplan guide document (read at Step 5)references/svg_template.md — SVG structure, color palette, and layout grid (read at Step 6)references/critical_path_patterns.md — Checklist of common critical path patterns (read at Step 3)Do NOT read all references upfront. Read each when you reach the relevant step.
Step 1: RTL Discovery & Hierarchy Extraction
→ Step 2: Module-by-Module Analysis
→ Step 3: Critical Path Identification ← read references/critical_path_patterns.md
→ Step 4: Area Estimation
→ Step 5: Write Floorplan Guide Document ← read references/guide_template.md
→ Step 6: Draw Floorplan Diagram (SVG) ← read references/svg_template.md
→ Step 7: Deliver & Summarize
Read the design top-level and build the full module hierarchy tree.
Actions:
.f file) or top-level module to understand the complete file set.*_pack.sv) for global constants: data widths, address widths, queue depths, index widths.Capture these per module:
DW_, DW02_, SRAM-like mem arrays, or behavioral memory modelsCRITICAL RULE — Use exact RTL instance names for hierarchy paths:
u_core/u_dispatch/u_rf not "the integer register file")module_type instance_name(...) → use instance_nameparent/child/grandchild (slash-separated, no u_top. prefix unless needed)Output: A hierarchy tree with exact instance names like:
top_module
├── u_core (toy_core) ← processor core
│ ├── u_fetch (toy_fecth3) ← [IF] fetch unit
│ │ ├── u_fifo (toy_fetch_queue2, DEPTH=16)
│ │ └── u_crdt (toy_fetch_credit, DEPTH=16)
│ ├── u_dispatch (toy_dispatch) ← [IS] dispatch + decode + regfile
│ │ ├── u_dec (toy_decoder) ← [ID] instruction decoder
│ │ ├── u_rf (toy_regfile, MODE=0) ← INT regfile 32×32b 6W10R
│ │ └── u_float_rf (toy_regfile, MODE=1) ← FP regfile 32×32b 2W3R
│ ├── u_alu (toy_alu) ← [EX] ALU + branch
│ ├── u_lsu (toy_lsu) ← [EX] load/store
│ ├── u_mext (toy_mext) ← [EX] mul/div
│ │ ├── metx_dw_mult (DW02_mult, 33×33)
│ │ └── metx_dw_div (DW_div, 33/33)
│ ├── u_float (toy_float) ← [EX] FP unit
│ │ ├── u_fp_flt2i / u_fp_u_flt2i (DW_fp_flt2i)
│ │ ├── u_fp_i2flt (DW_fp_i2flt)
│ │ ├── u_fp_add (DW_fp_add_DG)
│ │ ├── u_fp_mult (DW_fp_mult_DG)
│ │ ├── u_fp_div (DW_fp_div_DG)
│ │ ├── u_fp_sqrt (DW_fp_sqrt)
│ │ └── u_fp_cmp (DW_fp_cmp_DG)
│ └── u_csr (toy_csr) ← [EX] CSR + trap
└── u_bus (toy_bus_DWrap_network_toy_bus) ← interconnect
For each module, read the RTL and extract:
always_ff stages between input and output, or is it purely combinational?vld/rdy? Is rdy always 1'b1 (always ready) or conditional?Look for these patterns that indicate large physical blocks:
DW02_mult, DW_div, DW_fp_* → DesignWare IP (area-heavy, fixed structure)readmemh → will be replaced with SRAM macrosFor each module pair that communicates, count the total number of wires crossing the boundary:
Counting methodology:
[31:0] bus = 32 wires, a logic scalar = 1 wireRecord for each module pair:
parent/inst_a ↔ parent/inst_bPresent as a connectivity table:
| Source (hier) | Sink (hier) | A→B wires | B→A wires | Total | Key signals |
|----------------------|----------------------|-----------|-----------|-------|-------------|
| u_core/u_dispatch | u_core/u_alu | ~173 | ~44 | ~217 | rs1/rs2 2×32b, inst 32b, imm 32b; WB: reg_val 32b |
| ... | ... | ... | ... | ... | ... |
Why this matters for PD:
This is the most important step. Enumerate all timing-critical paths with priority.
| Priority | Symbol | Criteria |
|---|---|---|
| P0 | 🔴 | Single-cycle loop spanning multiple modules; directly limits Fmax |
| P1 | 🟡 | Long combinational chain within one module; limits Fmax under tight constraints |
| P2 | 🟢 | Multi-module path but with slack; or low-frequency-of-occurrence path |
Always check these patterns (ordered by typical severity):
Writeback → Scoreboard → Dispatch loop (P0 typical)
register_lock, scoreboard, bypass, forward in dispatch/decodeBranch/Jump target → Fetch PC redirect (P0 typical)
pc_update_en, pc_val, jb_pc, branch_target signals crossing from execute to fetchMemory address calculation (P1 typical)
rs1_val + immediate → memory address → request validMultiplier/Divider (P1 typical)
Floating-point unit (P1 typical)
Regfile read → execute → regfile write (P1 typical)
Bus arbitration (P2 typical)
For each path, record (using exact hier paths):
Path ID: P0-001
Priority: 🔴 P0
Source: u_core/u_alu.pc_val ← use EXACT hier path + signal name
Sink: u_core/u_fetch.fetch_pc_nxt ← use EXACT hier path + signal name
Intermediate: u_core/u_alu.pc_val → [32-bit branch target] → u_core/u_fetch.pc_val → u_core/u_fetch.fetch_pc_nxt
Cross-boundary wires: ~34 (jb_pc_release_en[1] + jb_pc_update_en[1] + jb_pc_val[32])
Why critical: [explanation of the timing loop/chain]
PD action: [specific placement/routing guidance]
Naming rules for critical paths:
instance_hier.signal_name format (e.g., u_core/u_dispatch/u_rf not "regfile")Estimate relative area percentages for each module. This doesn't need to be precise — the goal is to help PD understand proportions for floorplanning.
| Resource | Relative Area Weight |
|---|---|
| 32-bit register (FF) | 1x (baseline) |
| 32-bit adder | ~0.5x per bit |
| 32-bit comparator | ~0.3x per bit |
| 32x32-bit multiplier | ~30-50x |
| 32/32-bit divider | ~60-100x |
| 32-entry × 32-bit regfile (1R1W) | ~32x |
| Each additional R/W port | ~+50% of base regfile |
| FP adder (DW) | ~40-60x |
| FP multiplier (DW) | ~50-80x |
| FP divider (DW) | ~80-120x |
| FP sqrt (DW) | ~80-120x |
| SRAM macro | Separately sized, not in logic area |
Present as a table with hier paths:
| Hier Path | Module Type | Relative Area | Key Resources |
|--------------------------------|----------------|---------------|---------------|
| u_core/u_fetch | toy_fecth3 | ~5% | 16-entry FIFO, PC logic |
| u_core/u_dispatch/u_rf | toy_regfile | ~12% | 32×32b 6W10R |
| ... | ... | ... | ... |
Output a Markdown document saved to doc/floorplan_guide.md (or user-specified path).
Required sections — use this template structure:
# <Design Name> Floorplan Guide for Physical Design
**Document Version:** 1.0
**Date:** <date>
**Target:** High-frequency implementation
**Architecture:** <brief arch description>
---
## 1. Design Overview
- Module hierarchy tree (from Step 1)
- Data widths, key parameters
- Pipeline structure diagram (text-based)
## 2. Pipeline Structure
- Stage-by-stage description
- Which module maps to which stage
- Handshake/stall mechanism
## 3. Critical Timing Paths Analysis
- P0 paths (with 🔴 marker)
- P1 paths (with 🟡 marker)
- P2 paths (with 🟢 marker)
- Each path: source → sink, analysis, PD recommendation
## 4. Module Area Estimation
- Relative area table (percentage)
- Key resource breakdown per module
## 5. Floorplan Placement Strategy
### 5.1 Overall Layout Principle
- Zone-based strategy (e.g., Memory Zone / Pipeline Zone / Compute Zone)
### 5.2 Placement Constraints
- Hard constraints (MUST): SRAM positions, regfile centrality, critical-path adjacency
- Soft constraints (SHOULD): general guidance, aspect ratio, margin
## 6. Floorplan Diagram
- Reference to SVG file
## 7. Clock & Reset Strategy
- Clock domains (how many, relationships)
- Reset type (sync/async) and fan-out concerns
- CTS considerations
## 8. Power Grid & Decoupling
- High-power zones
- Power stripe density recommendations
- Decap placement
## 9. Special Considerations for High Frequency
- RTL-level risks that PD should be aware of (e.g., single-cycle divider)
- Congestion hotspots
- Recommended utilization targets per zone
## 10. Pin/Port Assignment Recommendation
- External I/O grouping and direction
Writing guidelines:
u_core/u_dispatch/u_rf not "the integer regfile" or "INT Regfile".instance_name (module_type) format# Example: PD can paste directly
create_bound -name fp_core_center -type soft \
-boundary {{x1 y1} {x2 y2}} \
u_core/u_dispatch/u_rf u_core/u_dispatch/u_float_rf
Create an SVG diagram saved to doc/floorplan_diagram.svg.
Diagram requirements:
u_core/u_dispatch/u_rf, not "INT Regfile")SVG style guidelines:
#2d6a4f → #1b4332)#457b9d → #1d3557)#e63946 → #a8201a)#264653 → #1a323d)#7b2cbf → #5a189a)#6c757d → #495057)#f4a261 → #e07a30)font-family: 'Helvetica Neue', Arial, sans-serif<defs> section with reusable gradients, arrow markers, drop shadowsLayout principle:
Spatial mapping:
After creating both files, provide a summary to the user with:
If the design has multiple clock domains:
If there are >4 SRAM macros:
If the design is very simple (< 5 modules, no SRAM, no hard IP):
If the user asks about a full SoC (not just a core):