(wireI bool, wireS bool)
| 31 | } |
| 32 | |
| 33 | func (m *Bit) Update(wireI bool, wireS bool) { |
| 34 | for i := 0; i < 2; i++ { |
| 35 | m.gates[0].Update(wireI, wireS) |
| 36 | m.gates[1].Update(m.gates[0].Output(), wireS) |
| 37 | m.gates[2].Update(m.gates[0].Output(), m.gates[3].Output()) |
| 38 | m.gates[3].Update(m.gates[2].Output(), m.gates[1].Output()) |
| 39 | m.wireO.Update(m.gates[2].Output()) |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | type Word struct { |
| 44 | inputs [arch.BUS_WIDTH]circuit.Wire |