Difficulty: Easy
Correct Answer: Apply the concept of a counter driven by a rising-edge detector to generate a fixed-width pulse.
Explanation:
Introduction / Context:
A one-shot (monostable) generates a single, time-limited pulse for each qualifying trigger. In HDL for FPGAs or CPLDs, this is accomplished digitally using logic and flip-flops, not analog RC components. The design must respond once per edge and produce a controlled pulse width in clock cycles.
Given Data / Assumptions:
Concept / Approach:
Use an edge detector to convert a rising transition into a one-clock strobe, then start a counter or timer that holds the output HIGH for a programmed number of cycles. This ensures exactly one output pulse per trigger edge, regardless of how long the trigger level persists.
Step-by-Step Solution:
Synchronize trigger with two flip-flops to avoid metastability.Edge detect: pulse_start = sync_trig and (not sync_trig_d1).When pulse_start = 1, load a down-counter with N (pulse width in cycles).While counter > 0, assert output and decrement each clock.When counter reaches 0, deassert output and re-arm for the next edge.
Verification / Alternative check:
Simulation with long trigger levels and closely spaced edges shows one output pulse per 0→1 transition and a consistent pulse width of N cycles. Hardware timing reports confirm that the logic is purely digital and synthesizable.
Why Other Options Are Wrong:
Common Pitfalls:
Failing to synchronize the trigger, neglecting edge detection (causing retriggers), or allowing retriggering while the pulse is active without explicit design intent.
Final Answer:
Apply the concept of a counter driven by a rising-edge detector to generate a fixed-width pulse.
Discussion & Comments