Opened 15 years ago

Closed 15 years ago

#26 closed defect (fixed)

Segmentation fault when initiating a DMA transfer

Reported by: alexandre.chagoya-garzon@… Owned by: Nicolas Pouillon
Priority: trivial Component: IP-Cores
Keywords: DMA transfer, segmentation fault Cc:

Description

Hello, I have a problem when initiating a DMA transfer. I attached the platform (top.cpp, segmentation.h, platform_desc) and the application (MJPEG.x)

Everything runs smoothly, until a DMA transfer is initiated: [fetch_process] Send SOF info to LIBU and IDCT DMA transfer from 0x1004e620 to 0x1005779c (8 bytes)

I verified in vci_dma.cpp 134 VciInitSimpleReadReq<vci_param> *req = 135 new VciInitSimpleReadReq<vci_param>( 136 &m_data[0], m_src+m_offset, burst ); The correct src address is used, but on te next transition, a segmentation fault appears

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1210737792 (LWP 5494)] soclib::caba::VciVgmn<soclib::caba::VciParams<4, 6, 32, 1, 1, 1, 8, 1, 1, 1> >::genMoore (this=0xbf948fb8)

at /tima/amazone-home1/chagoyag/Workspace/soclib/soclib/module/network_component/vci_vgmn/caba/source/src/vci_vgmn.cpp:380

380 can_take |= !m_dest->full();

I use compiler gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

Thank you for your help Alexandre

Attachments (4)

top.cpp (8.9 KB) - added by alexandre.chagoya-garzon@… 15 years ago.
segmentation.h (2.5 KB) - added by alexandre.chagoya-garzon@… 15 years ago.
platform_desc (636 bytes) - added by alexandre.chagoya-garzon@… 15 years ago.
MJPEG.x (1.0 MB) - added by alexandre.chagoya-garzon@… 15 years ago.

Download all attachments as: .zip

Change History (9)

Changed 15 years ago by alexandre.chagoya-garzon@…

Attachment: top.cpp added

Changed 15 years ago by alexandre.chagoya-garzon@…

Attachment: segmentation.h added

Changed 15 years ago by alexandre.chagoya-garzon@…

Attachment: platform_desc added

Changed 15 years ago by alexandre.chagoya-garzon@…

Attachment: MJPEG.x added

comment:1 Changed 15 years ago by alexandre.chagoya-garzon@…

PS: you need a JPEG file named movie.mjpeg where you execute the simulation

comment:2 Changed 15 years ago by Nicolas Pouillon

Owner: changed from developers to Nicolas Pouillon
Status: newassigned

I see a bug in the topcell at attachment:top.cpp#L281

You set srcid to n_cpus+2, it should be n_cpus+1.

Does it fix the problem for you ?

comment:3 Changed 15 years ago by alexandre.chagoya-garzon@…

No, I obtain a segmentation fault at the begining. I need n_cpus initiators for the mips, one initiator for the fd and one for the dma. I think n_cpus+2 is correct

comment:4 Changed 15 years ago by Nicolas Pouillon

It is not. Please consider the fact you have n_cpu+2 ports on the Vgmn, ranging from 0 to n_cpu+1. Therefore n_cpu+2 is invalid.

Moreover I don't see any component having srcid of n_cpu+1...

comment:5 Changed 15 years ago by alexandre.chagoya-garzon@…

Priority: majortrivial
Resolution: fixed
Status: assignedclosed

Oh yes sorry, I was looking at the wrong line (Vgmn) It is true that I didn't take car of the srcid I put for Dma.

This solves the segmentation fault, thank you very much!

Alexandre

Note: See TracTickets for help on using tickets.