The first boot works only at one clock phase. Repair the logic that remembers readiness, events and board selection.
Hardware context: The I/O and startup adapters of a small SoC board. Check clock gating, reset release, event transfer, DMA pacing and strap capture across two boots.
The first boot works only at one clock phase. Repair the logic that remembers readiness, events and board selection.
The starter has one defect at each of five boundaries. Repair the adapter without changing its ports.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
plan_index | 3 | input of each check |
Full specification
| Boundary | Required behavior |
|---|---|
| Transmit clock | On each falling edge, enable the clock if a start or busy indication is high. Hold through the rising edge. |
| Core release | On a rising edge with both fabric and ROM ready, raise core_up. Hold it until reset. |
| Event crossing | The source toggles once per event and holds each value for at least four receiving edges. |
| Event pulse | Sample through two rising-edge stages. Pulse for one cycle when the second stage changes in either direction. |
| DMA | An active memory copy can take a byte immediately. An active device copy also requires device_req. The grant is combinational. |
| Boot strap | Save strap_pin at the first rising edge with sample_pin high. Ignore every later sample until reset. |
| Reset | An active-low asynchronous reset clears all stored state. The grant follows its inputs throughout reset. |
Examples
Example 1
Four Receiving Edges- Input
Hold each toggle value for four rising edges. Boot twice with opposite strap values.
- Output
clock = 1, release = 1, event = 1, grant = 1, strap = 1
Each bit stays high while its boundary agrees with the board contract.
Example 2
Five Receiving Edges- Input
Hold each toggle value for five rising edges. Reverse which strap value is sampled first.
- Output
clock = 1, release = 1, event = 1, grant = 1, strap = 1
Changing input order must preserve each of the five agreements.
Example 3
Six Receiving Edges- Input
Space toggle transitions six rising edges apart and vary device requests during the copy.
- Output
clock = 1, release = 1, event = 1, grant = 1, strap = 1
Changing input order must preserve each of the five agreements.
Constraints and Contract
- Keep the module name and every port.
- A zero result bit identifies a boundary that failed at least one observation.
- The five result bits follow the boundaries in order, most significant first.
Hints
Hint 1
Mark which decisions belong to a falling edge and which belong to a rising edge.
Hint 2
Compare consecutive synchronized samples to detect either toggle direction.
Hint 3
Remember that a strap was sampled even when its value was zero.
What the grader checks: The private bench checks both clock edges and the interval between them across two resets per sequence. It models digital sampling.
8 checks on Icarus Verilog · server. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain your source only; samples require the simulation service. A passing result establishes the tested cases, not a proof for all possible inputs.
See all 2 problems on this path