The advanced prompting techniques that separate average results from expert-level output. Learn chain-of-thought, role priming, few-shot examples, and iterative refinement — with VLSI examples throughout.
Estimated output quality improvement — each technique compounds on the previous
Every great Claude prompt for engineering work has six components. Missing any one of them forces Claude to guess — and guessing introduces errors.
Act as a senior RTL design engineer with 10+ years of ASIC experience. This primes Claude's vocabulary, reasoning depth, and assumptions.I'm designing a RISC-V cache controller for TSMC N7, targeted at 1.5 GHz. Claude tailors its advice to your specific constraints.Review this FSM for latch inference, reset completeness, and any state encoding issues. Be specific — "review my code" is too vague.Use only synthesizable constructs. Non-blocking assignments only. Do not use any Xilinx-specific primitives. Prevents Claude from giving valid but wrong answers.Return a numbered list of issues, each with file:line reference and a proposed fix. Without this, Claude picks its own format which may not match your workflow.When you ask Claude a complex question directly, it can jump to a plausible-sounding answer. Chain-of-thought forces it to decompose the problem first, significantly improving accuracy for anything involving logic tracing, timing paths, or multi-step debugging.
The magic phrase: "Think step by step before answering" or "First, trace through the logic of..."
# Timing path debug — chain of thought I have a setup violation on path: FF_A/Q → combo_logic → FF_B/D Slack = -0.34 ns at 1GHz. Think step by step: 1. Identify the likely root cause (long logic depth / high fanout / routing) 2. Calculate how much improvement each fix would give 3. Rank the fixes by effort vs. gain 4. Give me the exact Tcl command for the highest-ROI fix in DC # FSM completeness check — chain of thought Here is my Verilog FSM. Before telling me if it's correct: Step 1: List all states and transitions you can see Step 2: Check if every state has a transition for every input combination Step 3: Check for any unreachable states Step 4: Identify any latch inference risks Then give me the final verdict with specific line numbers.
The role you assign Claude fundamentally changes how it responds. "Act as a senior DV engineer" produces assertions with proper disable conditions. "Act as a student" produces simplifications. "Act as an adversarial reviewer" produces the harshest possible critique.
"Act as a senior RTL design engineer specializing in synthesizable Verilog for ASIC design at advanced nodes. You know Synopsys DC synthesis constraints intimately."
"Act as a lead verification engineer who has taped out 10 chips using UVM. You think in terms of coverage holes and failure modes, not just passing tests."
"Act as the most critical code reviewer on the team — someone who has seen every class of chip bug and is specifically looking for what will fail at silicon."
"Act as a patient VLSI instructor explaining to a 3rd year ECE student. Use analogies, avoid jargon, and build intuition before formulas."
# Role stacking — get multiple expert perspectives in one shot
Review this AXI4 slave RTL from THREE perspectives:
1. As a senior RTL designer: check synthesizability and coding style
2. As a DV engineer: identify what test cases would break this
3. As an STA engineer: flag any timing concerns from the logic structure
Provide each perspective as a separate section.
[paste your RTL here]
The single most underused technique. Instead of describing the format you want in words, show Claude one or two examples. It will precisely match the style, naming convention, comment density, and structure of your example.
# Tell Claude to format issues like your lint tool
When you find issues in my RTL, report them in this exact format:
[SEVERITY] FILE:LINE — RULE — Description of issue
Suggested fix: <one line fix>
Example:
[ERROR] fifo.sv:47 — NB-ASSIGN — Blocking assignment in clocked always block
Suggested fix: Change `=` to `<=`
[WARN] fifo.sv:112 — RESET-INCOMPLETE — Signal rd_ptr not reset
Suggested fix: Add `rd_ptr <= '0;` in reset block
Now review this module and report all issues in the above format:
[paste RTL]
The biggest mistake engineers make is asking for everything in one prompt: "Write me a complete RISC-V pipeline with caches, branch prediction, and out-of-order execution." Even Claude will produce mediocre results for over-specified single-shot requests. The pro approach: decompose and iterate.
Prompt 1: Outline "Outline the key design decisions for a 512-depth, 32-bit wide synchronous FIFO with full/empty flags. List: (1) address tracking approach, (2) full/empty generation logic, (3) any timing risks." Prompt 2: Skeleton "Good. Now write the module skeleton — just the port list, parameters, and internal signal declarations. No logic yet." Prompt 3: Core Logic "Now fill in the write and read pointer logic with non-blocking assignments. Full/empty generation only — no output assignments yet." Prompt 4: Edge Cases "Now add handling for: simultaneous read+write when nearly full, and the condition where rd_ptr wraps around past wr_ptr." Prompt 5: Assertions "Add 3 SVA assertions checking: (1) no write when full, (2) no read when empty, (3) pointer separation never exceeds DEPTH." Prompt 6: Review "Now act as an adversarial reviewer. What could go wrong with this FIFO under corner-case inputs? Focus on metastability and overflow."
Each step gives Claude a clear, bounded task. Claude's quality degrades on open-ended mega-prompts because it must simultaneously optimize for structure, correctness, style, and completeness. Iterating on smaller steps keeps each response focused and high-quality.
After Claude writes or reviews code, flip its perspective. Ask it to play the role of someone specifically trying to break the design. This adversarial frame forces Claude to think about failure modes, not just correctness — the same mental model experienced verification engineers use.
# After getting Claude to write/review code, follow with:
You just reviewed this RTL and said it looks correct. Now switch roles.
Act as an adversarial verification engineer whose job is to find a bug
that slips through the review.
Ask yourself:
- What happens at reset edge cases?
- What if two signals change simultaneously?
- What is the behavior at power-of-2 boundaries?
- What if the input violates the protocol spec by 1 cycle?
Report any vulnerabilities you find, even theoretical ones.
Use explicit constraints to prevent Claude from giving technically correct but useless answers. Without constraints, Claude will pick the most general solution — which is often wrong for your specific tool, node, or standard.
"Only use synthesizable Verilog. No #delays, no initial blocks, no fork-join."
"Target Synopsys DC 2024. Use only DC-compatible pragmas. Do not use Cadence-specific attributes."
"Give me a maximum 10-line fix. Do not rewrite the entire module — patch only the lines that change."
"Do not add any comments unless I ask. Use 2-space indent. Registers end in _q, next-state logic ends in _d."
When you need to feed Claude's output into another tool (a script, a CI system, a tracking spreadsheet), ask for JSON, CSV, or a precise table format. Claude follows format instructions reliably.
# Force JSON output for automated processing
Analyze this timing report and return ONLY a JSON array.
No prose, no explanation — just the JSON.
Format:
[
{
"path_id": "string",
"startpoint": "string",
"endpoint": "string",
"slack_ns": float,
"root_cause": "logic_depth|fanout|routing|sdc",
"fix_priority": 1-5,
"recommended_fix": "string"
}
]
[paste timing report here]
# Force table output for review spreadsheet
Review this RTL and output a markdown table with columns:
| Line | Severity | Rule | Issue | Fix |
Severity levels: CRITICAL / WARNING / INFO
One row per issue found.
Fix: Break into 3–6 sequential prompts. The first ask should never produce the final artifact.
Fix: Always specify depth, width, clock type (sync/async), full/empty behavior, and target tool. Context = quality.
Fix: Always follow with "What could go wrong?" or "What did you not consider?" Claude's second pass often catches what the first missed.
Fix: Always say "Synopsys DC 2024", "VCS 2023.06", "PrimeTime 2024.03" — Claude knows version differences and will tailor advice.
Fix: Claude's RTL is ~90% correct but always simulate. Ask Claude to generate the testbench at the same time, and use the simulation results to refine.
Act as a senior VLSI design and verification engineer with 15 years of ASIC experience. CONTEXT: I am designing [MODULE NAME] for [PROJECT/CHIP] targeting [TECHNOLOGY NODE]. Tool flow: [list your tools]. Target clock: [frequency]. RTL standard: [Verilog 2001 / SystemVerilog 2012]. TASK: [Your specific ask] CONSTRAINTS: - Synthesizable only (no simulation-only constructs) - Non-blocking assignments in all clocked always blocks - Named begin/end blocks for readability - [Any other style rules] OUTPUT FORMAT: 1. Summary of what you found/did (3 sentences max) 2. Code/fixes (if applicable) 3. List of remaining concerns or edge cases I should verify Think step by step before answering. [PASTE YOUR CODE/REPORT HERE]
Act as a silicon-experienced debug engineer. SYMPTOM: [Exact description of the failure — waveform behavior, assertion, sim error] EXPECTED: [What should happen] ACTUAL: [What is happening] Step 1: Identify the top 3 most likely root causes ranked by probability Step 2: For each cause, describe what signal/line in the RTL to check Step 3: Suggest the minimum-diff fix that addresses the most likely cause Step 4: List one test vector that would confirm your hypothesis Here is the relevant RTL: [paste RTL]
Chain-of-thought prompting asks Claude to reason step-by-step before giving an answer. For VLSI, this means asking Claude to trace the logic path, identify intermediate signals, and explain each decision before writing code or suggesting a fix. It dramatically improves accuracy for complex timing and FSM problems.
Few-shot prompting means showing Claude 1–3 examples of the exact format you want before asking your real question. For VLSI, use it when you want RTL in a specific coding style, lint reports in a custom format, or Tcl scripts that match your team's conventions. One good example tells Claude more than paragraphs of description.
Use a system prompt + few-shot example together. In the system prompt, specify your coding standards (non-blocking assignments, naming conventions, 2-space indent). Then show one example module in your style before asking Claude to write a new one. Claude will match the format precisely.
Instead of asking for everything in one prompt, break work into steps and build on each response. Ask Claude to outline the design first, then generate the skeleton, then fill in one function at a time, then add assertions, then review for edge cases. Each step produces better results than a single monolithic request.
Use adversarial prompting: after Claude reviews your code, say "Play the role of a verification engineer trying to break this design — what edge cases would you test to find a bug?" This forces Claude to approach the problem from a completely different angle and often surfaces issues the initial review missed.