BitFlow

Down Counter — Asynchronous (Ripple)

intermediate · sequential · 140 XP

Sign in to write your solution, run it in the simulator and submit it for grading.

Sign in or create a free account →

Problem

Down Counter — Asynchronous (Ripple) A **ripple down-counter** is the same as a ripple up-counter but each stage triggers on the **rising edge** (posedge) of the previous stage's output instead of the falling edge. **Why posedge = down?** - In an up-counter, Q toggles on the falling edge → Q goes 0→1 only when the lower bit falls 1→0 (carry propagation upward) - In a down-counter, Q toggles on the rising edge → Q goes 1→0 when the lower bit rises 0→1 (borrow propagation upward) **Interface** | Port | Direction | Width | Description | |-----------|-----------|-------|-----------------------------| | `clk` | input | 1 | Master clock | | `rst` | input | 1 | Async active-high reset (loads 0) | | `count[3:0]`| output | 4 | Current count (15 → 14 → ... → 0 → 15) | Stage 0 triggers on `posedge clk`. Stage N triggers on `posedge count[N-1]`.

Constraints

  • Use four always blocks, one per bit.
  • Each stage triggers on posedge of the previous output (not negedge).
  • rst is asynchronous.
  • After reset, count should start at 0 and count down (15, 14, 13...).

Examples

Input: clk cycle 1 (from 0)

Output: count=15

Input: clk cycle 2

Output: count=14

Common questions

What does the Down Counter — Asynchronous (Ripple) problem ask you to build?
Down Counter — Asynchronous (Ripple) A **ripple down-counter** is the same as a ripple up-counter but each stage triggers on the **rising edge** (posedge) of the previous stage's output instead of the falling edge.
What constraints does Down Counter — Asynchronous (Ripple) have?
Use four always blocks, one per bit.; Each stage triggers on posedge of the previous output (not negedge).; rst is asynchronous.; After reset, count should start at 0 and count down (15, 14, 13...).
What is an example input and output for Down Counter — Asynchronous (Ripple)?
Input clk cycle 1 (from 0) gives output count=15.
Which Verilog concepts does Down Counter — Asynchronous (Ripple) practise?
sequential, counter, down, async, ripple.