Changes between Version 3 and Version 4 of tim_driver
- Timestamp:
- Oct 25, 2014, 9:26:20 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
tim_driver
v3 v4 5 5 The [source:soft/giet_vm/giet_drivers/tim_driver.c tim_driver.c] and [source:soft/giet_vm/giet_drivers/tim_driver.h tim_driver.h] files define the TIM driver. 6 6 7 The ''vci_multi_timer'' component is a multi-channels timer controller. 7 The ''vci_multi_timer'' component is a multi-channels timer controller. It is an ''external'' peripheral. 8 8 9 For the GIET, it is an ''internal'' peripheral, replicated in each cluster.9 The total number of channels must be defined by the configuration parameter NB_TIM_CHANNELS in the ''hard_config.h'' file. 10 10 11 The SEG_TIM_BASE address must be defined in the hard_config.h file.11 The user timers are allocated to applications by the GIET-VM in the boot phase, as defined in the mapping. The corresponding global index is stored in the context of the task. 12 12 13 There is two types of timers: 14 * '''kernel timers''' : one per processor, used for context switch. The local_id is in [0, NB_PROCS_MAX-1]. 15 * '''user timers''' : requested by the task in the mapping_info data structure. The local_id is in [NB_PROCS_MAX, NB_PROCS_MAX + NB_TIM_CHANNELS -1]. 13 The SEG_TIM_BASE address must be defined in the ''hard_config.h'' file. 16 14 17 The global timer index is cluster_xy * (NB_PROCS_MAX + NB_TIM_CHANNELS) + local_id 18 19 The virtual base address of the associated segment is: vbase = SEG_TIM_BASE + cluster_xy * PERI_CLUSTER_INCREMENT 20 21 The SEG_TIM_BASE, PERI_CLUSTER_INCREMENT, NB_PROCS_MAX and NB_TIM_CHANNELS values must be defined in hard_config.h file. 15 The virtual base address of the associated segment is: vbase = SEG_TIM_BASE + cluster_io << 32. 22 16 23 17 The addressable registers map is defined [source:soft/giet_vm/giet_drivers/tim_driver.h here].