<svg viewBox="0 0 760 470" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,Segoe UI,Roboto,sans-serif">
<rect x="0" y="0" width="760" height="470" fill="#0d1117"/>
<text x="380" y="28" fill="#e6edf3" font-size="21" font-weight="700" text-anchor="middle">Verilog — Hardware Description Language</text>
<text x="380" y="48" fill="#8b98a5" font-size="12" text-anchor="middle">describe digital circuits as code → synthesize to gates → manufacture as silicon</text>
<!-- === LEFT: Verilog code example === -->
<rect x="30" y="65" width="310" height="220" rx="6" fill="#080d14" stroke="#233043" stroke-width="1.2"/>
<text x="185" y="83" fill="#e6edf3" font-size="11" text-anchor="middle" font-weight="600">Verilog Code (RTL)</text>
<!-- Code block (monospace style) -->
<g font-size="8.5" fill="#8b98a5">
<text x="42" y="100" fill="#a78bfa" font-weight="600">module</text><text x="80" y="100" fill="#6ee7b7"> counter</text><text x="122" y="100">(</text>
<text x="52" y="114" fill="#a78bfa">input</text><text x="80" y="114"> clk, rst,</text>
<text x="52" y="128" fill="#a78bfa">output reg</text><text x="105" y="128"> [7:0] count</text>
<text x="42" y="142">);</text>
<text x="42" y="160" fill="#a78bfa" font-weight="600">always</text><text x="75" y="160"> @(</text><text x="87" y="160" fill="#fbbf24">posedge</text><text x="120" y="160"> clk)</text>
<text x="52" y="174" fill="#a78bfa">if</text><text x="64" y="174"> (rst)</text>
<text x="62" y="188"> count <= 8'b0;</text>
<text x="52" y="202" fill="#a78bfa">else</text>
<text x="62" y="216"> count <= count + 1;</text>
<text x="42" y="234" fill="#a78bfa" font-weight="600">endmodule</text>
</g>
<!-- Annotations -->
<line x1="260" y1="100" x2="300" y2="100" stroke="#a78bfa" stroke-width="0.5"/>
<text x="305" y="103" fill="#c4b5fd" font-size="7">module boundary</text>
<line x1="260" y1="160" x2="300" y2="160" stroke="#fbbf24" stroke-width="0.5"/>
<text x="305" y="163" fill="#fbbf24" font-size="7">clock edge trigger</text>
<line x1="260" y1="188" x2="300" y2="188" stroke="#34d399" stroke-width="0.5"/>
<text x="305" y="191" fill="#6ee7b7" font-size="7">non-blocking assign</text>
<text x="185" y="258" fill="#6b7684" font-size="8.5" text-anchor="middle">behavioral RTL — describes WHAT, not HOW</text>
<text x="185" y="272" fill="#6b7684" font-size="8" text-anchor="middle">synthesis tool decides gate-level implementation</text>
<!-- === RIGHT: Synthesized hardware === -->
<rect x="360" y="65" width="370" height="220" rx="6" fill="#080d14" stroke="#233043" stroke-width="1.2"/>
<text x="545" y="83" fill="#e6edf3" font-size="11" text-anchor="middle" font-weight="600">Synthesized Hardware (gates)</text>
<!-- 8-bit counter circuit -->
<!-- Flip-flops (8 of them) -->
<g>
<rect x="450" y="105" width="24" height="20" rx="2" fill="#2a1a0a" stroke="#f59e0b" stroke-width="0.8"/>
<text x="462" y="118" fill="#fbbf24" font-size="7" text-anchor="middle">FF</text>
<rect x="478" y="105" width="24" height="20" rx="2" fill="#2a1a0a" stroke="#f59e0b" stroke-width="0.8"/>
<text x="490" y="118" fill="#fbbf24" font-size="7" text-anchor="middle">FF</text>
<rect x="506" y="105" width="24" height="20" rx="2" fill="#2a1a0a" stroke="#f59e0b" stroke-width="0.8"/>
<text x="518" y="118" fill="#fbbf24" font-size="7" text-anchor="middle">FF</text>
<rect x="534" y="105" width="24" height="20" rx="2" fill="#2a1a0a" stroke="#f59e0b" stroke-width="0.8"/>
<text x="546" y="118" fill="#fbbf24" font-size="7" text-anchor="middle">FF</text>
<rect x="562" y="105" width="24" height="20" rx="2" fill="#2a1a0a" stroke="#f59e0b" stroke-width="0.8"/>
<text x="574" y="118" fill="#fbbf24" font-size="7" text-anchor="middle">FF</text>
<rect x="590" y="105" width="24" height="20" rx="2" fill="#2a1a0a" stroke="#f59e0b" stroke-width="0.8"/>
<text x="602" y="118" fill="#fbbf24" font-size="7" text-anchor="middle">FF</text>
<rect x="618" y="105" width="24" height="20" rx="2" fill="#2a1a0a" stroke="#f59e0b" stroke-width="0.8"/>
<text x="630" y="118" fill="#fbbf24" font-size="7" text-anchor="middle">FF</text>
<rect x="646" y="105" width="24" height="20" rx="2" fill="#2a1a0a" stroke="#f59e0b" stroke-width="0.8"/>
<text x="658" y="118" fill="#fbbf24" font-size="7" text-anchor="middle">FF</text>
</g>
<text x="555" y="100" fill="#fbbf24" font-size="8" text-anchor="middle">8 flip-flops (count[7:0])</text>
<!-- Adder -->
<rect x="480" y="145" width="100" height="30" rx="3" fill="#14261f" stroke="#34d399" stroke-width="1"/>
<text x="530" y="163" fill="#6ee7b7" font-size="9" text-anchor="middle">+1 Adder</text>
<!-- MUX (reset) -->
<path d="M420,140 L420,175 L445,157 Z" fill="#1c1633" stroke="#a78bfa" stroke-width="0.8"/>
<text x="432" y="160" fill="#c4b5fd" font-size="7" text-anchor="middle">M</text>
<text x="405" y="148" fill="#8b98a5" font-size="7" text-anchor="end">0</text>
<text x="405" y="168" fill="#8b98a5" font-size="7" text-anchor="end">+1</text>
<text x="405" y="185" fill="#f87171" font-size="7" text-anchor="end">rst</text>
<!-- Connections -->
<line x1="445" y1="157" x2="450" y2="115" stroke="#8b98a5" stroke-width="0.6"/>
<line x1="530" y1="145" x2="530" y2="125" stroke="#34d399" stroke-width="0.6"/>
<!-- Clock input -->
<line x1="380" y1="115" x2="448" y2="115" stroke="#fbbf24" stroke-width="0.8"/>
<text x="385" y="110" fill="#fbbf24" font-size="7">clk →</text>
<!-- Arrow showing synthesis flow -->
<path d="M340,170 L358,170" fill="none" stroke="#f87171" stroke-width="1.5"/>
<polygon points="356,167 362,170 356,173" fill="#f87171"/>
<text x="349" y="160" fill="#f87171" font-size="7.5" text-anchor="middle">synth</text>
<!-- The design flow -->
<text x="545" y="198" fill="#8b98a5" font-size="8.5" text-anchor="middle">RTL → Synthesis → Gate netlist → P&R → GDSII → Fab</text>
<!-- Key concepts in Verilog -->
<text x="545" y="220" fill="#e6edf3" font-size="9" text-anchor="middle" font-weight="600">Key Constructs</text>
<text x="390" y="236" fill="#a78bfa" font-size="8.5">always @(posedge clk)</text><text x="540" y="236" fill="#6b7684" font-size="8">→ flip-flop</text>
<text x="390" y="250" fill="#a78bfa" font-size="8.5">assign y = a & b;</text><text x="540" y="250" fill="#6b7684" font-size="8">→ combinational (AND gate)</text>
<text x="390" y="264" fill="#a78bfa" font-size="8.5">wire / reg</text><text x="540" y="264" fill="#6b7684" font-size="8">→ signal types</text>
<text x="390" y="278" fill="#a78bfa" font-size="8.5">module / endmodule</text><text x="540" y="278" fill="#6b7684" font-size="8">→ hierarchy boundary</text>
<!-- === BOTTOM: SystemVerilog + ecosystem === -->
<rect x="30" y="295" width="700" height="70" rx="5" fill="#0b1220" stroke="#233043" stroke-width="1"/>
<text x="380" y="313" fill="#e6edf3" font-size="10" text-anchor="middle" font-weight="600">Verilog Ecosystem</text>
<text x="110" y="335" fill="#60a5fa" font-size="9" text-anchor="middle" font-weight="600">Verilog (1984)</text>
<text x="110" y="349" fill="#6b7684" font-size="8" text-anchor="middle">original HDL</text>
<text x="265" y="335" fill="#c4b5fd" font-size="9" text-anchor="middle" font-weight="600">SystemVerilog</text>
<text x="265" y="349" fill="#6b7684" font-size="8" text-anchor="middle">design + verification</text>
<text x="265" y="361" fill="#6b7684" font-size="7.5" text-anchor="middle">classes, assertions, UVM</text>
<text x="420" y="335" fill="#34d399" font-size="9" text-anchor="middle" font-weight="600">VHDL</text>
<text x="420" y="349" fill="#6b7684" font-size="8" text-anchor="middle">alternative (EU/defense)</text>
<text x="560" y="335" fill="#fbbf24" font-size="9" text-anchor="middle" font-weight="600">Chisel/SpinalHDL</text>
<text x="560" y="349" fill="#6b7684" font-size="8" text-anchor="middle">Scala/Python generators</text>
<text x="690" y="335" fill="#8b98a5" font-size="9" text-anchor="middle" font-weight="600">HLS (C++→RTL)</text>
<text x="690" y="349" fill="#6b7684" font-size="8" text-anchor="middle">Catapult, Vitis</text>
<!-- Tools -->
<rect x="30" y="375" width="700" height="40" rx="4" fill="#0b1220" stroke="#233043" stroke-width="1"/>
<text x="380" y="393" fill="#e6edf3" font-size="9.5" text-anchor="middle" font-weight="600">Toolchain: Synopsys VCS/DC, Cadence Xcelium/Genus, Mentor Questa, open: Verilator, Yosys, iverilog</text>
<text x="380" y="409" fill="#8b98a5" font-size="9" text-anchor="middle">Every GPU, CPU, AI chip, phone SoC starts as Verilog — millions of lines compiled into billions of transistors</text>
<!-- Footer -->
<text x="380" y="438" fill="#fbbf24" font-size="9.5" text-anchor="middle">H100: ~tens of millions of lines of SystemVerilog. Apple M4: similar. Designed by teams of 100-1000+ engineers.</text>
<text x="380" y="462" fill="#6b7684" font-size="11" text-anchor="middle">Verilog is the programming language for hardware — but instead of instructions, it compiles to physical gates.</text>
</svg>
```ster-transfer level (RTL) is the abstraction at which digital chips are designed. Rather than drawing individual transistors or gates, an engineer describes the circuit as a set of registers that hold state and the combinational logic that computes each register's next value, with everything advancing on the edge of a clock. This description is written in a hardware description language such as Verilog, SystemVerilog, or VHDL, and it is the golden model that a design is simulated, verified, and signed off against before any gates exist. Synthesis then compiles the RTL into a physical gate-level netlist.\n\n**RTL captures behavior as state plus logic, timed by a clock.** The mental model is simple: registers (flip-flops) remember values, and between them sit clouds of combinational logic that transform those values. On each rising clock edge every register latches the result the logic computed during the cycle, so a design is a network of register-to-register paths. Writing at this level lets an engineer specify what the hardware does each cycle without hand-placing gates, which is why RTL, not schematics, has been the entry point for essentially all large digital design since the 1990s. The clock period must be long enough for the slowest logic path between two registers to settle.\n\n**It is a language and a synthesizable subset, not free-form code.** RTL is expressed in an HDL, but only a subset of the language actually maps to hardware. Constructs like clocked always-blocks, continuous assignments, and case statements describe real registers and multiplexers; other constructs (delays, file I/O, unbounded loops) exist only for the testbench that stimulates and checks the design in simulation. Verilog and its superset SystemVerilog dominate in industry, with VHDL common in aerospace and Europe. Discipline about the synthesizable subset is what keeps the simulated behavior and the synthesized silicon identical — the whole point of designing at RTL.\n\n| Level | What you describe | Example |\n|---|---|---|\n| Behavioral | the algorithm, untimed | a C-like model |\n| RTL | registers + logic per clock | Verilog always-block |\n| Gate netlist | interconnected cells | AND, MUX, flip-flop |\n| Transistor/layout | physical devices, masks | standard-cell layout |\n| Verified at | RTL (the golden source) | simulation, assertions |\n| Compiled by | synthesis → netlist | Design Compiler, Genus |\n\n```svg\n<svg viewBox="0 0 1000 500" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif">\n <rect x="0" y="0" width="1000" height="500" rx="14" fill="#1d1c1a"/>\n <text x="36" y="38" fill="#e8e6f7" font-size="20" font-weight="600">RTL — describe hardware as registers and the logic between them, clocked</text>\n\n <text x="250" y="70" fill="#c9c3f2" font-size="14" text-anchor="middle">Where RTL sits in the abstraction ladder</text>\n <rect x="70" y="92" width="300" height="46" rx="6" fill="#252334" stroke="#5b4fc4" stroke-width="1.4"/><text x="220.0" y="113.0" fill="#c9c3ff" font-size="12" text-anchor="middle">Behavioral / algorithm</text><text x="220.0" y="128.0" fill="#8a8a86" font-size="13" text-anchor="middle">what it computes (C-like, untimed)</text><line x1="220" y1="138" x2="220" y2="160" stroke="#8a8a86" stroke-width="1.4" marker-end="url(#rtar)"/><rect x="70" y="160" width="300" height="46" rx="6" fill="#2b2456" stroke="#7d70e0" stroke-width="1.4"/><text x="220.0" y="181.0" fill="#c9c3ff" font-size="12" text-anchor="middle">RTL (register-transfer)</text><text x="220.0" y="196.0" fill="#8a8a86" font-size="13" text-anchor="middle">registers + logic, per clock</text><rect x="66" y="156" width="308" height="54" rx="8" fill="none" stroke="#7d70e0" stroke-width="2.2"/><text x="384" y="180" fill="#7d70e0" font-size="12">design entry</text><text x="384" y="194" fill="#8a8a86" font-size="13">& sign-off</text><line x1="220" y1="206" x2="220" y2="228" stroke="#8a8a86" stroke-width="1.4" marker-end="url(#rtar)"/><text x="232" y="222" fill="#3f9d6f" font-size="12">synthesis</text><rect x="70" y="228" width="300" height="46" rx="6" fill="#16352b" stroke="#3f9d6f" stroke-width="1.4"/><text x="220.0" y="249.0" fill="#bff0e4" font-size="12" text-anchor="middle">Gate-level netlist</text><text x="220.0" y="264.0" fill="#8a8a86" font-size="13" text-anchor="middle">AND/OR/flip-flop cells + wires</text><line x1="220" y1="274" x2="220" y2="296" stroke="#8a8a86" stroke-width="1.4" marker-end="url(#rtar)"/><text x="232" y="290" fill="#c98a2e" font-size="12">place & route</text><rect x="70" y="296" width="300" height="46" rx="6" fill="#2a2418" stroke="#c98a2e" stroke-width="1.4"/><text x="220.0" y="317.0" fill="#f0d9b5" font-size="12" text-anchor="middle">Transistor / layout</text><text x="220.0" y="332.0" fill="#8a8a86" font-size="13" text-anchor="middle">physical masks, silicon</text><defs><marker id="rtar" markerWidth="9" markerHeight="9" refX="6" refY="4.5" orient="auto"><path d="M1,1 L7,4.5 L1,8" fill="none" stroke="#8a8a86" stroke-width="1.3"/></marker></defs>\n\n <line x1="500" y1="58" x2="500" y2="372" stroke="#3a3a37" stroke-width="1.2" stroke-dasharray="4 4"/>\n\n <text x="750" y="70" fill="#c9c3f2" font-size="14" text-anchor="middle">What an RTL block actually is</text>\n <rect x="560" y="150" width="46" height="52" rx="4" fill="#2b2456" stroke="#7d70e0" stroke-width="1.4"/><text x="583" y="172" fill="#c9c3ff" font-size="12" text-anchor="middle">D Q</text><text x="583" y="186" fill="#8a8a86" font-size="12" text-anchor="middle">reg</text><path d="M560,190 l6,-5 l-6,-5 z" fill="none" stroke="#e0913a" stroke-width="1.2"/><line x1="606" y1="176" x2="636" y2="176" stroke="#8a8a86" stroke-width="1.3" marker-end="url(#rtar)"/><path d="M644,178 q-8,-2 -8,-11 q0,-11 12,-11 q3,-9 15,-9 q10,0 14,7 q12,-3 12,9 q0,13 -12,13 q-3,6 -14,6 q-11,0 -14,-6 q-9,1 -9,-8 z" fill="#16352b" stroke="#3f9d6f" stroke-width="1.3"/><text x="654" y="164" fill="#bff0e4" font-size="12" text-anchor="middle">logic</text><line x1="706" y1="176" x2="736" y2="176" stroke="#8a8a86" stroke-width="1.3" marker-end="url(#rtar)"/><rect x="736" y="150" width="46" height="52" rx="4" fill="#2b2456" stroke="#7d70e0" stroke-width="1.4"/><text x="759" y="172" fill="#c9c3ff" font-size="12" text-anchor="middle">D Q</text><text x="759" y="186" fill="#8a8a86" font-size="12" text-anchor="middle">reg</text><path d="M736,190 l6,-5 l-6,-5 z" fill="none" stroke="#e0913a" stroke-width="1.2"/><line x1="782" y1="176" x2="812" y2="176" stroke="#8a8a86" stroke-width="1.3" marker-end="url(#rtar)"/><path d="M820,178 q-8,-2 -8,-11 q0,-11 12,-11 q3,-9 15,-9 q10,0 14,7 q12,-3 12,9 q0,13 -12,13 q-3,6 -14,6 q-11,0 -14,-6 q-9,1 -9,-8 z" fill="#16352b" stroke="#3f9d6f" stroke-width="1.3"/><text x="830" y="164" fill="#bff0e4" font-size="12" text-anchor="middle">logic</text><line x1="882" y1="176" x2="905" y2="176" stroke="#8a8a86" stroke-width="1.3" marker-end="url(#rtar)"/><rect x="905" y="150" width="46" height="52" rx="4" fill="#2b2456" stroke="#7d70e0" stroke-width="1.4"/><text x="928" y="172" fill="#c9c3ff" font-size="12" text-anchor="middle">D Q</text><text x="928" y="186" fill="#8a8a86" font-size="12" text-anchor="middle">reg</text><path d="M905,190 l6,-5 l-6,-5 z" fill="none" stroke="#e0913a" stroke-width="1.2"/><line x1="555" y1="230" x2="955" y2="230" stroke="#e0913a" stroke-width="1.6"/><text x="555" y="246" fill="#e0913a" font-size="12">clk</text><line x1="583" y1="202" x2="583" y2="230" stroke="#e0913a" stroke-width="1.1"/><line x1="759" y1="202" x2="759" y2="230" stroke="#e0913a" stroke-width="1.1"/><line x1="928" y1="202" x2="928" y2="230" stroke="#e0913a" stroke-width="1.1"/><text x="670" y="136" fill="#8a8a86" font-size="12" text-anchor="middle">combinational path</text><text x="758" y="120" fill="#3f9d6f" font-size="12" text-anchor="middle">register → register = 1 clock cycle</text><rect x="558" y="270" width="384" height="72" rx="6" fill="#151512" stroke="#333330" stroke-width="1"/><text x="572" y="290" fill="#7d70e0" font-size="12" font-family="monospace">always @(posedge clk)</text><text x="592" y="308" fill="#bff0e4" font-size="12" font-family="monospace">q <= a & b | c; // next-state logic</text><text x="572" y="328" fill="#8a8a86" font-size="13" font-family="monospace">// a register updated from logic, each clock edge</text>\n\n <text x="70" y="414" fill="#f0d9b5" font-size="12.5">Register-transfer level describes a circuit as state-holding registers and the combinational logic that computes each</text>\n <text x="70" y="433" fill="#d4d4d0" font-size="12">register’s next value, all advancing on a clock edge. Engineers write it in Verilog, SystemVerilog, or VHDL; it is the golden</text>\n <text x="70" y="458" fill="#8a8a86" font-size="13">source a design is verified and signed off at. Synthesis then compiles this behavior into a gate-level netlist, so RTL is the</text>\n <text x="70" y="477" fill="#8a8a86" font-size="13">contract between what the hardware should do and the physical cells that implement it — abstract enough to reason about, precise enough to build.</text>\n</svg>\n```\n\n**RTL is the contract the rest of the flow depends on.** Because it is the level at which function is defined and verified, RTL sits at the top of the implementation flow: synthesis turns it into gates, place-and-route gives those gates physical locations and wires, static timing analysis checks that every register-to-register path meets the clock, and design-for-test adds structures to screen manufactured parts. Bugs are far cheaper to fix in RTL than after layout, so enormous effort goes into RTL verification — simulation, assertions, coverage, and formal methods. The same RTL can target different process nodes or even FPGAs, which is why it is both the design's source of truth and its portability layer.\n\nRead RTL through a quant lens rather than a 'code for chips' lens: the number it governs is the clock period, set by the worst-case combinational delay between any two registers, so every design choice is really a bet about how much logic fits in one cycle. Add logic to a path and you either slow the clock or must pipeline by inserting another register; that register-to-register delay budget is what synthesis, placement, and timing analysis all spend their effort meeting. Designing at RTL means reasoning in registers-per-cycle rather than transistors, trading a small loss of hand-tuned density for the ability to describe, verify, and re-target billions of gates.
verilog basicsverilog hdlverilog languagehardware description language
Explore 500+ Semiconductor & AI Topics
From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.