Two XS1-L8A-64-LQ64 microcontrollers, how to use the Tiles t

If you have a simple question and just want an answer.
User avatar
kreni
New User
Posts: 2
Joined: Wed Jun 24, 2015 10:50 am

Two XS1-L8A-64-LQ64 microcontrollers, how to use the Tiles t

Post by kreni »

I am working with a CAN gateway with two(!) XS1-L8A-64-LQ64 microcontrollers, each with 1-1 Tile.
I want to run the programs parts on diffrent cores and Tiles.

For example: This code part runs now on the same Tile:

int main()
{
  streaming chan c_can1;
  streaming chan c_can2;

  par
  {
  on tile[1]: application(c_can1, c_can2, 10000000, 0x12345678);
  on tile[1]: can_server(c_can1, p_can1, t_can1, CAN_BUFFER_SIZE);
  on tile[1]: can_server(c_can2, p_can2, t_can2, CAN_BUFFER_SIZE);
  }
  return 0;
}

But when I try to run them on different Tiles, or on the same Tile, but on a specifield core, than it does not work.

How should I number the Tiles, when they are on a different microconroller? Makes the xTIME Composer Studio the connection automatically? When not, then how should I do?

Is it possible somehow, to solve the problem?

Thank you!

srinie
XCore Addict
Posts: 158
Joined: Thu Mar 20, 2014 8:04 am

Post by srinie »

Hi,

You can modify your device xn file in order to chain the two devices.

A sample reference is available at  http://www.xcore.com/questions/2633/xn- ... -slicekits

 

Once your xn file modifications are in place, you can use the tiles as tile[0], tile[1]. xTIME tools will automatically take care of the inter-tile communication (refer to xCONNECT architecture for more information)

 

 

User avatar
myndideal
Active Member
Posts: 59
Joined: Thu May 05, 2011 10:00 pm
Location: Budapest

Post by myndideal »

Hi, in your code there are preffixed variables c_ for channels, p_ for ports and t_ for ? timer or some variable?

 (I see, your question was relating to the situation if no port name was deffinied in your .xc file but it is still used as fn arguments... ?)

By the way, without touching .xn file you can define new port refference to your new "test fixture/playground" code.

The only things to do, to remove the previous refference name from your code. Assume the previous unsurper pins/ports was p_X and p_Y wich are not used in new thestfixture from now,  and you want a p_test1 and p_test2 names for the freed pins,  then you can do it from the main .xc file too, but the previous p_X or p_Y name which are obviously means the same pin,  must be unreferenced (nobody use, therefore it is freed for you). p_X still declares the original pin, but nobody touching because no refferences to it in your project. I write a lot, but the point: just the xc file rewrite is adequate.. 

But, this sw changes not relating to hw. The given ports still connected to the same circuit. So probably you have to take care about what's implemented there. :)