Py4Hw User Guide> 3.1 Registers¶
Next: 3.2 Memories¶
Registers are the basic method to store data in digital logic. They typically store a bit. The simplest register (from a user perspective) is the D register. It stores a value in the input.
In [1]:
import py4hw
hw = py4hw.HWSystem()
d = hw.wire('d')
q = hw.wire('q')
py4hw.Sequence(hw, 'd', [0, 1, 0, 0], d)
py4hw.Reg(hw, 'reg', d=d, q=q)
wvf = py4hw.Waveform(hw, 'wvf', [d,q])
hw.getSimulator().clk(20)
wvf.draw_wavedrom()
Out[1]:
Summary¶
- There are registers
In [ ]: