spinnaker_tools 3.4.0
SpiNNaker API, sark, sc&mp, bmp firmware and build tools
Loading...
Searching...
No Matches
Functions
scamp-app.c File Reference

Application support for SC&MP. More...

#include "sark.h"
#include "scamp.h"

Functions

void clock_ap (uint phys_mask, uint enable)
 Enable/disable clocks to a set of cores specified by a bit mask.
 
void reset_ap (uint virt_mask)
 Soft reset a set of cores specified by a bit mask.
 
void boot_ap (void)
 Boot APs.
 
static void signal_sark (uint cmd, uint data, uint virt_mask, uint phys_mask)
 Send a signal to a set of cores.
 
void set_cpu_info (uint virt_mask, uint state, uint app_id)
 Update some status variables for a set of cores.
 
static uint find_lead (uint mask)
 Find the position of the least significant bit in a word.
 
void proc_start_app (uint aplx_addr, uint id_op_mask)
 Start an application on a set of cores.
 
void clean_app_id (uint app_id)
 Clean up shared data belonging to a given AppID.
 
void proc_init_cores (uint virt_mask, uint phys_mask)
 Initialise a set of cores so that they run the default application.
 
void proc_stop_app (uint app_id_and_virt_mask, uint app_mask_and_phys_mask)
 Stop an application on a set of cores and free up any global resources associated with the application.
 
void proc_power_down (uint virt_mask, uint phys_mask)
 Power down a set of cores.
 
void signal_app (uint data)
 Signal cores running a range of applications identified by an AppID and a mask.
 

Detailed Description

Application support for SC&MP.

Author
Steve Temple, APT Group, School of Computer Science

Function Documentation

◆ clock_ap()

void clock_ap ( uint  phys_mask,
uint  enable 
)

Enable/disable clocks to a set of cores specified by a bit mask.

Parameters
[in]phys_maskWhich physical cores to enable or disable the clock for.
[in]enableTrue to switch on the clock for the cores, false to switch the clock off for them.

◆ reset_ap()

void reset_ap ( uint  virt_mask)

Soft reset a set of cores specified by a bit mask.

Clocks for those cores are enabled.

Parameters
[in]virt_maskWhich (virtual) cores to soft reset

◆ boot_ap()

void boot_ap ( void  )

Boot APs.

Assumes the "boot_aplx" image has been placed at 0x7f00 and the default "sark" image at 0x7000. Copies "boot_aplx" to start of SysRAM and the default image to SDRAM. Then starts the default app on all cores.

◆ signal_sark()

static void signal_sark ( uint  cmd,
uint  data,
uint  virt_mask,
uint  phys_mask 
)
static

Send a signal to a set of cores.

Parameters
[in]cmdThe shm_cmd_e to use (probably SHM_SIGNAL)
[in]dataThe signal to send, from signal_e
[in]virt_maskWhich virtual cores to signal
[in]phys_maskWhich physical cores to signal

◆ set_cpu_info()

void set_cpu_info ( uint  virt_mask,
uint  state,
uint  app_id 
)

Update some status variables for a set of cores.

Parameters
[in]virt_maskWhich cores to update for
[in]stateThe state to mark them as being in
[in]app_idThe ID of the application on those cores

◆ find_lead()

static uint find_lead ( uint  mask)
inlinestatic

Find the position of the least significant bit in a word.

Used to find the lead application processor.

Parameters
[in]maskThe word mask to look in. Assumed to be non-zero.
Returns
The bit index of the least significant set bit

◆ proc_start_app()

void proc_start_app ( uint  aplx_addr,
uint  id_op_mask 
)

Start an application on a set of cores.

Parameters
[in]aplx_addrWhere the APLX has been loaded in SDRAM
[in]id_op_maskAppID, and flags to pass to APLX loader

◆ clean_app_id()

void clean_app_id ( uint  app_id)

Clean up shared data belonging to a given AppID.

Parameters
[in]app_idThe AppID to clean up

◆ proc_init_cores()

void proc_init_cores ( uint  virt_mask,
uint  phys_mask 
)

Initialise a set of cores so that they run the default application.

Parameters
[in]virt_maskWhich virtual cores to power up
[in]phys_maskWhich physical cores to power up

◆ proc_stop_app()

void proc_stop_app ( uint  app_id_and_virt_mask,
uint  app_mask_and_phys_mask 
)

Stop an application on a set of cores and free up any global resources associated with the application.

Parameters
[in]app_id_and_virt_maskWhat AppID to stop, and which virtual cores to stop
[in]app_mask_and_phys_maskMask to select which AppIDs to stop, and which physical cores to stop

◆ proc_power_down()

void proc_power_down ( uint  virt_mask,
uint  phys_mask 
)

Power down a set of cores.

Parameters
[in]virt_maskWhich virtual cores to power down
[in]phys_maskWhich physical cores to power down

◆ signal_app()

void signal_app ( uint  data)

Signal cores running a range of applications identified by an AppID and a mask.

Parameters
[in]dataWhat signal, cores and app ID

Delegates to: