cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
3,821 Views
Registered: ‎11-26-2014

instruction trace on Zybo with ARM's CoreSight

Hello, I am trying to perform instruction tracing on my Zybo board.

 

The zybo board is running linaro. According to the xilinx documentation, the zynq chip found in my zybo borad has features a PTM (program trace unit). From ARMs documentation:

 

https://developer.arm.com/products/software-development-tools/ds-5-development-studio/resources/tutorials/on-target-trace-using-the-coresight-access-library

 

 I learned that this instruction tracing is possible without an external debugger by recording the trace files and then copy them to DS-5 for analysis. There is an example available, however when I execute the trace demo program i get:

 

$ ./tracedemo
Default configuration, no CPU affinity selected. ITM disabled.
kernel symbol found @ 0x40008000
CoreSight demonstrator
** Currently affine CPUs: #0 #1
CSREG: Board 'Xilinx Zynq Platform' not known
CSREG: Failed to detect the board!

 

From the documentation I learned that i have to register my zybo board by adding a function similar to the fucntion below, however I do not have the information necessary to add this function to register my zybo board, for instance I do not know this parameter:

cs_register_romtable(0x801A0000). Is there a way to gather this information so I can add a function to register my board and enable instruction tracing on a zybo board?

 

  • If your target is not one of the platforms already supported, then you will need to add a "registration" function intocsregistration.c

 

static int do_registration_snowball(struct cs_devices_t *devices)
{
enum { A9_0, A9_1 };

cs_device_t funnel, rep;
int i;

if(registration_verbose)
printf("CSDEMO: Registering Snowball CoreSight devices...\n");
cs_register_romtable(0x801A0000);

if(registration_verbose)
printf("CSDEMO: Registering CPU affinities...\n");
/* PTMs */
cs_device_set_affinity(cs_device_register(0x801AE000), A9_0);
cs_device_set_affinity(cs_device_register(0x801AF000), A9_1);
/* CTIs */
cs_device_set_affinity(cs_device_register(0x801AC000), A9_0);
cs_device_set_affinity(cs_device_register(0x801AD000), A9_1);

if(registration_verbose)
printf("CSDEMO: Registering trace-bus connections...\n");
funnel = cs_device_get(0x801A6000);
cs_atb_register(cs_cpu_get_device(A9_0, CS_DEVCLASS_SOURCE), 0, funnel, 0);
cs_atb_register(cs_cpu_get_device(A9_1, CS_DEVCLASS_SOURCE), 0, funnel, 1);

rep = cs_atb_add_replicator(2);
cs_atb_register(funnel, 0, rep, 0);

devices->etb = cs_device_get(0x801A4000);
cs_atb_register(rep, 0, devices->etb, 0);

/* Snowball has a single CPU Part entry to cover both cores so cannot use the
* probe board results. */
for (i = 0; i < 2; ++i)
devices->cpu_id[i] = 0xC09;

return 0;
}

0 Kudos
2 Replies
Highlighted
Xilinx Employee
Xilinx Employee
3,812 Views
Registered: ‎08-01-2008

https://forums.xilinx.com/t5/Welcome-Join/Getting-Started-with-Zybo-and-Vivado/td-p/639124
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Highlighted
Newbie
Newbie
1,400 Views
Registered: ‎06-29-2017

Hi, 

Did you finally find a way to register zybo to the CSAL?

0 Kudos