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

    r298 r320  
    1010// This component can be instanciated in more than one cluster.
    1111///////////////////////////////////////////////////////////////////////////////////
    12 // The seg_iob_base virtual base addresses must be defined in giet_vsegs.ld file.
    13 // The physical base address is supposed to be (cluster_xy << 32) | seg_iob_base.
     12// The SEG_IOB_BASE virtual addresses must be defined in hard_config.h file.
     13// The physical base address is supposed to be (cluster_xy << 32) | SEG_IOB_BASE.
    1414///////////////////////////////////////////////////////////////////////////////////
    1515
     
    1717#include <iob_driver.h>
    1818#include <utils.h>
     19
     20#if !defined(SEG_IOB_BASE)
     21# error: You must define SEG_IOB_BASE in the hard_config.h file
     22#endif
    1923
    2024#if !defined(GIET_USE_IOMMU)
     
    3438                                unsigned int index )       // register index
    3539{
    36     unsigned long long paddr = (unsigned long long)(unsigned int)&seg_iob_base +
     40    unsigned long long paddr = (unsigned long long)SEG_IOB_BASE +
    3741                               ((unsigned long long)cluster_xy << 32) +
    3842                               ((unsigned long long)index << 2);
     
    4852                        unsigned int value )           // value to be written
    4953{
    50     unsigned long long paddr = (unsigned long long)(unsigned int)&seg_iob_base +
     54    unsigned long long paddr = (unsigned long long)SEG_IOB_BASE +
    5155                               ((unsigned long long)cluster_xy << 32) +
    5256                               ((unsigned long long)index << 2);
     
    5458    _physical_write( paddr, value );
    5559}
    56 
    5760
    5861
Note: See TracChangeset for help on using the changeset viewer.