Network Wizard for VHDL Test Benches
nw_ptpv2_pkg Package Body Reference
Package >> nw_ptpv2_pkg

Functions

t_slv_arr   f_ptpv2_create_pkt ( message: in t_ptpv2_msg , get_length: in boolean false )
 Create PTPv2 message (internal)
t_slv_arr   f_ptpv2_create_pkt ( message: in t_ptpv2_msg )
 Create PTPv2 message.
natural   f_ptpv2_create_pkt_len ( message: in t_ptpv2_msg )
 Return length of PTPv2 message.
t_ptpv2_msg   f_ptpv2_get_msg ( ptp_pkt: in t_slv_arr )
 Get PTP message.

Member Function Documentation

◆ f_ptpv2_create_pkt()

t_slv_arr f_ptpv2_create_pkt (   message in t_ptpv2_msg  
)
Function

Create PTPv2 message.

Parameters
messagePTPv2 message (record)
Returns
PTPv2 message (8bit array)

Create PTPv2 message from message record.

Example use

v_msg := C_DEFAULT_PTPV2_MSG;
v_data := f_ptpv2_create_pkt(v_msg);

◆ f_ptpv2_create_pkt_len()

natural f_ptpv2_create_pkt_len (   message in t_ptpv2_msg  
)
Function

Return length of PTPv2 message.

Parameters
messagePTPv2 message (record)
Returns
Length of PTP message

Return the length of the created PTP message.

Example use

v_len := f_ptpv2_create_pkt_len(v_msg);
v_data(0 to v_len - 1) := f_ptpv2_create_pkt(v_msg);

◆ f_ptpv2_get_msg()

t_ptpv2_msg f_ptpv2_get_msg (   ptp_pkt in t_slv_arr  
)
Function

Get PTP message.

Parameters
ptp_pktPTPv2 message (8bit)
Returns
PTPv2 message (record)

Extract PTPv2 message from payload.

Example use

v_ptp_msg := f_ptpv2_get_msg(data_array_8bit);

The documentation for this class was generated from the following file: