2016-06-14 01:19:17 +02:00
|
|
|
/** AXI Stream interconnect related helper functions
|
|
|
|
*
|
|
|
|
* These functions present a simpler interface to Xilinx' AXI Stream switch driver (XAxis_Switch_*)
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
|
2017-03-03 20:20:13 -04:00
|
|
|
* @copyright 2017, Steffen Vogel
|
2016-06-14 01:19:17 +02:00
|
|
|
**********************************************************************************/
|
|
|
|
|
2017-03-12 17:13:37 -03:00
|
|
|
/** @addtogroup fpga VILLASfpga
|
|
|
|
* @{
|
|
|
|
*/
|
2017-03-03 20:20:13 -04:00
|
|
|
|
2017-02-18 10:43:58 -05:00
|
|
|
#pragma once
|
2016-06-14 01:19:17 +02:00
|
|
|
|
|
|
|
#include <xilinx/xaxis_switch.h>
|
|
|
|
|
2016-06-26 15:22:25 +02:00
|
|
|
#include "list.h"
|
|
|
|
|
2017-03-29 04:25:30 +02:00
|
|
|
/* Forward declarations */
|
2016-06-26 15:22:25 +02:00
|
|
|
struct ip;
|
|
|
|
|
|
|
|
struct sw_path {
|
|
|
|
const char *in;
|
|
|
|
const char *out;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct sw {
|
|
|
|
XAxis_Switch inst;
|
|
|
|
|
|
|
|
int num_ports;
|
|
|
|
struct list paths;
|
|
|
|
};
|
|
|
|
|
2016-06-19 19:23:19 +02:00
|
|
|
struct ip;
|
2016-06-14 01:19:17 +02:00
|
|
|
|
2017-03-29 04:25:30 +02:00
|
|
|
int switch_start(struct fpga_ip *c);
|
2016-06-19 19:23:19 +02:00
|
|
|
|
2016-07-08 13:01:40 +02:00
|
|
|
/** Initialize paths which have been parsed by switch_parse() */
|
2017-02-18 10:43:58 -05:00
|
|
|
int switch_init_paths(struct fpga_ip *c);
|
2016-07-08 13:01:40 +02:00
|
|
|
|
2017-02-18 10:43:58 -05:00
|
|
|
int switch_destroy(struct fpga_ip *c);
|
2016-06-26 15:22:25 +02:00
|
|
|
|
2017-02-18 10:43:58 -05:00
|
|
|
int switch_parse(struct fpga_ip *c);
|
2016-06-26 15:22:25 +02:00
|
|
|
|
2017-02-18 10:43:58 -05:00
|
|
|
int switch_connect(struct fpga_ip *c, struct fpga_ip *mi, struct fpga_ip *si);
|
2016-06-14 01:19:17 +02:00
|
|
|
|
2017-02-18 10:43:58 -05:00
|
|
|
int switch_disconnect(struct fpga_ip *c, struct fpga_ip *mi, struct fpga_ip *si);
|
2016-06-26 15:22:25 +02:00
|
|
|
|
2017-02-18 10:43:58 -05:00
|
|
|
/** @} */
|