NELIX Silicon Lab Docs Launch Silicon Lab Launch Silicon Lab

Clocks and resets

What the clock and the reset do, the reset style this lab uses, and the mistakes to avoid.

Student 2 min read · Updated 2026-10-05

On this page The clockThe resetIn a testMistakes to avoidAn enable, not a second clock

The clock#

The clock is a signal that switches between 0 and 1 at a steady rate. Each rising edge is a tick on which every flip-flop updates. Nothing stored changes between ticks.

A clock. Every flip-flop updates on the rising edge.

The period is the time from one rising edge to the next. A 10 ns period is 100 MHz. The starters set it in openlane/config.json and constraints/clock.sdc.

The reset#

At power-up a flip-flop holds an unknown value. Reset forces every flip-flop into a known starting state.

The lab's starters use one style throughout: a reset named rst_n that is active low and asynchronous.

  • Active low: reset is in force when the signal is 0. The _n in the name says so.
  • Asynchronous: reset takes effect at once, without waiting for a clock edge.
systemverilog
always_ff @(posedge clk or negedge rst_n) begin
    if (!rst_n) acc <= '0;       // reset, immediately
    else if (en) acc <= acc + product;
end

The or negedge rst_n in the sensitivity list is what makes it asynchronous.

Reset in a real simulation: count is held at 0 while rst_n is low, whatever the clock does, and starts counting after it is released.

In a test#

A test must apply reset before it checks anything, and release it away from the active clock edge.

python
dut.rst_n.value = 0
await FallingEdge(dut.clk)
await FallingEdge(dut.clk)
dut.rst_n.value = 1

Mistakes to avoid#

MistakeWhy it is a problem
Setting state with an initial blockIt works in simulation and does nothing on a chip. Only reset sets state on silicon
Leaving a flip-flop out of the resetIt starts unknown, and the unknown spreads through the design in simulation
Making your own clock with logicThe new clock is not balanced by the tools. Use an enable instead
More than one clockSignals crossing between clocks need special care. The lab's flow supports one clock

An enable, not a second clock#

To make something happen every fourth cycle, do not divide the clock. Count, and use the count as an enable:

systemverilog
always_ff @(posedge clk or negedge rst_n) begin
    if (!rst_n)        slow <= '0;
    else if (tick_4th) slow <= slow + 1'b1;
end

Related

  • Clock tree synthesisDelivering the clock to every flip-flop at nearly the same moment.
  • Timing constraintsHow you tell the tools what "fast enough" means, and where that is written in a project.

Something unclear or missing? Send feedbackSign in and use Feedback to tell us.