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/mwr_driver.c

    r295 r320  
    99//
    1010// This peripheral can be replicated (at most one component per cluster).
    11 ///////////////////////////////////////////////////////////////////////////////////
     11//
    1212// The (virtual) base address of the associated segment is:
     13//       SEG_MWR_BASE + cluster_xy * VSEG_CLUSTER_INCREMENT
    1314//
    14 //       seg_mwr_base + cluster_xy * vseg_cluster_increment
    15 //
    16 // The seg_mwr_base and vseg_cluster_increment values must be defined
    17 // in the giet_vsegs.ld file.
     15// SEG_MWR_BASE and VSEG_CLUSTER_INCREMENT must be defined in hard_config.h
    1816////////////////////////////////////////////////////////////////////////////////
    1917
    2018#include <giet_config.h>
     19#include <hard_config.h>
    2120#include <mwr_driver.h>
    2221#include <utils.h>
     
    3635#if !defined(Y_WIDTH)
    3736# error: You must define X_WIDTH in the hard_config.h file
     37#endif
     38
     39#if !defined(SEG_MWR_BASE)
     40# error: You must define SEG_MWR_BASE in the hard_config.h file
     41#endif
     42
     43#if !defined(VSEG_CLUSTER_INCREMENT)
     44# error: You must define VSEG_CLUSTER_INCREMENT in the hard_config.h file
    3845#endif
    3946
     
    6774
    6875    // compute base address
    69     unsigned int* mwr_address = (unsigned int*) ((unsigned int)&seg_mwr_base +
    70                                  (cluster_xy * (unsigned int)&vseg_cluster_increment));
     76    unsigned int* mwr_address = (unsigned int*) ( SEG_MWR_BASE +
     77                                 (cluster_xy * VSEG_CLUSTER_INCREMENT) );
    7178
    7279    unsigned int lsb = (unsigned int)channel_pbase;
Note: See TracChangeset for help on using the changeset viewer.