Codiode
All tracks
RTL · Beginner

Combinational RTL

Write synthesizable combinational logic in Verilog. Understand when synthesis infers a latch and how to prevent it.

What you will learn

Combinational RTL is the foundation of all synthesizable Verilog. This track covers:

  • always @(*) and always_comb
  • if-else chains, nested conditionals, case, casez, casex
  • unique case and priority case (SystemVerilog)
  • Priority vs. parallel logic and the synthesis difference
  • Incomplete case: Yosys auto-detects inferred latch
  • MUX, decoder, encoder, comparator and parity generator in RTL
  • Reduction operators
15 problems in 5 sections
15 problems in 5 sections
Section 1

The Combinational Procedural Block

2
01The Incomplete Sensitivity List FallbackRTL15 GE02Intermediate Variables in Combinational BlocksRTL15 GE
Section 2

Conditional Routing and Priority

2
03Priority Routing via If ElseRTL10 GE04Tristate Bus DriverRTL10 GE
Section 3

Case Statements and Don't Cares

1
05Instruction Decoder using CasezRTL15 GE
Section 4

Standard Combinational Structures

5
06Parameterized Equality ComparatorRTL10 GE07Decoder with Enable LogicRTL15 GE08Binary to Gray Code DatapathRTL10 GE09Find First One Priority EncoderRTL25 GE10Variable Indexed Part SelectRTL15 GE
Section 5

Synthesis Intuition and Hardware Mapping

5
11Signed Arithmetic and Sign ExtensionRTL25 GE12Bitwise versus Logical NegationRTL15 GE138-to-1 Multiplexer via Case StatementRTL10 GE14Cascaded 4-to-1 MultiplexerRTL10 GE15Packet Header FormatterRTL15 GE