Task Viewer does not to show core info, and internal tasks Topic is solved

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
mozcelikors
Experienced Member
Posts: 75
Joined: Sat May 07, 2016 11:47 am

Task Viewer does not to show core info, and internal tasks

Post by mozcelikors »

How do I see the core usage, task by task,

Please take a look at the picture.
Image

-report suggests that 8 cores in the tile[1] are used;
However my Task Viewer shows only 2-3 cores used, which is also what parallel statement suggest.

So, that I guess means some of the tasks are placed on multiple cores; which I want to see.
How do I see them?

For tile 1 for example, I only have:

Code: Select all

// Ethernet App Tasks
     on tile[1]: rgmii_ethernet_mac(i_eth_rx, NUM_ETH_CLIENTS, i_eth_tx, NUM_ETH_CLIENTS,
             null, null,
             c_rgmii_cfg, rgmii_ports,
             ETHERNET_DISABLE_SHAPER);
     on tile[1].core[0]: rgmii_ethernet_mac_config(i_eth_cfg, NUM_CFG_CLIENTS, c_rgmii_cfg);
     on tile[1].core[0]: ar8035_phy_driver(i_smi, i_eth_cfg[CFG_TO_PHY_DRIVER]);
     on tile[1]: smi(i_smi, p_smi_mdio, p_smi_mdc);
which are combined with the tile[0] tasks;

Code: Select all

// Ethernet App Tasks
     on tile[1]: rgmii_ethernet_mac(i_eth_rx, NUM_ETH_CLIENTS, i_eth_tx, NUM_ETH_CLIENTS,
             null, null,
             c_rgmii_cfg, rgmii_ports,
             ETHERNET_DISABLE_SHAPER);
     on tile[1].core[0]: rgmii_ethernet_mac_config(i_eth_cfg, NUM_CFG_CLIENTS, c_rgmii_cfg);
     on tile[1].core[0]: ar8035_phy_driver(i_smi, i_eth_cfg[CFG_TO_PHY_DRIVER]);
     on tile[1]: smi(i_smi, p_smi_mdio, p_smi_mdc);

     on tile[0]: xtcp(c_xtcp,
             1,
             null,
             i_eth_cfg[0],
             i_eth_rx[0],
             i_eth_tx[0],
             null,
             ETHERNET_SMI_PHY_ADDRESS,
             null,
             otp_ports,
             ipconfig);


     on tile[0]: Task_EthernetAppTCPServer(c_xtcp[0]);
Any guidance is appreciated.
Attachments
1.png
(92.38 KiB) Not downloaded yet
1.png
(92.38 KiB) Not downloaded yet


View Solution
User avatar
ers35
Active Member
Posts: 62
Joined: Mon Jun 10, 2013 2:14 pm
Contact:

Post by ers35 »

par can be used in a task outside of main to start new tasks on additional cores on the same tile. For example, see the implementation of rgmii_ethernet_mac: https://github.com/xmos/lib_ethernet/bl ... ac.xc#L171

The following example demonstrates how the number of used cores shown by report can differ from the number of tasks started in main:

Code: Select all

// xcc -report -target=XCORE-200-EXPLORER par-outside-main.xc -o par-outside-main.xe

/*

Constraint check for tile[0]:
  Cores available:            8,   used:          4 .  OKAY

*/

#include <platform.h>
#include <xs1.h>

void foo()
{
  select {}
}

void task()
{
  par
  {
    // four cores
    foo();
    
    foo();
    
    foo();
    
    foo();
  }
}

int main()
{
  par
  {
    on tile[0]:
    {
      // one core
      task();
    }
  }
  return 0;
}
The task viewer graph works on a file by file basis. Try opening the file rgmii_ethernet_mac.xc with the task viewer open and see if it creates a drawing of at least the cores for that task.
mozcelikors
Experienced Member
Posts: 75
Joined: Sat May 07, 2016 11:47 am

Post by mozcelikors »

Thanks:) , that should do it I guess.
Post Reply