Loading or Holding a Register

A register groups state bits so an update can store one multibit value together under a common control rule.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace load decisions
  2. Build a conceptual input path
  3. Compute next state from enable and data together
  4. Check priority when reset and load overlap

Trace load decisions

A four-bit register holding 0101 sees input 1100. If load is disabled at the relevant edge, it retains 0101. If enabled at a later valid edge, it stores 1100. Sequential logic supplies the prior state for the hold case.

Build a conceptual input path

A multiplexer can select between the previous value and the new input before the storage inputs. The selector then directly encodes whether the pending update uses new data.[1]

Compute next state from enable and data together

For a four-bit register holding 0011, a rising edge with enable low leaves 0011 even if the input reads 1010. With enable high at the next valid edge and data unchanged, the register becomes 1010. See multiplexer selection for one possible next-state implementation.

Edge    Enable   Data    Before   After
1          0     1010    0011     0011
2          1     1010    0011     1010
3          0     0000    1010     1010

Check priority when reset and load overlap

A register with reset may prioritize clearing over loading. State whether reset is synchronous or asynchronous and how it interacts with enable. Test simultaneous requests under the specified priority and verify all bits update together.

References

  1. Noam Nisan and Shimon Schocken, From Nand to Tetris: Course Projects ↩