Exemple #1
0
    class T(Hardware):
        def __init__(self, data):
            self.ram = RAM(data)

        def main(self, addr):
            read = self.ram.delayed_read(addr)
            self.ram.delayed_write(addr, read + 1)
            return read
Exemple #2
0
    class T(Hardware):
        def __init__(self, data):
            self.ram = RAM(data)

        def main(self, addr, write_val):
            self.ram.delayed_write(addr, write_val)
            r = self.ram.delayed_read(addr)
            return r
Exemple #3
0
    class T(Hardware):
        def __init__(self, data):
            self.ram = RAM(data)

        def main(self, addr, write_val):
            self.ram.delayed_write(addr, write_val)
            if addr > 8:
                return self.ram.delayed_read(addr)
            else:
                return -1
Exemple #4
0
    class T(Hardware):
        def __init__(self, data):
            self.ram = RAM(data)
            self.read = 0

        def main(self, addr, addr2):
            self.ram.delayed_write(addr, addr2)
            if addr > addr2:
                self.read = self.ram.delayed_read(addr)
            else:
                self.read = self.ram.delayed_read(addr2)

            return self.read
Exemple #5
0
    class T(Hardware):
        def __init__(self, data1, data2):
            self.ram1 = RAM(data1)
            self.ram2 = RAM(data2)

        def main(self, addr, write_val):
            self.ram1.delayed_write(addr, write_val)
            r1 = self.ram1.delayed_read(addr)

            self.ram2.delayed_write(addr, write_val)
            r2 = self.ram2.delayed_read(addr)
            return r1, r2
Exemple #6
0
 def __init__(self, data):
     self.ram = RAM(data)
Exemple #7
0
 def __init__(self, data):
     self.signal = RAM(data)
Exemple #8
0
 def __init__(self, data1, data2):
     self.ram = [RAM(data1), RAM(data2)]
Exemple #9
0
 def __init__(self, data1):
     self.ram1 = RAM(data1)
Exemple #10
0
 def __init__(self, data1, data2):
     self.ram1 = RAM(data1)
     self.ram2 = RAM(data2)