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 * ======== RMAN ========
35 * Resource Manager for shared C64x+ resources.
36 */
37 @Template("./RMAN.xdt")
38
39 metaonly module RMAN {
40
41 /*!
42 * ======== tableSize ========
43 * Total number of individual resource manager (IRESMAN implementation)
44 * entries that will be registered with RMAN (including both static and
45 * dynamic)
46 */
47 config UInt tableSize = 10;
48
49 /*!
50 * ======== maxAlgs ========
51 * Maximum number of algorithm instances that will be using the RMAN
52 * module.
53 */
54 config UInt maxAlgs = 32;
55
56 /*!
57 * ======== useDSKT2 ========
58 * Flag indicating if DSKT2 should be used for memory allocation and
59 * for supporting algorithm yields.
60 *
61 * Setting this flag to `false` will disable cooperative preemption support
62 * for algorithms in RMAN.
63 */
64 config Bool useDSKT2 = true;
65
66 /*!
67 * ======== persistentAllocFxn ========
68 * Function for allocating persistent memory for RMAN's and other IRESMAN
69 * implementation's internal objects.
70 *
71 * This is required to be supplied ONLY if {@link #useDSKT2} is set to
72 * `false`.
73 */
74 config String persistentAllocFxn = null;
75
76 /*!
77 * ======== persistentFreeFxn ========
78 * Function for freeing persistent memory used by RMAN and other IRESMAN
79 * implementation's internal objects.
80 *
81 * This is required to be supplied ONLY if {@link #useDSKT2} is set to
82 * `false`.
83 */
84 config String persistentFreeFxn = null;
85
86 /*!
87 * ======== yieldSamePriority ========
88 * Flag indicating if yields to same priority should happen or not
89 *
90 * This is required only if {@link #useDSKT2} is set to `true`.
91 */
92 config bool yieldSamePriority = false;
93
94 /*!
95 * ======== semCreateFxn ========
96 * Function to create semaphores used by various individual resource
97 * manager(s) registered with RMAN.
98 *
99 * Function signature is:
100 * @p(code)
101 * Void * _semCreate(Int key, Int count);
102 */
103 config String semCreateFxn = null;
104
105 /*!
106 * ======== semDeleteFxn ========
107 * Function to delete semaphores used by various individual resource
108 * manager(s) registered with RMAN.
109 *
110 * Function signature is:
111 * @p(code)
112 * Void _semDelete(Void * sem);
113 */
114 config String semDeleteFxn = null;
115
116 /*!
117 * ======== semPendFxn ========
118 * Function to pend on semaphores used by various resource manager(s)
119 * registered with RMAN.
120 *
121 * Function signature is:
122 * @p(code)
123 * Int _semPend(Void * sem, UInt32 timeout);
124 */
125 config String semPendFxn = null;
126
127 /*!
128 * ======== semPostFxn ========
129 * Function to post on Semaphores used by various resource manager(s)
130 * registered with RMAN.
131 *
132 * Function signature is:
133 * @p(code)
134 * Void _semPost(Void * sem);
135 */
136 config String semPostFxn = null;
137
138 /*!
139 * ======== debug ========
140 * Enable the debug profile of the RMAN module.
141 *
142 * This will result in a larger and slower library being linked in,
143 * but it will provide extra parameter checking to ensure callers are
144 * meeting the API requirements.
145 *
146 * If these API requirements are not met, `SYS_abort()` will be called.
147 * @_nodoc
148 */
149 config bool debug = false;
150
151 /*!
152 * ======== trace ========
153 * Enable trace in the RMAN library.
154 *
155 * This will result in a larger and slower library being linked in,
156 * but it will provide trace statements for debugging purposes.
157 * @_nodoc
158 */
159 config bool trace = false;
160
161 /*!
162 * ======== lockFxn ========
163 * Deprecated
164 * Function for handling the release and lock of scratch groups required
165 * during yield to higher or same priority algorithm
166 * Void _acquireLock(Int scratchId);
167 * @_nodoc
168 */
169 config String lockFxn = null;
170
171 /*!
172 * ======== unlockFxn ========
173 * Deprecated
174 * Function for handling the release and lock of scratch groups required
175 * during yield to higher or same priority algorithm
176 * Void _releaseLock(Int scratchId);
177 * @_nodoc
178 */
179 config String unlockFxn = null;
180
181 /*!
182 * ======== setContext ========
183 * Deprecated
184 * Function for handling setting and obtaining the Yield context of a
185 * scratch group during yield to higher or same priority algorithm
186 * Void _setContext(Int scratchId, IRES_YieldContextHandle context);
187 * @_nodoc
188 */
189 config String setContextFxn = null;
190
191 /*!
192 * ======== getContext ========
193 * Deprecated
194 * Function for handling setting and obtaining the Yield context of a
195 * scratch group during yield to higher or same priority algorithm
196 * IRES_YieldContextHandle _getContext(Int scratchId);
197 * @_nodoc
198 */
199 config String getContextFxn = null;
200
201 /*!
202 * ======== yieldFxn ========
203 * Deprecated
204 * Function to call to yield to another task of the same priority.
205 * Required only if the yieldSamePriority flag is set to "true".
206 * @_nodoc
207 */
208 config String yieldFxn = null;
209 }
210 211 212
213