12_GLS.md

Gate-Level Simulation — Logic After Reality Check


Purpose of This Chapter

Gate-Level Simulation (GLS) exists to answer one question only:

Does the synthesized, cell-level design still behave correctly?

RTL simulation proves intent.
GLS proves implementation.

If GLS fails, the design is not trustworthy, even if RTL passed.


What GLS Actually Verifies

GLS verifies:

GLS does not care about performance.
That is STA’s job.


RTL vs GLS: The Critical Difference

RTL Simulation

GLS

If something is ambiguous, GLS will expose it.


Why GLS Fails When RTL Passes

Common reasons:

RTL hides these. GLS does not.


Mandatory Inputs for GLS (sky130)

GLS will not work unless all of the following are present:

Missing even one guarantees failure.


The #1 GLS Failure: “Unknown Module”

Symptoms:

Cause:

This is not a Verilog bug. It is an environment bug.


The #2 GLS Failure: All-X Waveforms

Symptoms:

Causes:

GLS requires explicit reset discipline.


Reset Discipline Rules

In GLS:

If reset is optional, GLS will punish you.


Compile Order Is Not Optional

Correct order (example):

  1. UDP primitives
  2. standard-cell functional models
  3. gate-level netlist
  4. testbench

Any other order is wrong.

Icarus Verilog does not guess. Neither should you.


Functional vs Timing GLS

Functional GLS

Timing GLS (SDF)

Always start with functional GLS. Timing GLS comes later.


When GLS Is Mandatory

GLS is mandatory when:

Skipping GLS is a gamble. Silicon never forgives gambles.


When GLS Is Optional

GLS may be skipped only if:

Even then, skipping GLS is a decision — not an omission.


The GLS Mindset

If GLS fails:

Fix the design.

GLS is not wrong. Your assumptions are.


Why This Chapter Exists

Most OpenLane users fail at GLS.

Not because GLS is hard —
but because environments are broken and rules are ignored.

This guide exists so GLS becomes boring.


Next Chapter

Once GLS is clean: