diff --git a/lib/fpga/ips/dft.c b/lib/fpga/ips/dft.c index 693c43637..237ccdb6c 100644 --- a/lib/fpga/ips/dft.c +++ b/lib/fpga/ips/dft.c @@ -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) diff --git a/lib/fpga/ips/dma.c b/lib/fpga/ips/dma.c index d597ff252..ac7d586fe 100644 --- a/lib/fpga/ips/dma.c +++ b/lib/fpga/ips/dma.c @@ -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) } diff --git a/lib/fpga/ips/fifo.c b/lib/fpga/ips/fifo.c index 87c6f9817..71b55b207 100644 --- a/lib/fpga/ips/fifo.c +++ b/lib/fpga/ips/fifo.c @@ -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) diff --git a/lib/fpga/ips/intc.c b/lib/fpga/ips/intc.c index 9a3084040..1e28fdddf 100644 --- a/lib/fpga/ips/intc.c +++ b/lib/fpga/ips/intc.c @@ -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) } diff --git a/lib/fpga/ips/switch.c b/lib/fpga/ips/switch.c index 5606388ae..86964b63b 100644 --- a/lib/fpga/ips/switch.c +++ b/lib/fpga/ips/switch.c @@ -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) diff --git a/lib/fpga/ips/timer.c b/lib/fpga/ips/timer.c index f4df11da3..7d107c73b 100644 --- a/lib/fpga/ips/timer.c +++ b/lib/fpga/ips/timer.c @@ -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) } };