Sample assignment
Mod-10 counter
Instructions
Write a decade counter: it counts 0, 1, 2, ... 9 and then wraps back to 0.
- On each rising edge of
clk, ifrstis 1 the count becomes 0 (synchronous reset). - Otherwise, if
enis 1 the count goes up by one, wrapping from 9 to 0. - If
enis 0 the count holds.
Keep the module name and ports from the starter code.
Top module: counter10
What is graded
- Resets to 02 pts
- Counts up2 pts
- Wraps from 9 to 04 pts
- Holds when en is 02 pts
In a real assignment these tests are hidden: students see their names and points, and which ones pass.
Your design
Loading the editor…
Ctrl+Enter (or Cmd+Enter) also runs them. Press Esc, then Tab, to leave the editor.
Here the tests run in your browser and nothing is saved. In a real assignment, Submit grades on our server against tests the student never receives, and keeps every attempt with its code.