1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

added new fpga_ip_type callbacks to differentiate between intialiazation and start of an IP core

This commit is contained in:
Steffen Vogel 2017-03-25 21:13:07 +01:00
parent 9c37348d1d
commit edc1e0196d
6 changed files with 35 additions and 15 deletions

View file

@ -43,7 +43,7 @@ int dft_parse(struct fpga_ip *c)
return 0;
}
int dft_init(struct fpga_ip *c)
int dft_start(struct fpga_ip *c)
{
int ret;
@ -76,13 +76,20 @@ int dft_init(struct fpga_ip *c)
return 0;
}
int dft_destroy(struct fpga_ip *c)
int dft_stop(struct fpga_ip *c)
{
struct dft *dft = (struct dft *) &c->_vd;
XHls_dft *xdft = &dft->inst;
XHls_dft_DisableAutoRestart(xdft);
return 0;
}
int dft_destroy(struct fpga_ip *c)
{
struct dft *dft = (struct dft *) &c->_vd;
if (dft->fharmonics) {
free(dft->fharmonics);
@ -99,7 +106,8 @@ static struct plugin p = {
.ip = {
.vlnv = { "acs.eonerc.rwth-aachen.de", "hls", "hls_dft", NULL },
.type = FPGA_IP_TYPE_MATH,
.init = dft_init,
.start = dft_start,
.stop = dft_stop,
.destroy = dft_destroy,
.parse = dft_parse,
.size = sizeof(struct dft)

View file

@ -560,7 +560,7 @@ static int dma_init_rings(XAxiDma *xdma, struct dma_mem *bd)
return 0;
}
int dma_init(struct fpga_ip *c)
int dma_start(struct fpga_ip *c)
{
int ret, sg;
struct dma *dma = (struct dma *) &c->_vd;
@ -631,8 +631,8 @@ static struct plugin p = {
.type = PLUGIN_TYPE_FPGA_IP,
.ip = {
.vlnv = { "xilinx.com", "ip", "axi_dma", NULL },
.type = FPGA_IP_TYPE_DATAMOVER,
.init = dma_init,
.type = FPGA_IP_TYPE_DM_DMA,
.init = dma_start,
.reset = dma_reset,
.size = sizeof(struct dma)
}

View file

@ -16,7 +16,7 @@
#include "fpga/ips/fifo.h"
#include "fpga/ips/intc.h"
int fifo_init(struct fpga_ip *c)
int fifo_start(struct fpga_ip *c)
{
int ret;
@ -39,6 +39,17 @@ int fifo_init(struct fpga_ip *c)
return 0;
}
int fifo_stop(struct fpga_ip *c)
{
struct fifo *fifo = (struct fifo *) &c->_vd;
XLlFifo *xfifo = &fifo->inst;
XLlFifo_IntDisable(xfifo, XLLF_INT_RC_MASK); /* Receive complete IRQ */
return 0;
}
ssize_t fifo_write(struct fpga_ip *c, char *buf, size_t len)
{
struct fifo *fifo = (struct fifo *) &c->_vd;
@ -109,8 +120,9 @@ static struct plugin p = {
.type = PLUGIN_TYPE_FPGA_IP,
.ip = {
.vlnv = { "xilinx.com", "ip", "axi_fifo_mm_s", NULL },
.type = FPGA_IP_TYPE_DATAMOVER,
.init = fifo_init,
.type = FPGA_IP_TYPE_DM_FIFO,
.start = fifo_start,
.stop = fifo_stop,
.parse = fifo_parse,
.reset = fifo_reset,
.size = sizeof(struct fifo)

View file

@ -19,7 +19,7 @@
#include "fpga/card.h"
#include "fpga/ips/intc.h"
int intc_init(struct fpga_ip *c)
int intc_start(struct fpga_ip *c)
{
int ret;
@ -157,7 +157,7 @@ static struct plugin p = {
.ip = {
.vlnv = { "acs.eonerc.rwth-aachen.de", "user", "axi_pcie_intc", NULL },
.type = FPGA_IP_TYPE_MISC,
.init = intc_init,
.start = intc_start,
.destroy = intc_destroy,
.size = sizeof(struct intc)
}

View file

@ -14,7 +14,7 @@
#include "fpga/card.h"
#include "fpga/ips/switch.h"
int switch_init(struct fpga_ip *c)
int switch_start(struct fpga_ip *c)
{
int ret;
@ -194,7 +194,7 @@ static struct plugin p = {
.ip = {
.vlnv = { "xilinx.com", "ip", "axis_interconnect", NULL },
.type = FPGA_IP_TYPE_MISC,
.init = switch_init,
.start = switch_start,
.destroy = switch_destroy,
.parse = switch_parse,
.size = sizeof(struct sw)

View file

@ -14,7 +14,7 @@
#include "fpga/card.h"
#include "fpga/ips/timer.h"
int timer_init(struct fpga_ip *c)
int timer_start(struct fpga_ip *c)
{
struct fpga_card *f = c->card;
struct timer *tmr = (struct timer *) &c->_vd;
@ -38,7 +38,7 @@ static struct plugin p = {
.ip = {
.vlnv = { "xilinx.com", "ip", "axi_timer", NULL },
.type = FPGA_IP_TYPE_MISC,
.init = timer_init
.start = timer_start,
.size = sizeof(struct timer)
}
};