@@ -127,6 +127,7 @@ class alignas(64) Link
127127 friend class Simulation_impl ;
128128 friend class SyncManager ;
129129 friend class ComponentInfo ;
130+ friend class BaseComponent ;
130131
131132 ~Link ();
132133
@@ -245,16 +246,16 @@ class alignas(64) Link
245246 */
246247 TimeConverter* getDefaultTimeBase ();
247248
248- /* * Return the default Time Base for this link
249- * @return the default Time Base for this link
250- */
251- const TimeConverter* getDefaultTimeBase () const ;
252-
253249 /* * Return the ID of this link
254250 * @return the unique ID for this link
255251 */
256252 LinkId_t getId () { return tag; }
257253
254+ /* * Return the default Time Base for this link
255+ * @return the default Time Base for this link
256+ */
257+ const TimeConverter* getDefaultTimeBase () const ;
258+
258259 /* * Send data during the init() or complete() phase.
259260 * @param data event to send
260261 */
@@ -295,6 +296,21 @@ class alignas(64) Link
295296 */
296297 void setDeliveryInfo (uintptr_t info) { delivery_info = info; }
297298
299+ /* *
300+ Set the tag field for event link ordering
301+ */
302+ void setTag (uint32_t new_tag)
303+ {
304+ if ( tag != type_max<uint32_t > ) tag = new_tag;
305+
306+ // Interleaved links
307+ // tag = new_tag;
308+
309+ // Ordered SelfLinks
310+ // if ( tag != type_max<uint32_t> ) tag = new_tag;
311+ // else tag = 0x80000000 | new_tag;
312+ }
313+
298314 /* * Send an event over the link with additional delay. Sends an event
299315 * over a link with an additional delay specified with a
300316 * TimeConverter. I.e. the total delay is the link's delay + the
@@ -362,7 +378,7 @@ class alignas(64) Link
362378 SimTime_t& current_time;
363379 Type_t type;
364380 Mode_t mode;
365- LinkId_t tag;
381+ uint32_t tag;
366382
367383 /* * Create a new link with a given tag
368384
@@ -376,7 +392,7 @@ class alignas(64) Link
376392 value used for enforce_link_order (if that feature is
377393 enabled).
378394 */
379- explicit Link (LinkId_t tag);
395+ explicit Link (uint32_t tag);
380396
381397 Link (const Link& l);
382398
0 commit comments