Hello all,
I am using TMS570LC4357. I tried to implement ethernet communication. For that I'm using HalCoGen Example code.
I tried to analyse the code using the debugger.
Of course I understands how ethernet works. Even I have some questions.
In CCPI RAM of EMAC Module, Tx BD which represents 256 transmit packets and Rx BD which represents 10 receive packets are declared.
And they are accessed via hdif_data[0] structure pointer.
So What are the meaning of the members of txch_t , rxch_t structures?
i.e:
typedef struct
{
emac_tx_bd *freehead, *activetail, *nextBdToprocess;
}txch_t;
typedef struct
{
emac_rx_bd *freehead, *activehead, *activetail;
}rxh_t;
Please anybody explain, in what meaning they use these member.
For example:
1. txch_t->activehead: It is the Packet, where the current Trasmission Queue begins, So in this Packet only SOP, PktLen, BufLen are having validity.
2. txch_t->activetail: It is the Packet, which is the last Packet of the current transmission Queue. here, txch_t->activetail->Next (= 0) field has NULL value. If further Packet Queue needs to be added, then that Queue ActiveHead address should be written in txch_t->activetail->Next field, if suppose txch_t->activetail->EOQ is not setted by EMAC module.
Like this way please anybody explain. (Sorry I may suppose be wrong, Because I just understand in this way while analysing the code using debugger.)
If suppose I am wrong, Please correct me.
Thanks in advance.
Regards,
Karthikeyan .K