Changes between Version 2 and Version 3 of Component/Vci Sim Helper


Ignore:
Timestamp:
Oct 4, 2013, 5:37:04 PM (11 years ago)
Author:
meunier
Comment:

Adding registers PAUSE_SIM and SIGINT

Legend:

Unmodified
Added
Removed
Modified
  • Component/Vci Sim Helper

    v2 v3  
    88the simulation process. It can make the simulation stop, exit or crash different ways.
    99
    10 It has four mapped register accepting only writes.
     10It has six mapped register: 5 accepting only writes, and one accepting only reads.
    1111
    1212Possible actions are:
    1313 * Make the simulator call `sc_stop()`
    14  * Make the simulator call `exit( val )`, with a given `val`
     14 * Make the simulator call `exit(val)`, with a given `val`
    1515 * Make the simulator throw an exception with a given value in message
     16 * Make the simulator raise the interrupt signal SIGINT
    1617 * Make the simulator pause (i.e. wait for a keyboard event)
     18 * Make the simulator return the number of cycles of simulation
    1719
    18 Registers are:
     20Registers accepting writes are:
    1921 * `SIMHELPER_SC_STOP` (at offset 0x0): Call `sc_stop()`
    2022 * `SIMHELPER_END_WITH_RETVAL` (at offset 0x4): Call `exit(val)`
    21  * `SIMHELPER_EXCEPT_WITH_VAL` (at offset 0x8): Create a `soclib::exception::RunTimeError("Simulation yielded error level "+val)`
     23 * `SIMHELPER_EXCEPT_WITH_VAL` (at offset 0x8): Create a `soclib::exception::RunTimeError("Simulation yielded error level " + val)`
    2224 * `SIMHELPER_PAUSE_SIM` (at offset 0xc): Pause simulation
     25 * `SIMHELPER_SIGINT` (at offset 0x14): Raise interrupt signal (SIGINT)
     26
     27Register accepting reads is:
     28 * `SIMHELPER_CYCLES` (at offset 0x10): Returns the number of cycles
     29
    2330
    2431== 2) Component definition & usage ==
     
    5259VciSimhelper simhelper("simhelper",
    5360               IntTab(2,3),
    54                mapping_table );
     61               mapping_table);
    5562}}}
    5663