Thanks to the segher I now feel comfortable that the below code fairly classifies the performance of the XCORE architecture.
Code: Select all
#include <xs1.h>
out port TX = XS1_PORT_1E;
in port RX = XS1_PORT_1F;
int main (void) {
TX <: 1;
unsigned val = 1;
while (1) {
RX when pinseq(val) :> void;
TX <: val;
val = !val;
}
return 0;
}
The above code produces a typical response of 50nS. At this point, unless someone calls fault on this I would consider this a fair performance review of the XMOS architecture.
Now there was a paper published named "Benchmarkign I/O response speed of microprocessors" by Goncalo Martins, Andrew Stanford-Jason, and David Lacey. To quote form that paper:
"There are two approaches to this: run every device under test at the same clock frequency or normalize by dividing the result by the clock frequency."
OK, the idea is simple, we want to compare architecture and not CLK speed. It so happens that I conducted this same test on 8-Bit AVR using an interrupt implementation (interrupts have obvious advantages over polling, specifically I can respond to several external events without needing multiple cores.)
Preliminary results show that it takes the AVR 12 clock cycles to respond to the external event. At 20 MHz that would be 600nS. If we scale this to the frequency at which the XCORE ports are clocked (100 MHz) this would be equal to 120nS vs. the 50nS of the XMOS. If, however, we scale this to the XMOS core frequency (400 MHz) then it is equal to 30nS on the AVR vs. the 50nS on the XMOS.
Please tell me if I have made any mistake, as I want this to be a fair and honest discussion/comparison of XMOS capabilities vs. another core architecture. After reading the above cited paper, which indicates performance increases of the order of a factor of one thousand, I was shocked to find that the old AVR architecture, once scaled to frequency, would actually beat the XMOS core.
What are every-bodies thoughts?
Thanks - Dominik
You do not have the required permissions to view the files attached to this post.