source: soft/giet_vm/giet_drivers/xcu_driver.h @ 267

Last change on this file since 267 was 263, checked in by alain, 11 years ago

Introducing support for TSAR fixed format cluster index (cluster_xy)
We have now 4 parameters defined in map.xml:

  • X_WIDTH, Y_WIDTH define the fixed format (typically X_WIDTH = 4 / Y_WIDTH = 4)
  • X_SIZE, Y_SIZE define the actual TSAR 2D mesh variable size (from 1 to 16)
File size: 2.7 KB
Line 
1///////////////////////////////////////////////////////////////////////////////////
2// File     : xcu_driver.h
3// Date     : 01/11/2013
4// Author   : alain greiner
5// Copyright (c) UPMC-LIP6
6///////////////////////////////////////////////////////////////////////////////////
7
8#ifndef _GIET_XCU_DRIVER_H_
9#define _GIET_XCU_DRIVER_H_
10
11///////////////////////////////////////////////////////////////////////////////////
12// XICU registers offsets
13///////////////////////////////////////////////////////////////////////////////////
14
15enum Xicu_registers
16{
17    XICU_WTI_REG = 0,
18    XICU_PTI_PER = 1,
19    XICU_PTI_VAL = 2,
20    XICU_PTI_ACK = 3,
21
22    XICU_MSK_PTI = 4,
23    XICU_MSK_PTI_ENABLE = 5,
24    XICU_MSK_PTI_DISABLE = 6,
25    XICU_PTI_ACTIVE = 6,
26
27    XICU_MSK_HWI = 8,
28    XICU_MSK_HWI_ENABLE = 9,
29    XICU_MSK_HWI_DISABLE = 10,
30    XICU_HWI_ACTIVE = 10,
31
32    XICU_MSK_WTI = 12,
33    XICU_MSK_WTI_ENABLE = 13,
34    XICU_MSK_WTI_DISABLE = 14,
35    XICU_WTI_ACTIVE = 14,
36
37    XICU_PRIO = 15,
38};
39
40#define XICU_REG(func, index) (((func)<<5)|(index))
41 
42///////////////////////////////////////////////////////////////////////////////////
43// XICU access functions
44///////////////////////////////////////////////////////////////////////////////////
45
46extern unsigned int _xcu_get_index( unsigned int cluster_xy, 
47                                    unsigned int proc_id, 
48                                    unsigned int * buffer );
49
50extern unsigned int _xcu_set_mask( unsigned int cluster_xy,
51                                   unsigned int proc_id,
52                                   unsigned int mask, 
53                                   unsigned int is_timer );
54
55extern unsigned int _xcu_send_ipi( unsigned int cluster_xy,
56                                   unsigned int proc_id,
57                                   unsigned int wdata );
58
59extern unsigned int _xcu_timer_start( unsigned int cluster_xy, 
60                                      unsigned int proc_id,
61                                      unsigned int period ); 
62
63extern unsigned int _xcu_timer_stop( unsigned int cluster_xy, 
64                                     unsigned int proc_id ); 
65
66extern unsigned int _xcu_timer_reset_irq( unsigned int cluster_xy, 
67                                          unsigned int proc_id );
68
69extern unsigned int _xcu_timer_reset_cpt( unsigned int cluster_xy, 
70                                          unsigned int proc_id ); 
71
72///////////////////////////////////////////////////////////////////////////////////
73
74#endif
75
76// Local Variables:
77// tab-width: 4
78// c-basic-offset: 4
79// c-file-offsets:((innamespace . 0)(inline-open . 0))
80// indent-tabs-mode: nil
81// End:
82// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
83
Note: See TracBrowser for help on using the repository browser.