4 packet template inheritance, 1 packet template single inheritance, Packet template inheritance – Teledyne LeCroy Voyager Exerciser Generation Script Language Manual User Manual
Page 51: Packet template single inheritance
Teledyne LeCroy
Voyager USB 3.0 Exerciser Generation Script Language Reference Manual
42
8.4 Packet Template Inheritance
You can create a packet/struct template that inherits field layouts defined in another template.
The created template has all the fields defined in the inherited templates plus its own fields. All
fields must have unique names.
Note: The parser adds the fields defined in the created packet template after it adds fields from
the inherited templates.
You can change the default field values of the inherited fields.
8.4.1 Packet Template Single Inheritance
A new template inherits the field layouts from another template using an ancestor list.
Examples
Packet
MY_DataPacket : DataPacket
{
# Example of a field with variable length having a default value.
Data : * = {
00 00 00 01
}
}
# More examples of template inheritance
const
LMP =
0
const
LMP_SET_LINK_FUNC =
1
Packet
USB3Common
{
Type :
5
}
Packet
LMPCommon : USB3Common
# Derive a template from a USB3Common
# template.
{
Type = LMP
SubType :
4
}
Packet
LMP_SetLinkFunction : LMPCommon
{
SubType = LMP_SET_LINK_FUNC
Resv1 :
1
;
Force_LinkPM_Accept :
1
;
Resv2 :
5
;
Resv3 :
16
;
Resv4 :
32
;
Resv5 :
32
;
CRC_16 :
16
# Auto calculated
: LinkCtrlWord
# structure template insertion
}