MCPcopy Create free account
hub / github.com/djhworld/simple-computer / Update

Method Update

components/stepper.go:63–74  ·  view source on GitHub ↗
(clockIn bool)

Source from the content-addressed store, hash-verified

61}
62
63func (s *Stepper) Update(clockIn bool) {
64 s.clockIn.Update(clockIn)
65 s.reset.Update(s.outputs[6].Get())
66
67 s.step()
68
69 // reset is instant so should do it immediately
70 if s.outputs[6].Get() {
71 s.reset.Update(s.outputs[6].Get())
72 s.step()
73 }
74}
75
76func (s *Stepper) step() {
77 s.clockInNotGate.Update(s.clockIn.Get())

Callers 1

testStepperStateAfterFunction · 0.95

Calls 3

stepMethod · 0.95
UpdateMethod · 0.65
GetMethod · 0.45

Tested by 1

testStepperStateAfterFunction · 0.76