Title: Simple Adder Control Signals on Zynq SoC - Zedboard
Tags: vhdl;fpga;hardware-acceleration;zynq
Question: I am new to the Zedboard and am working up to transferring a complex hardware accelerator I currently have working on a regular FPGA board. Anyway I want to walk before I can run so have done the Zedboard speedway tutorials and am now toying around with small projects. My first of which being an simple adder accelerator:

-Send 2 numbers to the pl(programmable logic), to reg a and b

-the pl adds the numbers

-an interrupt to the PS(CPU) signals the computation has finished.

-In the ISR the PS reads the result from reg c

For this design I am using 3 registers (a,b,c) in the AXI interconnect, I have created the IP templates using CIP.

Basically though what is the best way send a control signal to enable the addition to the PL. So how should I signal to the PL adder that I have loaded the two numbers in reg a and b and now want to add them?

-Should I create a 1bit signal GPIO interconnect, add a 4th 1 bit control register to the IP? or is there a more 'stylish' way to do this by using the BUS2IPdata signals?

-Or is there another way to create custom PS to PL control enable signals?

Many thanks
Sam

Current idea:

-Build a switch in the user_logic HDL based on the BUS2IPWrCE, so when this is asserted to write to reg B I can then signal an enable signal to my adder? Or will I run into some concurrency issues with the data not being fully written straight away?

Comment: Walk before you can run : this says use GPIO as a first step. It'll handle a few switches, registers and lights (display?) just fine. Later, you can develop your own AXI peripheral if you need to avoid the extra layer of hardware, or the GPIO drivers are too slow.

Here is the accepted answer: So to do this I have created the AXI perph using CIP, then modified the used_logic and two new ports, en and interrupt. Following these instructions I employed these external connections.http://www.programmableplanet.com/author.asp?section_id=2142&amp;doc_id=264841

I then connected these two external connections to GPIO interfaces to provide the required functionality. 


Here is another answer: In your larger designs, it will be difficult to get performance using a GPIOs to control the scheduling of your accelerators. I suggest setting up FIFOs of command blocks between software and hardware.

For example, your peripheral could implement an AXI Stream slave, to receive commands from software, and an AXI Stream master, to send result indications back to software.

It can assert an interrupt to indicate that there are values in the response FIFO.

For higher performance, set up these FIFOs in DRAM and use AXI read/write masters in your peripheral.


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 2, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2013:00:10/04/13', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<vhdl><fpga><hardware-acceleration><zynq>', 'Title': 'Simple Adder Control Signals on Zynq SoC - Zedboard', 'ViewCount': 1914, 'id': 19179733, 'user_AboutMe': '<p>Studying PhD in Computational Finance and Financial Mathematics, with a focus on parallel computing and custom hardware.</p>\n', 'user_AccountId': 917815.0, 'user_DisplayName': 'Sam Palmer', 'user_Reputation': 1645.0, 'user_Views': 201.0, 'user_id': 950218.0}}