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

76 lines
1.5 KiB
C
Raw Permalink Normal View History

2016-06-19 19:23:19 +02:00
/** Node type: VILLASfpga
*
* This file implements the fpga node-type.
*
* @file
* @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
* @copyright 2017, Steffen Vogel
*********************************************************************************/
2016-06-19 19:23:19 +02:00
/**
* @addtogroup fpga VILLASfpga
2016-06-19 19:23:19 +02:00
* @ingroup node
* @{
*/
2016-06-19 19:23:19 +02:00
2017-02-16 09:04:12 -03:00
#pragma once
2016-06-19 19:23:19 +02:00
#include "kernel/vfio.h"
#include "kernel/pci.h"
2016-06-19 19:23:19 +02:00
2017-02-16 09:04:12 -03:00
#include "fpga/ips/dma.h"
2016-07-11 09:16:00 +02:00
2016-06-19 19:23:19 +02:00
#include "node.h"
#include "list.h"
2017-02-16 09:04:12 -03:00
/* Forward declarations */
struct fpga_ip;
2016-06-19 19:23:19 +02:00
2017-02-16 09:04:12 -03:00
/** The node type */
struct fpga {
struct fpga_ip *ip;
struct pci *pci;
struct vfio_container *vfio_container;
2016-06-19 19:23:19 +02:00
int use_irqs;
2016-07-08 13:32:18 +02:00
struct dma_mem dma;
2016-06-19 19:23:19 +02:00
};
/** @see node_vtable::init */
int fpga_init(struct super_node *sn);
2016-06-19 19:23:19 +02:00
2017-04-18 17:58:23 +02:00
/** @see node_type::deinit */
2016-06-19 19:23:19 +02:00
int fpga_deinit();
2017-04-18 17:58:23 +02:00
/** @see node_type::parse */
2016-06-19 19:23:19 +02:00
int fpga_parse(struct node *n, config_setting_t *cfg);
2017-03-03 20:21:33 -04:00
struct fpga_card * fpga_lookup_card(const char *name);
2017-04-18 17:58:23 +02:00
/** @see node_type::print */
2016-06-19 19:23:19 +02:00
char * fpga_print(struct node *n);
2017-04-18 17:58:23 +02:00
/** @see node_type::open */
int fpga_start(struct node *n);
2016-06-19 19:23:19 +02:00
2017-04-18 17:58:23 +02:00
/** @see node_type::close */
int fpga_stop(struct node *n);
2016-06-19 19:23:19 +02:00
2017-04-18 17:58:23 +02:00
/** @see node_type::read */
2016-06-19 19:23:19 +02:00
int fpga_read(struct node *n, struct sample *smps[], unsigned cnt);
2017-04-18 17:58:23 +02:00
/** @see node_type::write */
2016-06-19 19:23:19 +02:00
int fpga_write(struct node *n, struct sample *smps[], unsigned cnt);
/** Get pointer to internal VILLASfpga datastructure */
struct fpga * fpga_get();
/** Reset VILLASfpga */
int fpga_reset(struct fpga *f);
/** Dump some details about the fpga card */
void fpga_dump(struct fpga *f);
2017-02-16 09:04:12 -03:00
/** @} */