Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • RTL Foundations36
  • Combinational Design25
  • Sequential Design27
  • FSM & Control27
  • Timing & Clocking39
  • Reset & CDC34
  • Memory & Buses57
  • Advanced RTL28
    • Parameterization and Generate Hub
    • Top-Level Integration Hub
    • Synthesis Intent Hub
      • Inference-focused coding style
      • Inferring flip-flops and RAM
      • Latch avoidance and case semantics
      • Reading a synthesis report
    • Style and Static Checks Hub
    • Assertions in RTL Hub
    • Formal Verification Basics Hub
    • Reusable SystemVerilog for RTL
  • Senior & Interview76
  • Glossary and Notation
Loading lesson

‹Advanced RTL
  1. Topics
  2. RTL Design
  3. Advanced RTL
  4. Synthesis Intent Hub

Part 8 · Advanced · Advanced

Synthesis Intent Hub

How to write RTL that synthesizes into the intended flops, RAMs and logic.

  • 4topics
  • 4lessons

Topics in this section

  1. 1Inference-focused coding style1 lesson
  2. 2Inferring flip-flops and RAM1 lesson
  3. 3Latch avoidance and case semantics1 lesson
  4. 4Reading a synthesis report1 lesson
On this page

    RTL defines storage and combinational semantics; supported templates make that intent recognizable to synthesis. Template compatibility does not guarantee a particular cell. Final resources depend on tool, target, size, ports, constraints and optimization; inspect mapping reports.

    Intended hardware

    Canonical shape

    Lesson

    Flip-flop with enable

    always_ff with reset first, then the enable guard

    Inference-focused coding style

    Synchronous RAM

    Array, clocked write, registered read

    Inferring flip-flops and RAM

    Combinational logic

    Full assignment on every path

    Latch avoidance and case semantics

    Lessons in this topic

    4 lessons, about 23 min

    1. 1Inference-focused coding styleYou can write reset, enable and memory logic in the canonical templates, and investigate a netlist difference by comparing function, supported cells and constraints.4 min
    2. 2Inferring flip-flops and RAMYou can write a flip-flop with enable and a synchronous RAM with a stated collision policy, and explain why q trails d by one cycle.5 min
    3. 3Latch avoidance and case semanticsYou can assign every output on every path, choose between plain, unique and priority case, and explain why `full_case` and `parallel_case` are left out.5 min
    4. 4Reading a synthesis reportYou can read a Yosys log for latches, driver conflicts, undriven outputs, constant and removed flops, and check the flop count in stat against a count made from the RTL.9 min
    Check yourself A synthesis report shows thousands of flip-flops where a RAM was expected. What do you investigate?

    Compare the array's depth, width, read latency, reset and port/collision requirements with the selected target's supported memory templates. Array reset or unsupported ports may prevent memory mapping. Asynchronous reads can use LUT RAM on supported FPGAs, though they are incompatible with many synchronous block RAMs. Read the inference diagnostics and mapped resource counts before changing RTL.

    Interview

    Likely question: “What makes a RAM infer as a block RAM?”

    • Selected target's template: many FPGA block RAMs need synchronous reads, no array reset, and supported port counts.

    • Read-during-write mode and dimensions the target block supports.

    • Confirm in the synthesis report that a memory cell was built.

    Revision sheet

    The whole topic on one page, taken from each lesson's Remember box. Read it before an interview, or print it.

    Inference-focused coding style

    • Reset priority, the hold path and the arithmetic width set the hardware; the number of processes does not.

    • Both counters map to the same 23 iCE40 cells: 8 enable flops, 9 LUTs and 6 carry cells.

    • Compare reports under the same tool version, target and options before drawing a PPA conclusion.

    Rule of thumb: write the template the tool recognises, then check the report.

    Inferring flip-flops and RAM

    • A clocked process infers storage; reset comes first, then the enable guard.

    • Many block RAMs need synchronous reads, no array reset and supported port counts.

    • State the collision policy: a same-cycle write and read returns the old word, and the new word shows in a later read.

    Rule of thumb: choose the latency and resource first, then write the template that maps to it.

    Latch avoidance and case semantics

    • Assign a default before the branch, or add the missing branch; otherwise a latch is inferred.

    • Plain case with a default is the safe choice, and an X or Z select lands in the default.

    • Unique and priority add match-count diagnostics and synthesis assumptions; a default removes the no-match check, not unique's overlap check.

    Rule of thumb: every output gets a value on every path before the case starts.

    Reading a synthesis report

    • Latch and driver warnings come early, in proc and check. The final check can report 0 problems after the optimiser has hidden them.

    • A removed or constant flop gives no warning: look for D = Q and constant-bit messages, and compare the flop count with your own.

    • Run check -assert straight after proc so driver problems fail the run instead of scrolling past.

    Rule of thumb: count the flops in the RTL before you open stat; a different number is a bug until it is explained.

    Practise it

    • Mini project: a reusable FIFO IP with package, interface, assertions and a formal check

    • Practice question: Parameterised single-port synchronous RAM

    • Code lab: SRAM model 16x8

    • Practice question: Incomplete case and unique0: simulation versus synthesis

    • Practice question: Level-sensitive latch: when it is risky

    • Interview: run a mock interview on this topic

    How this was checked

    The example benches are finite digital checks. Executed with Icarus Verilog 13.0 (2026-10-16): each prints PASS. The synthesis-report lesson shows real Yosys output on generic cells; no formal, sign-off timing or physical measurements are reported here.

    PreviousNext: Inference-focused coding style

    Up next

    Up nextInference-focused coding style

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Parameterization and Generate Hub
    • Top-Level Integration Hub
    • Style and Static Checks Hub