port output timestamp

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
aelder
Active Member
Posts: 33
Joined: Mon Sep 24, 2012 1:45 pm

port output timestamp

Postby aelder » Fri Mar 23, 2018 6:37 pm

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: 1158
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Fri Mar 23, 2018 9:27 pm

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

Who is online

Users browsing this forum: No registered users and 28 guests