S3.14.1 When Is the Bit Lost

MediumImplement22 minIcarus Verilog · serverReview the topic

Follow the charge of a DRAM cell tick by tick, find its refresh interval, and work out what refresh costs a small memory.

Hardware context: One row of DRAM cells, each a charge that leaks, as test code. Planning refresh for a DRAM in every state of a chip

In this exercise a DRAM cell that holds a 1 is written with a charge of 12. One unit of charge leaks away in each tick. A read sees a 1 when the charge is 5 or more. A refresh reads a row and writes back what it read, at full charge. A cell that holds a 0 has no charge. All values are exercise values.

This worksheet uses named constants. The first three entries show how to record your decisions.

Signals in the Timeline

SignalWidthRole
question8input of each check
Full specification

Enter charges and counts as whole numbers. Enter a bit as 1 or 0.

EntryYour decision
CHARGE_AT_3A 1 is written at tick 0. What is the charge at tick 3?
READS_AT_3What does a read see at tick 3: 1 or 0?
INTERVALWhat is the refresh interval: the longest wait, in ticks, after which the cell still reads as 1?
CHARGE_AT_7With no refresh, what is the charge at tick 7?
CHARGE_AT_8With no refresh, what is the charge at tick 8?
REFRESH_AT_6A refresh comes at tick 6. What is the charge just after it?
WRONG_BITSA row holds 1011. Its first refresh comes at tick 8. How many of its four bits are wrong afterwards?
REFRESHESA row is refreshed every 7 ticks, the first time at tick 7. How many refreshes does it get up to and including tick 56?
BUSY_TICKSAnother memory has 16 rows and a refresh interval of 64 ticks. A refresh of one row keeps the memory busy for 1 tick. How many ticks of every 64 are spent on refresh?
BUSY_PERCENTWhat percent of the time is that memory busy with refresh?
INTERVAL_VARIANTNow the sense level is SENSE, from 1 to 12, and a 1 is still written with a charge of 12. Give the refresh interval in ticks.

Examples

Example 1

CHARGE AT 3
Input
A 1 is written at tick 0. What is the charge at tick 3?
Output
matches = 1

Three units have leaked: 12 less 3 is 9.

Example 2

READS AT 3
Input
What does a read see at tick 3: 1 or 0?
Output
matches = 1

A charge of 9 is above the sense level of 5.

Example 3

INTERVAL
Input
What is the refresh interval: the longest wait, in ticks, after which the cell still reads as 1?
Output
matches = 1

The charge may fall from 12 to 5, which takes 7 ticks.

Constraints and Contract

  • Keep the parameter and named constants. Use the numeric codes and units on this page.
  • For INTERVAL_VARIANT, enter a constant expression using SENSE. Only this entry changes with the parameter. The supported integer range is 1 through 12, inclusive.

Hints

Hint 1

Write the charge under each tick, starting from the full charge.

Hint 2

A charge equal to the sense level still reads as 1. One unit less reads as 0.

Hint 3

A refresh writes back what it reads, whether that is right or wrong.

What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.

11 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 1 problem on this path

Report a problem with this page

Your code SystemVerilogSaved locally
Ln 1, Col 1Tab indents · Ctrl/⌘ + Enter runs samples
Not run yet

CHARGE AT 3

Input
A 1 is written at tick 0. What is the charge at tick 3?
Expected output
matches = 1

Three units have leaked: 12 less 3 is 9.

Run samples executes all 3 public checks. Check all tests runs 11 checks on the server.

Icarus Verilog · server