This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EVE/VCOP Debug - See parallel processing

Hello Experts,

is there an opportunity to debug EVE programs and actually see how EVE and VCOP process data in parallel? A method where I can see how many values are written to registers etc. per cycle?

I haven't tried the EVE simulators for CCS (cause newer versions don't support them anymore).. but i think debugging of parallel data processing wasn't possbile with them either, right? (only sequential "normal" debugging)

Thanks in advance,

Tobias

  • Hi Tobias,

    I have forwarded your question to EVE experts.

    Regards,
    Yordan
  • Hi Tobias,

        I would  recommend you to look at the host emulation feature for the kernels which can help you faster in getting started on EVE kernel development. All the VCOP kernels can be build using gcc/visual studio compiler and can run directly on PC. You can refer to the section 2.3 in eve_kernels_userguide.pdf to understand how to build kernels for host emulation ( we currently support Visual Studio based host emulation). In host emulation you can see how instructions are executed on VCOP. To see which VCOP instructions are getting executed in parallel you can view the assembly generated ( a small sample is shown below). It will clearly show which instructions are getting executed parallel and which are not using "||" sign

    VMIN V0,V3,V3

    || VMAX V0,V4,V4 

    VADD V2,V0,V2 
    || VMADD V0,V0,V1,V1

    Regards,

    Anshu

    Regards,

    Anshu

  • Hi Anshu,

    thanks for your response. I already edited a .k file (from EVE kernelslib) and managed to compile it, so I got a working .exe file after build. How exactly can I use Visual Studio to debug this file? Is there an emulator I have to install in Visual Studio like you had to do with vayu emulator in CCS? Or is there any guide on how to use VS based host emulation? All the documents I found only cover CCS emulation...

    Regards,
    Tobias
  • Hi Tobias,

        Which compiler you used for generating the .exe file? If it is  built using visual studio complier then you can just load this executable directly from visual studio (goto->Open Project and load the binary). Please refer section 2.3 of eve_kernels_userguide.pdf to see various build steps.

    Regards,

    Anshu

  • Hey Anshu,

    at first I used a normal gcc compiler for building the exe file (just "gmake" in kernel/src_kernelC). I could execute that file and it worked properly. It also gave out the right values I wanted via printf instructions. But i can't debug this exe file because there are no debugging information.

    Recently I managed to build the exe with visual studio compiler ("gmake msvc") and your instructions. Building process finished without errors but when I try to open a.exe it crashes and windows terminates it. When I try to debug it in VS it creates an error message.

    "Unhandled exception at 0x00007FF69D6E685D in a.exe: 0xC0000005: Access violation reading location 0x000000009D6FB000."

    Thanks in advance,
    Tobias
  • Hi Anshu,

    I resolved the access violation issue by switching to a newer version of EVE SW. The exe file now successfully builds and also works as intended. I can also import it into Visual Studio like you said, but in there I just see "normal" assembly instructions (add, mov, jmp etc.) instead of the VCOP vector instructions I'm looking for. Do I have to enable somthing in VS or use specific compiler options to see the VCOP instructions?

    Regards,
    Tobias
  • Hi Tobias,

      Host emulation is just emulating the vector instructions and hence  you wont see them in assembly. But you can step inside your kernel functions and you can see the instructions as programmed by you.

    Regards,

    Anshu

  • Hi Tobias,
    Do you any further questions? If not then can we mark this thread as resolved?
  • Hey Anshu,
    I istalled CCS 5.4 now, where I can use the simulator and I can see the individual instructions. So my problem is resolved.