Skip to main content

PYNQ Driver for Xilinx Central Direct Memory Access IP

Project description

PYNQ-CDMA-Driver

PYNQ Driver for Xilinx Central Direct Memory Access IP

Installation

pip install pynq_cdma

Usage

Currently, we only support simple DMA transfer

Auto bind

First import CDMA

from pynq_cdma import CDMA

Now if your design contains CDMA IP, Pynq will automatically bind it to a CDMA instance.

You can check its status by accessing the idle property:

from pynq import Overlay
ol = Overlay('top.bit')
print(ol.axi_cdma_0.idle)

Data transfer

import numpy as np
from pynq import allocate
input_buffer = allocate(shape=(8,), dtype=np.uint8)
output_buffer = allocate(shape=(8,), dtype=np.uint8)
for i in range(8):
    input_buffer[i] = i
ol.axi_cdma_0.transfer(input_buffer, 0xF000_0000)
ol.axi_cdma_0.transfer(0xF000_0000, output_buffer)
print(output_buffer)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pynq_cdma-0.1.0.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

pynq_cdma-0.1.0-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page