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

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

This is a major release, including a deep restructuration of code.
The main evolutions are

  • use of the Tsar preloader to load the GIET boot-loader from disk
  • introduction of a FAT32 file system library,
  • use of this fat32 library by the boot-loader to load the map.bin data structure, and the various .elf files
  • reorganisation of drivers (one file per peripheral).
  • introduction of drivers for new peripherals: vci_chbuf_dma and vci_multi_ahci.
  • introduction of a new physical memory allocator in the boot code.

This release has been tested on the tsar_generic_iob architecture,
for the two following mappings: 4c_1p_iob_four.xml and 4c_1p_iob_sort.xml

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_id, 
47                                    unsigned int proc_id, 
48                                    unsigned int * buffer );
49
50extern unsigned int _xcu_set_mask( unsigned int cluster_id,
51                                   unsigned int proc_id,
52                                   unsigned int mask, 
53                                   unsigned int is_timer );
54
55extern unsigned int _xcu_send_ipi( unsigned int cluster_id,
56                                   unsigned int proc_id,
57                                   unsigned int wdata );
58
59extern unsigned int _xcu_timer_start( unsigned int cluster_id, 
60                                      unsigned int local_id,
61                                      unsigned int period ); 
62
63extern unsigned int _xcu_timer_stop( unsigned int cluster_id, 
64                                     unsigned int local_id ); 
65
66extern unsigned int _xcu_timer_reset_irq( unsigned int cluster_id, 
67                                          unsigned int local_id );
68
69extern unsigned int _xcu_timer_reset_cpt( unsigned int cluster_id, 
70                                          unsigned int local_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.