Ignore:
Timestamp:
Mar 10, 2015, 3:17:57 PM (9 years ago)
Author:
alain
Message:

Simplification in the mapping_info.h file:
The coproc and cp_port objects have been removed,
because the coprocessors are now described as peripherals.

The xml parser and driver have been modified accordingly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_xml/mapping_info.h

    r511 r522  
    88//
    99// 1) a description of a clusterized hardware architecture.
    10 // The number of cluster is variable (can be one). The number of processors
    11 // per cluster is variable (can be one). The number of peripherals per cluser
    12 // and coprocessor per cluster is variable. The number of physical memory
    13 // banks per cluster is variable.
     10// The number of cluster is variable (can be one).
     11// The number of processors per cluster is variable (can be zero).
     12// The number of peripherals per cluster is variable (can be zero),
     13// The number of physical memory bank per cluster is variable.
    1414//
    1515// 2/ a description of the applications (called vspaces) to be - statically -
    1616// launched on the platform. The number of parallel tasks per application is
    17 // variable (can be one). Multi-Writer/Multi-Reader communication channels
    18 // betwwen tasks are supported. Each vspace contains a variable number
    19 // of virtual segments (called vsegs). The number of virtual space can be one.
     17// variable (can be one). Each vspace contains a variable number
     18// of virtual segments (called vsegs).
    2019//
    2120// 3/ the mapping directives: both tasks on processors, and software objects
    22 // (called vsegs) on the physical memory banks (called psegs).
     21// (vsegs) on the physical memory banks (psegs).
    2322//
    2423// The mapping_info data structure is organised as the concatenation of
    25 // a fixed size header, and 11 variable size arrays:
     24// a fixed size header, and 8 variable size arrays:
    2625//
    2726// - mapping_cluster_t  cluster[] 
     
    3231// - mapping_proc_t     proc[] 
    3332// - mapping_irq_t      irq[]   
    34 // - mapping_coproc_t   coproc[]
    35 // - mapping_cp_port_t  cp_port[]
    3633// - mapping_periph_t   periph[]
    3734//
     
    5047#define MAPPING_PROC_SIZE     sizeof(mapping_proc_t)
    5148#define MAPPING_IRQ_SIZE      sizeof(mapping_irq_t)
    52 #define MAPPING_COPROC_SIZE   sizeof(mapping_coproc_t)
    53 #define MAPPING_CP_PORT_SIZE  sizeof(mapping_cp_port_t)
     49#define MAPPING_PERIPH_SIZE   sizeof(mapping_periph_t)
    5450
    5551#define C_MODE_MASK  0b1000   // cacheable
     
    8682};
    8783
     84
    8885enum psegType
    8986{
    9087    PSEG_TYPE_RAM  = 0,
    91     PSEG_TYPE_ROM  = 1,      // deprecated => you should use PSEG_TYPE_PERI 
    9288    PSEG_TYPE_PERI = 2,
    9389};
    9490
    95 // The enum definitions for psegType and periphType must be kept
    96 // consistent with the definitions in the xml_driver.c file...
    97 
    98 enum periphType
     91
     92////////////////////////////////////////////////////////////////////
     93// These enum must be coherent with the values in
     94// xml_driver.c / xml_parser.c / mapping.py
     95///////////////////////////////////////////////////////////////////
     96enum periphTypes
    9997{
    10098    PERIPH_TYPE_CMA       = 0,
     
    117115};
    118116
    119 enum periphSubtype
    120 {
    121     PERIPH_SUBTYPE_BDV       = 0,
    122     PERIPH_SUBTYPE_HBA       = 1,
    123     PERIPH_SUBTYPE_SPI       = 2,
    124     PERIPH_SUBTYPE_NONE      = 3,
    125 };
    126 
    127 enum mwmrPortDirection
    128 {
    129     PORT_TO_COPROC   = 0, // status register
    130     PORT_FROM_COPROC = 1, // config register
    131 };
    132 
     117enum iocTypes
     118{
     119    IOC_SUBTYPE_BDV    = 0,
     120    IOC_SUBTYPE_HBA    = 1,
     121    IOC_SUBTYPE_SPI    = 2,
     122    IOC_SUBTYPE_NONE   = 3,
     123};
     124
     125enum mwrTypes
     126{
     127    MWR_SUBTYPE_GCD       = 0,
     128    MWR_SUBTYPE_DCT       = 1,
     129};
     130
     131//////////////////////////////////////////////////////////
     132// This enum must be coherent with the values in
     133// mwr_driver.h               
     134//////////////////////////////////////////////////////////
     135enum MwmrDmaModes
     136{
     137    MODE_MWMR             = 0,
     138    MODE_DMA_IRQ          = 1,
     139    MODE_DMA_NO_IRQ       = 2,
     140};
    133141
    134142////////////////////////////////////////////////////////
     
    149157    unsigned int vsegs;              // total number of virtual segments
    150158    unsigned int tasks;              // total number of tasks
    151     unsigned int procs;              // total number of procs
     159    unsigned int procs;              // total number of processors
    152160    unsigned int irqs;               // total number of irqs
    153     unsigned int coprocs;            // total number of coprocs
    154     unsigned int cp_ports;           // total number of cp_ports
    155161    unsigned int periphs;            // total number of peripherals
    156162    char name[32];                   // mapping name
     
    165171
    166172    unsigned int    psegs;           // number of psegs in cluster
    167     unsigned int    pseg_offset;     // global index of first pseg in psegs
     173    unsigned int    pseg_offset;     // global index of first pseg in cluster
    168174
    169175    unsigned int    procs;           // number of processors in cluster
    170     unsigned int    proc_offset;     // global index of first proc in procs
     176    unsigned int    proc_offset;     // global index of first proc in cluster
    171177 
    172     unsigned int    coprocs;         // number of coprocessors in cluster
    173     unsigned int    coproc_offset;   // global index of first coproc in coprocs
    174 
    175178    unsigned int    periphs;         // number of peripherals in cluster
    176     unsigned int    periph_offset;   // global index of first coproc in periphs
     179    unsigned int    periph_offset;   // global index of first coproc in cluster
    177180} mapping_cluster_t;
    178181
     
    241244
    242245////////////////////////////////////////////////////////
    243 typedef struct __attribute__((packed))  mapping_coproc_s
    244 {
    245     char            name[32];        // coprocessor name (probablement inutile AG)
    246     unsigned int    psegid;          // global pseg index
    247     unsigned int    ports;           // number of MWMR ports used by coprocessor
    248     unsigned int    port_offset;     // global index of first MWMR port
    249 } mapping_coproc_t;
    250 
    251 
    252 /////////////////////////////////////////////////////////
    253 typedef struct __attribute__((packed))  mapping_cp_port_s
    254 {
    255     unsigned int    direction;       // TO_COPROC == 0 / FROM_COPROC == 1
    256     unsigned int    vspaceid;        // index of the vspace containing MWMR channel
    257     unsigned int    mwmr_vseg_id;    // global index of vseg containing MWMR channel
    258 } mapping_cp_port_t;
    259 
    260 
    261 ////////////////////////////////////////////////////////
    262246typedef struct __attribute__((packed))  mapping_periph_s
    263247{
     
    266250    unsigned int    psegid;          // pseg index in cluster
    267251    unsigned int    channels;        // number of channels
    268     unsigned int    arg;             // argument depending on peripheral type
     252    unsigned int    arg0;            // semantic depends on peripheral type
     253    unsigned int    arg1;            // semantic depends on peripheral type
     254    unsigned int    arg2;            // semantic depends on peripheral type
     255    unsigned int    arg3;            // semantic depends on peripheral type
    269256    unsigned int    irqs;            // number of input IRQs (for XCU or PIC)
    270257    unsigned int    irq_offset;      // index of first IRQ
Note: See TracChangeset for help on using the changeset viewer.