source: trunk/IPs/systemC/Environment/Sim2OS/src/Sim2OS_convert_address.cpp @ 88

Last change on this file since 88 was 88, checked in by rosiere, 15 years ago

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 562 bytes
Line 
1#include "../include/Sim2OS.h"
2
3namespace environment {
4namespace sim2os {
5
6  /*
7   * convert a address in the simulator on a address in OS
8   */
9  void * Sim2OS::convert_address (void * address)
10  {
11    void * result = param->segment_table->getAddrAlloc(static_cast<uint32_t>(reinterpret_cast<uint64_t>(address)));
12   
13    if (result == NULL)
14      {
15        std::cerr << "<" << name << "> address don't match : " << std::hex << static_cast<uint32_t>(reinterpret_cast<uint64_t>(address)) << std::dec << std::endl;
16        exit(0);
17      }
18   
19    return result;
20  }
21
22};
23};
Note: See TracBrowser for help on using the repository browser.