1 2 3 4 5 6 7 8 9 10 11
12 13 14
15 package xdc.platform;
16
17 /*!
18 * ======== ICpuDataSheet ========
19 * CPU information provided by the HW model.
20 *
21 * The information in this interface is read-only, defined by the chip's
22 * data sheet, and is obtained by naming a module in a package that
23 * implements this interface.
24 *
25 * Data sheets are created by platforms as part of creating an "execution
26 * context" (see `{@link xdc.platform.IPlatform#getExeContext}`). This
27 * execution context includes the CPU's memory map as well as any external
28 * memory provided by the platform itself, for example.
29 */
30 metaonly interface ICpuDataSheet
31 {
32
33 instance:
34 /*!
35 * ======== create ========
36 * Create a "data-sheet" for the specified revision of a CPU.
37 *
38 * A "data sheet" for a CPU allows one to get specific attributes
39 * for a CPU programatically; e.g., the memory map of the CPU.
40 *
41 * Notice that we don't specify CPU registers when we create a
42 * a data-sheet; registers are provided as necessary to the other
43 * functions defined in this interface. This allows one to more easily
44 * get memory maps for several different setting of the registers,
45 * for example.
46 *
47 * @param(revision) a string that identifies revision of the CPU to be
48 * created.
49 */
50 create(string revision);
51
52 /*!
53 * ======== cpuCore ========
54 * A string identifying the CPU Core.
55 *
56 * This uniquely identifies the instruction set that the CPU can
57 * decode and execute.
58 */
59 config string cpuCore;
60
61 /*!
62 * ======== cpuCoreRevision ========
63 * A string that uniquely identifies a revision of the core.
64 */
65 config string cpuCoreRevision;
66
67 /*!
68 * ======== minProgUnitSize ========
69 * The minimum addressable program unit size in 8-bit bytes
70 */
71 config int minProgUnitSize;
72
73 /*!
74 * ======== minDataUnitSize ========
75 * The minimum addressable data unit size in 8-bit bytes
76 */
77 config int minDataUnitSize;
78
79 /*!
80 * ======== dataWordSize ========
81 * The size of an int on the target in 8-bit bytes
82 */
83 config int dataWordSize;
84
85 /*!
86 * ======== peripherals ========
87 * The map of peripherals available on the device
88 */
89 config xdc.platform.IPeripheral.Instance peripherals[string];
90
91 /*!
92 * ======== deviceHeader ========
93 * The optional header file that define device specific constants and
94 * structures.
95 */
96 config string deviceHeader;
97
98 /*!
99 * ======== getMemoryMap ========
100 * Get the memory map that corresponds to the values of the specified
101 * registers.
102 *
103 * If a register is not specified and this register can affect the
104 * memory map, the register is assumed to be set to its reset
105 * value (the value of the register immediately after a CPU reset).
106 *
107 * @param(registers) a hash of named registers to values at the time
108 * an executable is to be loaded (for example)
109 *
110 * @a(returns) Returns an array of
111 * `{@link xdc.platform.IPlatform#Memory}`
112 * objects that represent the memory visible to an
113 * executable running on the CPU.
114 */
115
116 function getMemoryMap(registers);
117
118 /*!
119 * ======== getRegisterSet ========
120 * The set of valid register names for this CPU
121 *
122 * This function returns the complete set of register names that may be
123 * passed to the `{@link #getMemoryMap()}` function. This function is
124 * only used to enable one to write a "requires contract" for the
125 * `{@link #getMemoryMap()}` function.
126 *
127 * @a(returns) Returns an array of valid register names (strings) for
128 * this device; only names from this array are valid keys
129 * for the registers argument to `{@link #getMemoryMap()}`.
130 */
131
132 function getRegisterSet();
133 };
134 135 136
137