[Gems-users] memory accesses


Date: Mon, 18 Dec 2006 16:11:52 -0800 (PST)
From: Sevin Fide <sfide@xxxxxxxxx>
Subject: [Gems-users] memory accesses
Hello All,

I've got a device module in Simics 2.2.19 which is
mapped at 0x7FFF00000000. I'd like to log the accesses
to this device in Ruby. Here is a code snippet from my
test program:

#define LOCATION 0x7FFF00000000ULL

  int offset = 0;
  volatile unsigned long long *myDevice = (unsigned
long long *) LOCATION;

  printf("Reading offset %d\n", offset);
  printf("myDevice[%d]=%d\n", offset,
myDevice[offset]);  

I put some printf statements (see below) in
module/ruby.c - ruby_operate and simics/commands.C -
memorytracer_possible_cache_miss and
memorytracer_observe_memory.

if (mem_trans->s.physical_address ==
0x7FFF00000000ULL)
 print something

Before I get anything printed in Simics console, I get
a segmentation fault on the simulated host. I'd
presume the memory request would be sent to Ruby first
and then seg fault as the location is out of the
assigned address range. If that's not the case, then
Ruby never receives the access request to my LOCATION.
Could you please help me with understanding the steps
in memory accesses?

Thanks a lot!

Sevin

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
[← Prev in Thread] Current Thread [Next in Thread→]