Compound Module Nic802154_TI_CC2420

Package: org.mixim.modules.nic
File: modules/nic/Nic802154_TI_CC2420.ned

This NIC implements a Texas Instruments CC 2420 802.15.4 network interface card using the CSMA protocol as specified in IEEE 802.15.4-2006.

Note: To be able to use this Nic in your simulation you have to copy the file "Nic802154_TI_CC2420_Decider.xml" from "modules/nic/" to your simulation directory.

Author: Jerome Rousselot

PhyLayerBattery CSMA802154

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.

Used in compound modules:

If a module type shows up more than once, that means it has been defined in more than one NED file.

Host802154_2400MHz (compound module)

This NED module defines a host using an IEEE 802.15.4 transceiver at 2.4GHz for wireless communications, that can be used to simulate wireless sensor networks.

PhyMacHost (compound module) (no description)

Parameters:

Name Type Default value Description
connectionManagerName string ""

name of the ConnectionManager module

sleepCurrent double 0.000021mA

power consumption from boards (at 3.3V)

rxCurrent double 18.8 mA
decodingCurrentDelta double 0 mA
txCurrent double 17.4 mA
setupRxCurrent double 0.6391mA

0.002109 W = (ESetupPower+ESetupXtal+ETxCalibrate)/TSetupTx

setupTxCurrent double 0.6845mA

0.002259 W = (ESetupPower+ESetupXtal+ERxCalibrate)/TSetupRx

rxTxCurrent double 18.8 mA

Upper bound

txRxCurrent double 18.8 mA

idem

Gates:

Name Direction Size Description
upperGateIn input

from upper layers

radioIn input

to receive AirFrames

upperGateOut output

to upper layers

upperControlOut output

control connection

upperControlIn input

Unassigned submodule parameters:

Name Type Default value Description
phy.coreDebug bool

debug switch for core framework

phy.recordStats bool false

enable/disable tracking of statistics (eg. cOutvectors)

phy.usePropagationDelay bool

Should transmission delay be simulated?

phy.useThermalNoise bool

should thermal noise be considered?

phy.analogueModels xml

Specification of the analogue models to use and their parameters

phy.sensitivity double

The sensitivity of the physical layer [dBm]

phy.maxTXPower double

The maximum transimission power of the physical layer [mW]

phy.initialRadioState int 0

state the radio is initially in

phy.radioMinAtt double 1.0

radios gain factor (attenuation) while receiving

phy.radioMaxAtt double 0.0

radios gain factor (attenuation) while not receiving

phy.nbRadioChannels int 1

Number of available radio channels. Defaults to single channel radio.

phy.initialRadioChannel int 0

Initial radio channel.

phy.numActivities int 5

the number of different power consuming activities the phy layer has change this parameter if your decider or physical layer uses more than the default 5 activities (sleep, rx, tx, switching, decoding)

mac.notAffectedByHostState bool false
mac.coreDebug bool

debug switch

mac.debug bool false

debug switch

mac.stats bool true
mac.trace bool false
mac.queueLength double 100

size of the MAC queue (maximum number of packets in Tx buffer)

mac.txPower double 1 mW

tx power [mW]

mac.useMACAcks bool true

Send/Expect MAC acks for unicast traffic?

mac.macMaxFrameRetries double 3

maximum number of frame retransmission only used when usage of MAC acks is enabled

mac.macMaxCSMABackoffs double 4

maximum backoffs

mac.contentionWindow int 2

# of backoff periods of the initial contention window (for linear and constant backoff method only)

mac.macMinBE double 3

minimum backoff exponent (for exponential backoff method only)

mac.macMaxBE double 5

maximum backoff exponent (for exponential backoff method only)

Source code:

//
// This NIC implements a Texas Instruments CC 2420 802.15.4 network interface card
// using the CSMA protocol as specified in IEEE 802.15.4-2006.
//
//Note: To be able to use this Nic in your simulation you have to copy the file 
//"Nic802154_TI_CC2420_Decider.xml" from "modules/nic/" to your simulation directory.
// @author Jerome Rousselot
//
module Nic802154_TI_CC2420 like INic
{
    parameters:
        string connectionManagerName = default("");   //name of the ConnectionManager module
        // power consumption from boards (at 3.3V)
        double sleepCurrent @unit(mA) = 0.000021mA; // 0.021 µA
        double rxCurrent @unit(mA) = 18.8 mA;
        double decodingCurrentDelta @unit(mA) = 0 mA;
        double txCurrent @unit(mA) = 17.4 mA;
        double setupRxCurrent @unit(mA) = 0.6391mA; // 0.002109 W = (ESetupPower+ESetupXtal+ETxCalibrate)/TSetupTx
        double setupTxCurrent @unit(mA) = 0.6845mA; // 0.002259 W = (ESetupPower+ESetupXtal+ERxCalibrate)/TSetupRx
        double rxTxCurrent @unit(mA) = 18.8 mA; // Upper bound
        double txRxCurrent @unit(mA) = 18.8 mA; // idem

    gates:
        input upperGateIn; // from upper layers
        input radioIn; // to receive AirFrames
        output upperGateOut; // to upper layers
        output upperControlOut; // control connection
        input upperControlIn;

    submodules:
        phy: PhyLayerBattery {
            parameters:
                decider = xmldoc("Nic802154_TI_CC2420_Decider.xml");
                //publishRSSIAlways = false;
                headerLength = 48 bit; // ieee 802.15.4                
                thermalNoise = -110 dBm;
                // From TI CC1100 datasheet rev. C
                timeSleepToRX = 0.001792 s;
                timeSleepToTX = 0.001792 s;
                timeRXToTX = 0.000192 s;
                timeTXToRX = 0.000192 s;
                timeRXToSleep = 0 s;
                timeTXToSleep = 0 s;
                // power consumption from boards
                //                sleepPower = 0.0000000693 W; // 0.021 microA * 3.3 V
                //                rxPower = 0.06204 W;   // 18.8 mA * 3.3 V
                //                txPower = 0.05742 W;   // 17.4 mA * 3.3 V
                //                rxTxPower = 0.06204 W; // Upper bound : 18.8 mA * 3.3 V
                //                txRxPower = 0.06204 W; // idem
                //                setupTxPower = 0.002109 W; // (ESetupPower+ESetupXtal+ETxCalibrate)/TSetupTx
                //                setupRxPower = 0.002259 W; // (ESetupPower+ESetupXtal+ERxCalibrate)/TSetupRx
                @display("p=96,236;i=block/wrxtx");

        }
        mac: CSMA802154 {
            parameters:
                rxSetupTime = 0.001792 s;
                txPower = default(1 mW);

                @display("p=96,87;i=block/layer");

        }
    connections:

        radioIn --> phy.radioIn;

        phy.upperGateIn <-- { @display("m=m,25,0,25,0"); } <-- mac.lowerGateOut;
        phy.upperGateOut --> { @display("m=m,73,0,50,50"); } --> mac.lowerGateIn;
        phy.upperControlOut --> mac.lowerControlIn;
        phy.upperControlIn <-- mac.lowerControlOut;

        mac.upperGateOut --> upperGateOut;
        mac.upperControlOut --> upperControlOut;
        mac.upperGateIn <-- upperGateIn;
        mac.upperControlIn <-- upperControlIn;

}