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

Method Update

components/components.go:273–282  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

271}
272
273func (a *ANDer) Update() {
274 awire := arch.BUS_WIDTH
275 bwire := 0
276 for i, _ := range a.gates {
277 a.gates[i].Update(a.inputs[awire].Get(), a.inputs[bwire].Get())
278 a.outputs[i].Update(a.gates[i].Output())
279 awire++
280 bwire++
281 }
282}
283
284type ORer struct {
285 inputs [arch.BUS_WIDTH * 2]circuit.Wire

Callers 1

TestANDerFunction · 0.95

Calls 3

UpdateMethod · 0.65
GetMethod · 0.45
OutputMethod · 0.45

Tested by 1

TestANDerFunction · 0.76