Difficulty: Easy
Correct Answer: Assigning signals under certain conditions
Explanation:
Introduction / Context:
Writing synthesizable HDL for data routing primitives like multiplexers (MUX) and demultiplexers (DEMUX) relies on correctly expressing conditional data movement. This ensures that tools infer efficient logic consistent with the intended selection behavior.
Given Data / Assumptions:
Concept / Approach:
Both MUX and DEMUX are fundamentally conditional assignments. A MUX selects one of many inputs to drive a single output based on select lines; a DEMUX routes one input to one of many outputs. In HDL, this is captured by conditional signal assignments (if/else or case) that map select values to the proper data path with defined defaults to avoid latches.
Step-by-Step Solution:
Verification / Alternative check:
Synthesis reports should show inferred multiplexers (e.g., LUT-based mux trees) or demultiplexing gates without latches. Simulation waveforms must match truth tables.
Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
Assigning signals under certain conditions.
Discussion & Comments