port output timestamp

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
aelder
Active Member
Posts: 37
Joined: Mon Sep 24, 2012 1:45 pm

port output timestamp

Post by aelder »

If I run this

Code: Select all


out buffered port:32 p_4bit_out = XS1_PORT_4A;

p_4bit_out <: 0 @ t0;
p_4bit_out <: 0 @ t1;
p_4bit_out <: 0 @ t2;
printf("\n Three back-to-back writes to p_4bit_out give timestamp deltas of %d and %d\n", t1 - t0, t2 - t1);
in the simulator (set to xCORE-200 eXplorer) I observe
Three back-to-back writes to p_4bit_out give timestamp deltas of 9 and 9
Why is the time delta 9 instead of 8?


User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Guessing that the extra cycle is to perform the actual timestamp itself. You could confirm this by reviewing the disassembly of this source code, with and without the timestamp option to see the difference.

https://www.xmos.com/published/how-disa ... g-xobjdump
Post Reply