1 2 3 4 5 6 7 8 9 10 11
12 13 14
15
16 package xdc.platform;
17
18 /*!
19 * ======== IPeripheral ========
20 * Configuration-time representation of a peripheral.
21 *
22 */
23 metaonly interface IPeripheral
24 {
25 typedef IPeripheral.Instance IPeripheralArray[];
26
27 typedef String StringArray[];
28
29 /*!
30 * ======== addPeripheralsMap ========
31 * Create a map of all peripherals available on a device.
32 *
33 * The config parameter `peripherals` is by default undefined in an
34 * `{@link xdc.platform.ICpuDataSheet}` instance. This function gathers
35 * all instance configuration parameters that are of the type
36 * `{@link xdc.platform.IPeripheral}` into the map `peripherals`.
37 *
38 * @param(cds) an `{@link xdc.platform.ICpuDataSheet}` instance
39 *
40 */
41 final Void addPeripheralsMap(ICpuDataSheet.Instance cds);
42
43 /*!
44 * ======== getAll ========
45 * Find all peripherals of a certain type.
46 *
47 * The type of the peripherals returned is defined by the type of the
48 * caller.
49 *
50 * @a(returns) Returns an array of IPeripheral instances
51 *
52 */
53 IPeripheralArray getAll();
54
55 /*!
56 * ======== getRegisters ========
57 * Find all registers defined by the peripheral.
58 *
59 * @a(returns) Returns an array of register names
60 *
61 */
62 StringArray getRegisters();
63
64 instance:
65
66 /*!
67 * ======== name ========
68 * Specific peripheral name given by the device.
69 *
70 * Devices can have more than one peripheral of the same type. In such
71 * cases, device data sheets give different names to the instances of a
72 * same peripheral. For example, the name for a timer module could be
73 * `TimerA3`, and a device that has two such timers can name them `TA0`
74 * and `TA1`.
75 */
76 config string name;
77
78 /*!
79 * ======== owner ========
80 * String specifying the entity that manages the peripheral
81 *
82 */
83 config string owner;
84 }
85 86 87
88