Ignore:
Timestamp:
Nov 3, 2014, 10:53:00 AM (10 years ago)
Author:
alain
Message:

Introducing dynamic allocation of peripheral channel(TTY, NIC, TIM, CMA)
Removint the ICU driver : ICU component not supported anymore.
Removing the FBF driver.

File:
1 edited

Legend:

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

    r345 r437  
    55// Copyright (c) UPMC-LIP6
    66///////////////////////////////////////////////////////////////////////////////////
    7 // The sim_driver.c and sim_driver.h files are part ot the GIET-VM nano-kernel.
    8 // This driver supports the vci_sim_helper component.
    9 // There is at most one such component in the architecture.
    10 //
    11 // The SEG_SIM_BASE address must be defined in the hard_config.h file.
    12 ////////////////////////////////////////////////////////////////////////////////
    137
    148#include <hard_config.h>
     
    2014#endif
    2115
    22 ////////////////////////////////////////////////////////////////////////////////
    23 // _sim_helper_access()
    24 // Accesses the Simulation Helper Component.
    25 //
    26 // If the access is on a writable register (except SIMHELPER_PAUSE_SIM),
    27 // the simulation will stop.
    28 // If the access is on a readable register, value is written in retval buffer.
    29 // Returns 0 on success, 1 on failure.
    30 ////////////////////////////////////////////////////////////////////////////////
    31 unsigned int _sim_helper_access( unsigned int register_index,
    32                                  unsigned int value,
    33                                  unsigned int * retval)
     16/////////////////////////////////////////////////////
     17void _sim_helper_access( unsigned int register_index,
     18                         unsigned int value,
     19                         unsigned int * retval )
    3420{
    3521    volatile unsigned int* sim_helper_address = (unsigned int*)&seg_sim_base;
    3622   
    37     if (register_index == SIMHELPER_SC_STOP         ||
    38         register_index == SIMHELPER_END_WITH_RETVAL ||
    39         register_index == SIMHELPER_EXCEPT_WITH_VAL ||
    40         register_index == SIMHELPER_PAUSE_SIM       ||
    41         register_index == SIMHELPER_SIGINT)
     23    if (register_index == SIMHELPER_SC_STOP)
    4224    {
    4325        sim_helper_address[register_index] = value;
    44         return 0;
    4526    }
    4627    else if (register_index == SIMHELPER_CYCLES)
    4728    {
    4829        *retval = sim_helper_address[register_index];
    49         return 0;
    5030    }
    5131    else
    5232    {
    5333        _tty_get_lock( 0 );
    54         _puts("\n[GIET ERROR] in _sim_helper_access() : access to unmapped register\n");
     34        _puts("\n[GIET ERROR] in _sim_helper_access() : undefined register\n");
    5535        _tty_release_lock( 0 );
    56         return 1;
     36        _exit();
    5737    }
    5838}
Note: See TracChangeset for help on using the changeset viewer.