Point-to-Point Transceiver Pipeline

Point-to-point links are based on a simple four-stage pipeline that supports the transfer of packets from a point-to-point transmitter to a point-to-point receiver. The structure of the bus transceiver pipeline is shown in the following figure.

Figure 226: Point-to-Point Link Transceiver Pipeline Execution Sequence for one Transmission

Point-to-Point Link Transceiver Pipeline Execution Sequence for one Transmission

The pipeline stages for a particular point-to-point link (simplex or duplex) can be specified using the appropriate attributes of the link object, as shown in the following figure.

Figure 227: Point-to-Point Link Attributes for Specifying Pipeline Stages

Point-to-Point Link Attributes for Specifying Pipeline Stages

Reserved Transmission Data Attributes

The Simulation Kernel sets aside a number of TDAs to provide pipeline stages with access to a minimum standard set of values, and to support communication between itself and the pipeline stages as well as between the stages and each other. The TDAs reserved for these purposes are defined below. For compactness, the symbolic constants that represent the TDA’s indices are shown in a short form without their common prefix. When actually used, each symbolic constant appears with the character sequence “OPC_TDA_PT_” prepended to the names given below. The datatype of each TDA is identified in the table next to the symbolic constant name: “D” represents a double-precision floating-point attribute, and “I” represents an integer attribute.

Table 110: Point-to-Point Pipeline: Reserved TDAs

Symbolic Constant Definition Assigned By Modifiable by Stages
TX_OBJID (I) object ID of transmitter module Kernel No
RX_OBJID (I) object ID of receiver module Kernel No
LINK_OBJID (I) object ID of link Kernel No
TX_CH_OBJID (I) object ID of transmitter channel Kernel No
CH_INDEX (I) index of transmitting (and receiving) channel Kernel No
TX_DELAY (D) packet transmission delay stage 0 Yes
PROP_DELAY (D) packet propagation delay stage 1 Yes
NUM_ERRORS (I) count of bit errors in packet stage 2 Yes
PK_ACCEPT (I) decision to accept/reject packet stage 3 Yes
ND_FAIL (D) earliest simulation time at which node failure occurred during reception of packet Kernel (if failure occurs) No
ND_RECOV (D) latest simulation time at which node recovery occurred during reception of packet Kernel (if recovery occurs) No

Stage 0: Transmission Delay

The transmission delay stage is the first stage of the pipeline, and is specified by the “txdel model” attribute of the point-to-point link. It is invoked immediately upon beginning transmission of a packet, to calculate the amount of time required for the entire packet to complete transmission. This result can be thought of as the simulation time difference between the beginning of transmission of the first bit and the end of transmission of the last bit of the packet. The Simulation Kernel uses the result provided by this stage to schedule an end-of-transmission event for the transmitter channel that is used to send the packet. When this event occurs, the transmitter may begin transmission of the next packet in the channel’s internal queue, if any are present; otherwise the transmitter channel becomes idle. In addition, the transmission delay result is used in conjunction with the result of the propagation delay stage to compute the time at which the packet completes reception at the link’s destination (i.e., the time at which the last bit finishes arriving is the time at which it finishes transmitting added to the propagation delay on the link).

The Simulation Kernel requires that the transmission delay stage procedure accept a packet address as its sole argument. The computed transmission delay is then expected by the Kernel within the TDA represented by the symbolic constant OPC_TDA_PT_TX_DELAY. The assigned value should be a nonnegative double-precision floating-point number. No other results are required. Interface requirements for this stage are specified in Figure 228.

Figure 228: Templates for Point-to-Point Pipeline: Transmission Delay Stage

Sequential simulations:

void
tx_delay_template (Packet* pk)
	{
	double		result;

	FIN (tx_delay_template (Packet* pk))

	/* extract required information from packet. */

	/* perform calculation of transmission delay. */

	/* place result in TDA to return to Simulation Kernel. */
	op_td_set_dbl (pk, OPC_TDA_PT_TX_DELAY, result);

	FOUT
	}

Parallel simulations:

void
tx_delay_template_mt (OP_SIM_CONTEXT_ARG_OPT_COMMA Packet* pk)
	{
	double		result;

	FIN_MT (tx_delay_template (Packet* pk))

	/* extract required information from packet. */

	/* perform calculation of transmission delay. */

	/* place result in TDA to return to Simulation Kernel. */
	op_td_set_dbl (pk, OPC_TDA_PT_TX_DELAY, result);

	FOUT
	}

Stage 1: Propagation Delay

The propagation delay stage is the second stage of the pipeline, and is specified by the “propdel model” attribute of the point-to-point link. It is invoked after the return of the transmission delay stage with no simulation time elapsing in between. The purpose of this stage is to calculate the amount of time required for the packet’s signal to travel from the link’s source to its destination. This result is generally dependent on parameters such as the type of physical medium, the distance between the source and the destination, and the frequency of the signal. Regardless of the factors involved, the Simulation Kernel expects a double-precision floating-point value to be provided by this stage. The Kernel uses this result to schedule a beginning-of-reception event for the receiver channel that the packet is destined for. In addition, the propagation delay result is used in conjunction with the result of the transmission delay stage to compute the time at which the packet completes reception (i.e., the time at which the last bit finishes arriving is the time at which the packet begins transmission added to the sum of the transmission delay and the propagation delay).

The Simulation Kernel requires that the propagation delay stage procedure accept a packet address as its sole argument. The computed propagation delay is then expected by the Kernel within the TDA represented by the symbolic constant OPC_TDA_PT_PROP_DELAY. The assigned value should be a nonnegative double-precision floating-point number. No other results are required. Interface requirements for this stage are specified in Figure 229.

Figure 229: Templates for Point-to-Point Pipeline: Propagation Delay Stage

Sequential simulations:

void
prop_delay_template (Packet* pk)
	{
	double			result;

	FIN (prop_delay_template (Packet* pk))

	/* extract required information from packet. */

	/* perform calculation of propagation delay. */

	/* place result in TDA to return to Simulation Kernel. */
	op_td_set_dbl (pk, OPC_TDA_PT_PROP_DELAY, result);

	FOUT
	}

Parallel simulations:

void
prop_delay_template_mt (OP_SIM_CONTEXT_ARG_OPT_COMMA Packet* pk)
	{
	double			result;

	FIN_MT (prop_delay_template (Packet* pk))

	/* extract required information from packet. */

	/* perform calculation of propagation delay. */

	/* place result in TDA to return to Simulation Kernel. */
	op_td_set_dbl (pk, OPC_TDA_PT_PROP_DELAY, result);

	FOUT
	}

Stage 2: Error Allocation

The error allocation stage is the third stage of the pipeline, and is specified by the “error model” attribute of the point-to-point link. It is invoked after the entire packet has completed reception at the destination, to estimate the number of bit errors that occurred. This is referred to as allocating errors to the packet. This result is generally dependent on a bit-error probability which reflects the quality of the link, and the packet length. The Kernel uses this result to report error statistics for the receiver channel object. In addition, this result is typically used by the final stage of the point-to-point link pipeline to decide whether to accept the packet and subsequently forward it via the receiver channel’s output stream.

The Simulation Kernel requires that the error allocation stage procedure accept a packet address as its sole argument. The computed number of errors affecting the packet is then expected by the Kernel within the TDA represented by the symbolic constant OPC_TDA_PT_NUM_ERRORS. The assigned value should be an integer value between zero and the packet length (inclusive). No other results are required. Interface requirements for this stage are specified in the following figure.

Figure 230: Templates for Point-to-Point Pipeline: Error Allocation Stage

Sequential simulations:

void
error_alloc_template (Packet* pk)
	{
	int			result;

	FIN (error_alloc_template (Packet* pk))

	/* extract required information from packet. */

	/* perform estimation of number of errors in packet. */

	/* place result in TDA to return to Simulation Kernel. */
	op_td_set_int (pk, OPC_TDA_PT_NUM_ERRORS, result);

	FOUT
	}

Parallel simulations:

void
error_alloc_template_mt (OP_SIM_CONTEXT_ARG_OPT_COMMA Packet* pk)
	{
	int			result;

	FIN_MT (error_alloc_template (Packet* pk))

	/* extract required information from packet. */

	/* perform estimation of number of errors in packet. */

	/* place result in TDA to return to Simulation Kernel. */
	op_td_set_int (pk, OPC_TDA_PT_NUM_ERRORS, result);

	FOUT
	}

Stage 3: Error Correction

The error correction stage is the fourth and final stage of the pipeline, and is specified by the “ecc model” attribute of the point-to-point link. It is invoked immediately after the return of the error allocation stage, with no simulation time elapsing in between. The purpose of this stage is to determine whether the arriving packet can be accepted and forwarded via the channel’s corresponding output stream to one of the receiver’s neighboring modules in the destination node. This is usually dependent upon the result computed in the error allocation stage and the ability of the receiver to correct the errors affecting the packet, hence the name of the stage. Based on the determination of this stage, the Kernel will either destroy the packet, or allow it to proceed into the destination node. In addition, this result affects error and throughput statistics collected for the receiver channel.

The Simulation Kernel requires that the error correction stage procedure accept a packet address as its sole argument. The determination to accept or reject the packet is then expected by the Kernel within the TDA represented by the symbolic constant OPC_TDA_PT_PK_ACCEPT. The assigned value should be the integer value OPC_TRUE to indicate acceptance; otherwise the integer value OPC_FALSE should be assigned. No other results are required. Interface requirements for this stage are specified in the following figure.

Figure 231: Templates for Point-to-Point Pipeline: Error Correction Stage

Sequential simulations:

void
error_correction_template (Packet* pk)
	{
	int			result;

	FIN (error_correction_template (Packet* pk))

	/* extract required information from packet. */

	/* determine if packet should be accepted or rejected. */

	/* place result in TDA to return to Simulation Kernel. */
	op_td_set_int (pk, OPC_TDA_PT_PK_ACCEPT, result);

	FOUT
	}

Parallel simulations:

void
error_correction_template_mt (OP_SIM_CONTEXT_ARG_OPT_COMMA Packet* pk)
	{
	int			result;

	FIN_MT (error_correction_template (Packet* pk))

	/* extract required information from packet. */

	/* determine if packet should be accepted or rejected. */

	/* place result in TDA to return to Simulation Kernel. */
	op_td_set_int (pk, OPC_TDA_PT_PK_ACCEPT, result);

	FOUT
	}

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com