示例#1
0
文件: test_ram.py 项目: gasparka/pyha
    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
示例#2
0
文件: test_ram.py 项目: gasparka/pyha
    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
示例#3
0
文件: test_ram.py 项目: gasparka/pyha
    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
示例#4
0
文件: test_ram.py 项目: gasparka/pyha
    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
示例#5
0
文件: test_ram.py 项目: gasparka/pyha
    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
示例#6
0
文件: test_ram.py 项目: gasparka/pyha
 def __init__(self, data):
     self.ram = RAM(data)
示例#7
0
文件: test_ram.py 项目: gasparka/pyha
 def __init__(self, data):
     self.signal = RAM(data)
示例#8
0
文件: test_ram.py 项目: gasparka/pyha
 def __init__(self, data1, data2):
     self.ram = [RAM(data1), RAM(data2)]
示例#9
0
文件: test_ram.py 项目: gasparka/pyha
 def __init__(self, data1):
     self.ram1 = RAM(data1)
示例#10
0
文件: test_ram.py 项目: gasparka/pyha
 def __init__(self, data1, data2):
     self.ram1 = RAM(data1)
     self.ram2 = RAM(data2)