- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I use the SGDMA in TSE MAC.
As its document said, the last descriptor in the descriptor chain must be a NULL descriptor. But I wonder how to define the NULL descriptor. I define it in following way: /***************************************************/ alt_sgdma_descriptor* tx_descriptor = (alt_sgdma_descriptor*)DESCRIPTOR_MEN_BASE; alt_sgdma_descriptor* tx_descriptor_ = (alt_sgdma_descriptor*)(DESCRIPTOR_MEN_BASE + ALTERA_AVALON_SGDMA_DESCRIPTOR_SIZE); alt_avalon_sgdma_construct_mem_to_stream_desc(tx_descriptor, tx_descriptor_, read_buffer, 256, 0, 1, 1, 0); alt_avalon_sgdma_construct_mem_to_stream_desc(tx_descriptor_, (alt_sgdma_descriptor*)NULL, read_buffer, 256, 0, 1, 1, 0); /****************************************************/ where tx_descriptor is the first descriptor, and tx_descriptor_ is the second(also the last descriptor) descriptor,. I define the NULL descriptor use (alt_sgdma_descriptor*)NULL Is that right?Lien copié
4 Réponses
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I also had this question, and I am not sure what is the correct answer.
I *think* that a null descriptor is the (last) descriptor with the OWNED_BY_HARDWARE bit set. It's addresses and length are "don't cares". I think the SG DMA engine will stop upon reaching this descriptor. The documentation is not quite clear on this. Regards, Leon.- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
your right leon
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Correction:
- the null descriptor is the last descriptor with the OWNED_BY_HARDWARE bit _cleared_. (not set as I typed earlier). Addition: - the null descriptor addresses and length are "don't cares", as the SG DMA engine will not perform a DMA transfer for this last descriptor. Can someone comment if this is correct or not??- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
likewise : That is correct and the alt_avalon_sgdma_construct_* macros takes care of this.
It always sets the "next" descriptor to NULL.
Répondre
Options du sujet
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable