1/*
2 * Copyright 2020, Data61
3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4 * ABN 41 687 119 230.
5 *
6 * This software may be distributed and modified according to the terms of
7 * the BSD 2-Clause license. Note that NO WARRANTY is provided.
8 * See "LICENSE_BSD2.txt" for details.
9 *
10 * @TAG(DATA61_BSD)
11 */
12
13#define _VAR_STRINGIZE(...) #__VA_ARGS__
14#define VAR_STRINGIZE(...) _VAR_STRINGIZE(__VA_ARGS__)
15
16import <x86-iospace-dma.camkes>;
17
18#define x86_iospace_dma_interfaces(name, iospace_config) \
19    emits Init name##_init1; \
20    consumes Init name##_init2; \
21    attribute string iospaces = iospace_config;
22
23
24#define x86_iospace_dma_connections(name) \
25    connection x86IOSpaceDMA name##_init(from name##_init1, to name##_init2);
26
27
28#define x86_iospace_dma_configuration(name) \
29    name##_init.connection_name = VAR_STRINGIZE(name);
30