()
| 351 | } |
| 352 | |
| 353 | func (o *XORer) Update() { |
| 354 | awire := arch.BUS_WIDTH |
| 355 | bwire := 0 |
| 356 | for i, _ := range o.gates { |
| 357 | o.gates[i].Update(o.inputs[awire].Get(), o.inputs[bwire].Get()) |
| 358 | o.outputs[i].Update(o.gates[i].Output()) |
| 359 | awire++ |
| 360 | bwire++ |
| 361 | } |
| 362 | } |
| 363 | |
| 364 | type Compare2 struct { |
| 365 | inputA circuit.Wire |