1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
32
33 34 35
36 package ti.platforms.c6x;
37
38 /*!
39 * ======== Platform ========
40 * A generic platform that supports any C6x device
41 *
42 * The device to be used by this platform is passed as the platform instance
43 * name. On the `xdc.tools.configuro` command line, it is done in the
44 * following way:
45 * @p(code)
46 * xs xdc.tools.configuro ... -p "ti.platforms.c6x:TMS320C6678"
47 * @p
48 *
49 * In package.bld, the platform instance is selected as in:
50 * @p(code)
51 * Pkg.addExecutable("test", target, "ti.platforms.c6x:TMS320C6678");
52 * @p
53 */
54 metaonly module Platform inherits xdc.platform.IPlatform
55 {
56 config xdc.platform.IPlatform.Board BOARD = {
57 id: "0",
58 boardName: "c6x",
59 boardFamily: null,
60 boardRevision: null
61 };
62
63 /*!
64 * ======== nameFormat ========
65 * Encoding of instance creation parameters in the instance's name
66 *
67 * For this platform, the parameters `deviceName`, `includeLinkCmdFile`
68 * and `clockRate` can be encoded in the instance name supplied on
69 * `xdc.tools.configuro` command line, for example:
70 * @p(code)
71 * xs xdc.tools.configuro ... -p ti.platforms.c6x:TMS320C6678:1:20
72 * @p
73 * Optional parameters can be omitted:
74 * @p(code)
75 * xs xdc.tools.configuro ... -p ti.platforms.c6x:TMS320C6678
76 * @p
77 */
78 readonly config string nameFormat
79 = "$(deviceName):$(includeLinkCmdFile):$(clockRate)";
80
81 instance:
82
83 84 85 86 87
88 config xdc.platform.IExeContext.Cpu CPU = {
89 id: "0",
90 clockRate: 1.0,
91 catalogName: "ti.catalog.c6000",
92 deviceName: "C66",
93 revision: "",
94 };
95
96 /*!
97 * ======== deviceName ========
98 * The name of an `ICpuDataSheet` module for the device
99 *
100 * This parameter is required, but it does not have to be set explicitly;
101 * it can be encoded in the instance's name.
102 */
103 config string deviceName;
104
105 /*!
106 * ======== clockRate ========
107 * The clock rate for this device.
108 */
109 config Double clockRate;
110
111 override config string codeMemory = null;
112
113 override config string dataMemory = null;
114
115 override config string stackMemory = null;
116
117 /*!
118 * ======== includeLinkCmdFile ========
119 * The flag that specifies if the platform should include a linker command
120 * file.
121 *
122 * By default, a user is responsible for adding a linker command file to
123 * the project, or to the linker command line. However, if this flag is
124 * set, this platform will include a default linker command file for the
125 * selected device.
126 */
127 config Bool includeLinkCmdFile = false;
128 };