Ignore:
Timestamp:
Jun 10, 2014, 12:33:23 PM (10 years ago)
Author:
alain
Message:

All drivers have been modified to use only the information
contained in the hard_config.h file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_drivers/icu_driver.c

    r295 r320  
    1515////////////////////////////////////////////////////////////////////////////////
    1616// The virtual base address of the segment associated to the component is:
     17//      SEG_ICU_BASE + cluster_xy * VSEG_CLUSTER_INCREMENT
    1718//
    18 //      seg_icu_base + cluster_xy * vseg_cluster_increment
    19 //
    20 // The seg_icu_base and vseg_cluster_increment values must be defined
    21 // in giet_vsegs.ld file.
     19// SEG_ICU_BASE and VSEG_CLUSTER_INCREMENT must be defined in hard_config.h
    2220////////////////////////////////////////////////////////////////////////////////
    2321
     
    4745#endif
    4846
    49 #if !defined( USE_XICU )
    50 # error: You must define USE_XICU in the hard_config.h file
     47#if !defined( USE_XCU )
     48# error: You must define USE_XCU in the hard_config.h file
     49#endif
     50
     51#if !defined(SEG_ICU_BASE)
     52# error: You must define SEG_ICU_BASE in the hard_config.h file
     53#endif
     54
     55#if !defined(VSEG_CLUSTER_INCREMENT)
     56# error: You must define VSEG_CLUSTER_INCREMENT in the hard_config.h file
    5157#endif
    5258
     
    6975    if (proc_id >= NB_PROCS_MAX) return 1;
    7076
    71 #if USE_XICU
     77#if USE_XCU
    7278    _printf("[GIET ERROR] _icu_set_mask() should not be used if USE_XICU is set\n");
    7379    return 1;
    7480#else
    75     unsigned int * icu_address = (unsigned int *) ((unsigned int)&seg_icu_base +
    76                                  (cluster_xy * (unsigned int)&vseg_cluster_increment));
     81    unsigned int * icu_address = (unsigned int *) ( SEG_ICU_BASE +
     82                                 (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    7783    icu_address[proc_id * ICU_SPAN + ICU_MASK_SET] = value;
    7884    return 0;
     
    97103    if (proc_id >= NB_PROCS_MAX) return 1;
    98104
    99 #if USE_XICU
     105#if USE_XCU
    100106    _printf("[GIET ERROR] _icu_set_mask() should not be used if USE_XICU is set\n");
    101107    return 1;
    102108#else
    103     unsigned int* icu_address = (unsigned int *) ((unsigned int)&seg_icu_base +
    104                                  (cluster_xy * (unsigned int)&vseg_cluster_increment));
     109    unsigned int * icu_address = (unsigned int *) ( SEG_ICU_BASE +
     110                                 (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    105111    *buffer = icu_address[proc_id * ICU_SPAN + ICU_IT_VECTOR];
    106112    return 0;
Note: See TracChangeset for help on using the changeset viewer.