()
| 271 | } |
| 272 | |
| 273 | func (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 | |
| 284 | type ORer struct { |
| 285 | inputs [arch.BUS_WIDTH * 2]circuit.Wire |