Пример #1
0
    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()
        )
Пример #2
0
 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())
Пример #3
0
 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())
Пример #4
0
 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())
Пример #5
0
 def architecture(self):
     self.event_check.is_repeated = True
     callback_command = self.callback.shell.activate()
     yield If(self.event_check).then(callback_command)
Пример #6
0
 def architecture(self):
     yield If((self.a.shell == True) & (self.b.shell == True)).then(
         self.s.shell.activate())