Stage 3: Channel Match

The channel match stage is the fourth stage of the pipeline, and is specified by the “chanmatch model” attribute of the radio transmitter. It is invoked once for each receiver channel that satisfies the criteria of the link closure stage. These invocations take place immediately after the return of the link closure stage, with no simulation time elapsing in between. The purpose of this stage is to classify the transmission with respect to the receiver channel. One of three possible categories must be assigned to the packet, as defined below:

  • Valid. Packets in this category are considered compatible with the receiver channel and will possibly be accepted and forwarded to other modules in the receiving node, provided that they are not affected by an excessive number of errors. Classification as a valid packet usually depends at least on agreement between transmitter and receiver channels concerning the values of certain key attributes.
  • Noise. This classification is used to identify packets whose data content cannot be received, but that have an impact on the receiver channel’s performance by generating interference. Packets are generally classified as noise as a result of incompatibilities between the transmitter and receiver channel configurations.
  • Ignored. If a transmission is determined to have no effect whatsoever on a receiver channel’s state or performance, then it should be identified using this classification. The Simulation Kernel will then discontinue the pipeline execution between the transmitter and receiver channels for this particular transmission (future transmissions between the channels are not prevented).

The Simulation Kernel requires that the channel match stage procedure accept a packet address as its sole argument. The classification is then expected by the Kernel within the integer TDA represented by the symbolic constant OPC_TDA_RA_MATCH_STATUS. One of the symbolic constants OPC_TDA_RA_MATCH_VALID, OPC_TDA_RA_MATCH_NOISE, or OPC_TDA_RA_MATCH_IGNORE should be used to represent the valid, noise, and ignored categories, respectively. No other results are required. Syntax requirements for this stage are specified in Figure 90.

Figure 90: Templates for Radio Transceiver Pipeline: Channel Match Stage

Not MT-safe (will execute sequentially in a parallel simulation):

void
channel_match_template (Packet* pk)
	{
	int result;

	FIN (channel_match_template (Packet* pk))

	/* extract required information from packet. */

	/* perform calculation of channel match classification. */

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

	FOUT
	}

MT-safe (can execute in parallel in a parallel simulation):

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

	FIN_MT (channel_match_template (Packet* pk))

	/* extract required information from packet. */

	/* perform calculation of channel match classification. */

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

	FOUT
	}