G8.5.2 Pick the Nonvolatile Memory

EasyImplementIcarus · browser samples / server checksReview the topic

Name the nonvolatile memory family that fits each of eight products, from how it is written, erased and read.

Hardware context: A settings store in a small flash memory, one byte per setting. Choose mask ROM, PROM, EPROM, EEPROM, NOR or NAND flash for a product from how it is written, erased and read.

Each family of nonvolatile memory fits some jobs and not others. The deciding questions are few. Who writes it? What erases it, and how much at once? Is it read a word at a time or a page at a time?

This is an Implement problem with no logic to write. For each product, set its constant to the code of the family that fits best. Three products are worked below and already in the starter.

Signals in the Timeline

SignalWidthRole
item8input of each check
Full specification
CodeFamily
0mask ROM
1PROM
2EPROM
3EEPROM
4NOR flash
5NAND flash
ConstantProduct need
game_romA game console runs fixed code that never changes. The factory makes a million consoles.
calibrationA sensor keeps 16 calibration bytes. Each byte is updated on its own, in the field, a few times a year.
ssdA solid-state drive stores many gigabytes of files and is read and written a page at a time.
boot_codeA microcontroller runs its program straight from the memory, one instruction at a time. It gets a new program once a year.
board_idTwo hundred boards each get a serial number at the factory. It is written once and never changed. The run is too small to pay for a mask.
prototypeAn old prototype has a chip with a quartz window. The developer erases it under a lamp, then writes the next version.
camera_cardA camera stores photos on a cheap card of many gigabytes.
odometerA car keeps a few counter bytes that change many times a day, each byte on its own. They must survive power loss.

Worked: game_rom is 0, because fixed code at high volume costs least as a mask ROM. calibration is 3, because only EEPROM erases a single byte in the circuit. ssd is 5, because NAND flash is the densest and is read by page.

The module you fill in (keep the name and the outputs)
// answer: the family code of each product, as constants.
//   0 mask ROM   1 PROM   2 EPROM   3 EEPROM   4 NOR flash   5 NAND flash
module answer (
  output logic [2:0] game_rom,
  output logic [2:0] calibration,
  output logic [2:0] ssd,
  output logic [2:0] boot_code,
  output logic [2:0] board_id,
  output logic [2:0] prototype,
  output logic [2:0] camera_card,
  output logic [2:0] odometer
);
  assign game_rom    = 3'd0;   // worked in the brief
  assign calibration = 3'd3;   // worked in the brief
  assign ssd         = 3'd5;   // worked in the brief
  assign boot_code   = 3'd0;
  assign board_id    = 3'd0;
  assign prototype   = 3'd0;
  assign camera_card = 3'd0;
  assign odometer    = 3'd0;
endmodule

Examples

Example 1

game_rom
Input
A game console runs fixed code that never changes. The factory makes a million consoles.
Output
game_rom = 0

The code never changes and the volume is high: a mask ROM, code 0.

Example 2

Calibration
Input
A sensor keeps 16 calibration bytes. Each byte is updated on its own, in the field, a few times a year.
Output
calibration = 3

Single bytes change in the field: EEPROM, code 3. Flash would erase a whole block for each change.

Example 3

Ssd
Input
A solid-state drive stores many gigabytes of files and is read and written a page at a time.
Output
ssd = 5

Gigabytes, written and read by page: NAND flash, code 5.

Constraints and Contract

  • Keep the module name answer and its eight outputs.
  • Each output is a code from 0 to 5.

Hints

Hint 1

First ask whether the memory is ever erased. If never, the choice is between a mask and a one-time write.

Hint 2

If it is erased in the circuit, ask how much changes at once: one byte, or a whole block.

Hint 3

For flash, ask how the code or data is read: one word at a time, or page by page.

What the grader checks: Each constant is compared with the family that the rules of lesson G8.5 give. Cost, endurance numbers and newer memories such as FRAM and MRAM are outside this problem.

8 checks on Icarus · browser samples / server checks. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain public samples only. A passing result establishes the tested cases, not a proof for all possible inputs.

See all 2 steps and the final capstone

Report a problem with this page

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

game_rom

Input
A game console runs fixed code that never changes. The factory makes a million consoles.
Expected output
game_rom = 0

The code never changes and the volume is high: a mask ROM, code 0.

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

Icarus · browser samples / server checks