drichmond / RISC-V-On-PYNQ

RISC-V Integration for PYNQ
Other
165 stars 57 forks source link

Error to run the test program in the fourth notebook #13

Open AlexZome opened 5 years ago

AlexZome commented 5 years ago

Hi, I tryed to execute the cell to run the test program in the fourth notebook but this error appeared:


MemoryError Traceback (most recent call last)

in () 2 arg1 = np.array([4,2,3], np.uint32) 3 ----> 4 retval = overlay.tutorialProcessor.run(test, arg1) 5 6 if(retval != arg1[2]): /home/xilinx/RISC-V-On-PYNQ/riscvonpynq/Processor.py in run(self, prog, *args) 209 210 """ --> 211 self.launch(prog, *args) 212 self.irq.wait() 213 return self.land() /home/xilinx/RISC-V-On-PYNQ/riscvonpynq/Processor.py in launch(self, prog, *args) 228 """ 229 path = prog.build(self) --> 230 self._load(path, *args) 231 self._nreset() 232 /home/xilinx/RISC-V-On-PYNQ/riscvonpynq/Processor.py in _load(self, bin_path, *args) 247 raise RuntimeError('Processor already loaded!') 248 --> 249 pynq.PL.load_ip_data(self._memstr, bin_path) 250 251 binname = np.fromstring(bin_path + '\0', np.int8) /usr/local/lib/python3.6/dist-packages/pynq/pl.py in load_ip_data(cls, ip_name, data, zero) 1549 mmio = MMIO(cls._ip_dict[ip_name]['phys_addr'], target_size) 1550 buf = bin_file.read(size) -> 1551 mmio.write(0, buf) 1552 if zero and size < target_size: 1553 mmio.write(size, b'\x00' * (target_size - size)) /usr/local/lib/python3.6/dist-packages/pynq/mmio.py in write(self, offset, data) 173 if length % 4: 174 raise MemoryError( --> 175 'Unaligned write: data length must be multiple of 4.') 176 buf = np.frombuffer(data, np.uint32, num_words, 0) 177 for i in range(len(buf)): MemoryError: Unaligned write: data length must be multiple of 4.

Do you know why can be produce?

Thanks in advance.