def architecture(self): """ Implement simple xor using a truth table. """ yield If((self.a.shell == False) & (self.b.shell == False)).then( self.s.shell.activate() ) yield If((self.a.shell == True) & (self.b.shell == True)).then( self.s.shell.activate() )
def architecture(self): yield self.output.shell.set_max_value() for a_port, b_port, s_port, in zip(self.input_a.ports, self.input_b.ports, self.output.ports): yield If((a_port.shell == True) & (b_port.shell == True)).then( s_port.shell.deactivate())
def architecture(self): yield If(self.a.shell == False).then(self.s.shell.activate()) yield If(self.a.shell == True).then(self.s.shell.deactivate())
def architecture(self): for index in xrange(self.bits): yield If(self.input.ports[index].shell == True).then( self.output.ports[self.bits - index - 1].shell.activate())
def architecture(self): self.event_check.is_repeated = True callback_command = self.callback.shell.activate() yield If(self.event_check).then(callback_command)
def architecture(self): yield If((self.a.shell == True) & (self.b.shell == True)).then( self.s.shell.activate())