CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Combinational Logic

The Incomplete Sensitivity List Fallback

MediumVerilog / SystemVerilogBuild

A 2-to-1 multiplexer routes one of two data inputs to a single output based on a select signal.

Expected behavior:

| Sel | A | B | Y | |-------|-----|-----|-----| | 0 | 0 | 0 | 0 | | 0 | 0 | 1 | 0 | | 0 | 1 | 0 | 1 | | 0 | 1 | 1 | 1 | | 1 | 0 | 0 | 0 | | 1 | 1 | 0 | 0 | | 1 | 0 | 1 | 1 | | 1 | 1 | 1 | 1 |

Simulation shows Y = 0 when transitioning to input Sel=1, A=0, B=1 from a previous state of Sel=0, A=0, B=1. The output fails to update when only the select line toggles. Inspect the RTL and correct the fault.

Constraints

  • Use modern SystemVerilog constructs for combinational logic.
  • Do not use legacy Verilog-2001 sensitivity lists.

Topics

SystemVerilogRTLSimulation

Solve this problem

Write the module in Verilog, SystemVerilog or VHDL. Your submission is compiled and simulated against a real testbench — you get the waveform back, not a stored answer.

This problem is part of Codiode Pro. The statement above is free to read.

Sign in to solveSee what Pro unlocks

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Related problems

  • Single Continuous AssignmentEasy
  • Basic Vector ConcatenationEasy
  • Ternary Operator MuxEasy
  • Underscores for ReadabilityEasy
  • Left Hand Side ConcatenationEasy
  • Inout Port MechanicsEasy
  • Explicit Binary LiteralsEasy
  • Vector Port EndiannessEasy

Browse all problems · Learning tracks