Ignore:
Timestamp:
Nov 3, 2014, 10:53:00 AM (10 years ago)
Author:
alain
Message:

Introducing dynamic allocation of peripheral channel(TTY, NIC, TIM, CMA)
Removint the ICU driver : ICU component not supported anymore.
Removing the FBF driver.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_drivers/tim_driver.h

    r295 r437  
    1 ///////////////////////////////////////////////////////////////////////////////////
     1//////////////////////////////////////////////////////////////////////////////////////
    22// File     : tim_driver.h
    33// Date     : 01/11/2013
     
    55// Copyright (c) UPMC-LIP6
    66///////////////////////////////////////////////////////////////////////////////////
     7// The tim_driver.c and tim_driver.h files are part ot the GIET-VM nano-kernel.
     8// This driver supports the SoCLib vci_multi_timer component.
     9//
     10// It can exist several multi_timers in the architecture (at most one per cluster),
     11// and each one can contain several timers (called channels).
     12//
     13// There is two types of timers:
     14// - "system" timers : one per processor, used for context switch.
     15//   local_id in [0, NB_PROCS_MAX-1],
     16// - "user" timers : requested by the task in the mapping_info data structure.
     17//   For each user timer, the timer_id is stored in the context of the task.
     18// The global index is cluster_xy * (NB_PROCS_MAX + NB_TIM_CHANNELS) + local_id
     19//
     20// The NB_PROCS_MAX and NB_TIM_CHANNELS values must be defined in hard_config.h file.
     21//
     22// The virtual base address of the segment associated to a channel is:
     23//     SEG_TIM_BASE + cluster_xy * PERI_CLUSTER_INCREMENT + TIMER_SPAN * timer_id
     24//
     25// The SEG_TIM_BASE and PERI_CLUSTER_INCREMENT must be defined in hard_config.h.
     26/////////////////////////////////////////////////////////////////////////////////////
    727
    828#ifndef _GIET_TIM_DRIVER_H_
     
    1030
    1131///////////////////////////////////////////////////////////////////////////////////
    12 // TIMER (vci_multi_timer) registers offsets
     32//                   registers offsets
    1333///////////////////////////////////////////////////////////////////////////////////
    1434
     
    2444
    2545///////////////////////////////////////////////////////////////////////////////////
    26 // Timer access functions and global variables
     46//                   access functions
    2747///////////////////////////////////////////////////////////////////////////////////
    2848
    29 extern void _timer_start( unsigned int cluster_xy,
    30                           unsigned int local_id,
    31                           unsigned int period );
     49///////////////////////////////////////////////////////////////////////////////////
     50// This function activates a timer in the vci_timer external peripheral.
     51// - channel : Timer channel global index
     52// - period  : interrupt period (cycles)
     53///////////////////////////////////////////////////////////////////////////////////
     54extern int _timer_start( unsigned int channel,
     55                         unsigned int period );
    3256
    33 extern void _timer_stop( unsigned int cluster_xy,
    34                          unsigned int local_id );
     57///////////////////////////////////////////////////////////////////////////////////
     58// This function desactivates a timer in the vci_timer external component.
     59///////////////////////////////////////////////////////////////////////////////////
     60extern int _timer_stop( unsigned int channel );
    3561
    36 extern void _timer_reset_irq( unsigned int cluster_xy,
    37                               unsigned int local_id );
     62///////////////////////////////////////////////////////////////////////////////////
     63// This function resets the timer counter. To do so, it read the period,
     64// and re-write it in the timer register, what causes the count to restart.
     65///////////////////////////////////////////////////////////////////////////////////
     66extern int _timer_reset_cpt( unsigned int channel );
    3867
    39 extern void _timer_reset_cpt( unsigned int cluster_xy,
    40                               unsigned int local_id);
    41 
     68///////////////////////////////////////////////////////////////////////////////////
     69// This Interrupt Service Routine handles the IRQs generated by the "user" timers.
     70// It can be a HWI or a PTI.
     71// The channel argument is the user timer global index.
     72// The ISR acknowledges the IRQ, registers the event in the proper entry
     73// of the _user_timer_event[] array, and a log message is displayed on TTY0.
     74///////////////////////////////////////////////////////////////////////////////////
    4275extern void _timer_isr( unsigned int irq_type,
    4376                        unsigned int irq_id,
    4477                        unsigned int channel );
    4578
    46 ///////////////////////////////////////////////////////////////////////////////////
    4779
    4880#endif
Note: See TracChangeset for help on using the changeset viewer.