RTL Syntax Primer: What Circuit Does Each Line Build?
Read fifteen common SystemVerilog constructs, see the circuit each one builds, and check good and bad versions with simulation and synthesis.
MY ACADEMY · TOPIC
Build a multiplexer, implement an AES core, study anti-tampering or look up a circuit element.
35 articles
Open the learning path and progress →Read fifteen common SystemVerilog constructs, see the circuit each one builds, and check good and bad versions with simulation and synthesis.
Build a one-bit mux for two sensor flags. Learn modules, ports, instances and continuous assignment, then run simulation and synthesis. Includes a lesson film, an interactive model and runnable RTL.
Follow an eight-bit sensor value through hexadecimal, truncation, two’s complement and a real sign-extension bug, with a bilingual film, bit inspector and runnable RTL.
Compare bitwise and logical operators, then test exactly which sensor formats a channel accepts.
Follow a three-channel selector and trace the retained output of an incomplete assignment.
Trace carry in a four-bit sum, then compare a reading with a signed offset.
Build a channel bank at three sizes and test the boundary between a valid selector and an unused code.
Follow a sensor result through sampling, holds and synchronous reset.
Trace three samples through two registers and compare the values before and after each edge.
Count accepted samples across idle cycles and find the edge that completes a batch of four.
Follow a collector from idle through sampling to reporting and identify the event that moves each state.
Hold one result through three stalled cycles, then trace the old and new words during a simultaneous handoff.
Build an expected queue from accepted transactions and test whether it catches losses, duplicates, reordering and stalled-data corruption.
Trace valid and data through both designs and budget the setup time of each pipeline stage.
Change the sampling phase and follow a pulse and a held request across two clock domains.
Check a stalled output across edges and use cover to see if the test reached that condition.
Assemble a collector and check each delivery from its interface history in a reproducible handoff.
Build an iterative AES-128 core for a sensor block. Align data and round keys, define accepted transfers, hold ciphertext under backpressure, and debug against NIST intermediate values.
Build a SHA-256 core for a firmware digest. Follow padded blocks, retained chaining state, 64 rounds and final delivery, with reference traces for debugging each stage.
A correct signature result can change before it reaches the CPU. Follow the stored decision to accepted fetches, state a fault model, and separate timely blocking from later alerts.
A bit flip that misses a request is not evidence of a defense. Define storage, timing, recovery and trust assumptions, then interpret 42 reproducible fault cases.
Can extra check bits stop a failed boot check from becoming permission? Compare parity, complementary encoding and SECDED, then examine miscorrection and blocking before acceptance.
The failed image from lesson 3 still needs a closed fetch gate. This time, the verifier sends four bits instead of one. The receiver must decide which of sixteen values means permission. That decision matters as much as the encoder.
Three verifiers vote to release the same failed image. One corrupted replica can be outvoted. A shared wrong input can make all three vote yes. Before counting copies, draw what they share.
A controller must observe four completed transfers before releasing a result. Its up counter says four and its down counter says zero. Their sum is still four. Only three transfers actually occurred. A shared enable has advanced both counters together.
The controller is checking an unauthorized image. Its six-bit state changes from CHECK to RELEASE without a completed authorization. The new code is legal. A state decoder recognizes it and opens the gate. We first count which substitutions can do that.
CHECK-to-RELEASE is a legal arc. A fault changes the condition selecting it. Later, a token from transaction 1 is offered for transaction 2. Both requests can look structurally normal. We trace the evidence that should belong to each accepting event.
Software writes the same configuration twice. The shadow comparator sees a match and commits it. If both writes carry the same wrong value, the protocol still succeeds. We distinguish update consistency from permission to choose that value.
The receiver accepts a bad request at edge 2. Sticky records the error afterward, and the system resets later. The alert works, but it cannot withdraw the accepted request. We put detection and response beside the accepting edge.
Reset release is not one simultaneous instant across the chip. If permission crosses a clock domain or precedes startup checks, it may be used while the system appears to be booting.
A valid signature proves that a trusted key signed these bits. It does not by itself prove the version is acceptable, that the measured image is the one about to execute, or that a key is released in the right lifecycle.
Rejecting faulty output does not prove that a cryptographic implementation leaks no information. DFA uses correct-versus-faulty output differences; SIFA conditions on faulted computations that still return a correct output and analyzes statistical bias in an intermediate value.
A fault campaign is a reproducible experiment specification, not a few random bit flips followed by a percentage. It records design version, targets, timing, effects, budget, oracle, and what the model cannot simulate.
A simulated fault target has engineering value only when it maps to physical behavior. Calibration is not tuning RTL parameters until a fault “looks successful”; it compares target, window, effect, repeatability, and residual mismatch against traceable measurements.
A security conclusion must say what is protected, which faults are assumed, which boundaries were tested, which counterexamples remain, and what is unknown. An evidence package is not a pile of reports; it lets another engineer reproduce the result and see its limits.