Hello,
the problem seems not to be in tile 0/1 but in combined combinable functions:)
here is the example compiled with -O3 for XCORE-200-EXPLORER target
Code: Select all
/*
* alignment-test.xc
*
* Created on: 1 Mar 2017
* Author: malo
*/
#include <platform.h>
#include <xs1.h>
#include <stdint.h>
#include <stdio.h>
typedef struct
{
long long padding_to_64b;
int32_t filter_coefs [16];
} coefs_t;
typedef interface sink_if
{
void process_sample (unsigned int fs_, int left_, int right_);
} sink_if;
typedef interface dummy_if
{
void nop ();
} dummy_if;
[[combinable]]
void dummy (server interface dummy_if i_dummy_)
{
coefs_t coefs;
printf (">>dummy: 0x%X, 0x%X\n", &(coefs.padding_to_64b), coefs.filter_coefs);
while (1)
{
select
{
case i_dummy_.nop ():
printf ("dummy: nop\n");
break;
}
}
}
[[combinable]]
void sink (server interface sink_if i_sink_)
{
coefs_t coefs;
printf (">>sink: 0x%X, 0x%X\n", &(coefs.padding_to_64b), coefs.filter_coefs);
while (1)
{
select
{
case i_sink_.process_sample (unsigned int fs_, int left_, int right_):
printf ("sink: process_sample\n");
break;
}
}
}
void source (client interface sink_if i_sink_, client interface dummy_if i_dummy_)
{
coefs_t coefs;
printf (">>source: 0x%X, 0x%X\n", &(coefs.padding_to_64b), coefs.filter_coefs);
i_sink_.process_sample (0, 0, 0);
i_dummy_.nop ();
}
int main()
{
interface sink_if i_sink;
interface dummy_if i_dummy;
par
{
on tile [0]: source (i_sink, i_dummy);
on tile [1] : [[combine, ordered]] par
{
dummy (i_dummy);
sink (i_sink);
}
}
return 0;
}
Here is my output
Code: Select all
>>source: 0x7FF20, 0x7FF28
>>dummy: 0x7FEF8, 0x7FF00
>>sink: 0x7FE9C, 0x7FEA4
sink: process_sample
dummy: nop
Bug or feature?
wbr
malo