Hello guys,
I am experiencing an issue with the AXI DMA on a PYNQ/Zynq system.
When I load the bitstream, before sending any data, the DMA immediately enters “running” status.
register_map:
// Channel 1 register map: RegisterMap {
MM2S_DMACR = Register(RS=1, Reset=0, Keyhole=0, Cyclic_BD_Enable=0, IOC_IrqEn=1, Dly_IrqEn=0, Err_IrqEn=0, IRQThreshold=1, IRQDelay=0)
MM2S_DMASR = Register(Halted=0, Idle=0, SGIncld=0, DMAIntErr=0, DMASlvErr=0, DMADecErr=0, SGIntErr=0, SGSlvErr=0, SGDecErr=0, IOC_Irq=0, Dly_Irq=0, Err_Irq=0, IRQThresholdSts=0, IRQDelaySts=0)
MM2S_CURDESC = Register(Current_Descriptor_Pointer=0)
MM2S_CURDESC_MSB = Register(Current_Descriptor_Pointer=0)
MM2S_TAILDESC = Register(Tail_Descriptor_Pointer=0)
MM2S_TAILDESC_MSB= Register(Tail_Descriptor_Pointer=0)
MM2S_SA = Register(Source_Address=0)
MM2S_SA_MSB = Register(Source_Address=0)
MM2S_LENGTH = Register(Length=0)
SG_CTL = Register(SG_CACHE=0, SG_USER=0)
S2MM_DMACR = Register(RS=0, Reset=0, Keyhole=0, Cyclic_BD_Enable=0, IOC_IrqEn=0, Dly_IrqEn=0, Err_IrqEn=0, IRQThreshold=0, IRQDelay=0)
S2MM_DMASR = Register(Halted=0, Idle=0, SGIncld=0, DMAIntErr=0, DMASlvErr=0, DMADecErr=0, SGIntErr=0, SGSlvErr=0, SGDecErr=0, IOC_Irq=0, Dly_Irq=0, Err_Irq=0, IRQThresholdSts=0, IRQDelaySts=0)
S2MM_CURDESC = Register(Current_Descriptor_Pointer=0)
S2MM_CURDESC_MSB = Register(Current_Descriptor_Pointer=0)
S2MM_TAILDESC = Register(Tail_Descriptor_Pointer=0)
S2MM_TAILDESC_MSB= Register(Tail_Descriptor_Pointer=0)
S2MM_DA = Register(Destination_Address=0)
S2MM_DA_MSB = Register(Destination_Address=0)
S2MM_LENGTH = Register(Length=0)
// }
some warnings:
my init code:
import logging,os
import time
import queue
import multiprocessing
import zipfile
import tempfile
import shutil
from pynq import Overlay
from pynq import GPIO
import pynq.lib.dma
from pynq import allocate
from pynq import MMIO
from pynq import PL
from pynq import DefaultHierarchy
import numpy as np
class Xaar1003:
def __init__(self,config):
self.printer=config.get_printer()
self.reactor=self.printer.get_reactor()
self.gcode=self.printer.lookup_object('gcode')
self.virtual_sdcard=self.printer.lookup_object("virtual_sdcard")
#----------overlay--------------------
PL.reset()
self.ol = Overlay("/home/xilinx/zynq.bit")
self.ch1 = self.ol.channel1.axi_dma_0
self.ch2 = self.ol.channel2.axi_dma_0
self.ch3 = self.ol.channel3.axi_dma_0
self.ch4 = self.ol.channel4.axi_dma_0
self.ch5 = self.ol.channel5.axi_dma_0
self.ch6 = self.ol.channel6.axi_dma_0
self.ch7 = self.ol.channel7.axi_dma_0
self.ch1_buff=allocate(shape=(5*1024*1024,), dtype=np.uint8)
self.ch2_buff=allocate(shape=(5*1024*1024,), dtype=np.uint8)
self.ch3_buff=allocate(shape=(5*1024*1024,), dtype=np.uint8)
self.ch4_buff=allocate(shape=(5*1024*1024,), dtype=np.uint8)
self.ch5_buff=allocate(shape=(5*1024*1024,), dtype=np.uint8)
self.ch6_buff=allocate(shape=(5*1024*1024,), dtype=np.uint8)
self.ch7_buff=allocate(shape=(5*1024*1024,), dtype=np.uint8)
self.channels = [self.ch1, self.ch2, self.ch3, self.ch4, self.ch5, self.ch6, self.ch7]
self.ch_buffs = [self.ch1_buff, self.ch2_buff, self.ch3_buff, self.ch4_buff, self.ch5_buff, self.ch6_buff, self.ch7_buff]
self.head_en = GPIO(GPIO.get_gpio_pin(0), 'out')
self.head_dir = GPIO(GPIO.get_gpio_pin(1), 'out')
self.head_jet = GPIO(GPIO.get_gpio_pin(2), 'out')
self.jet_delay_time = MMIO(0x40000000, 0x1000)
Where might I have configured something incorrectly?







