source: trunk/IPs/systemC/Environment/Data/src/Data_read.cpp @ 145

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

1) valgrind fix
2) debug file on/off

  • Property svn:keywords set to Id
File size: 491 bytes
Line 
1#include "../include/Data.h"
2
3namespace environment {
4namespace data {
5
6  bool Data::read (uint32_t address, uint32_t size, char * & data_dest)
7  {
8//     for (uint32_t i=0; i<size; ++i)
9//       data_dest[i] = '\0';
10   
11    uint32_t num_seg = 0;
12   
13    // Scan all segment
14    for (; num_seg < nb_seg; num_seg ++)
15      if (segment[num_seg]->test (address,size) == true)
16        {
17          segment[num_seg]->read (address,size,data_dest);
18          break;
19        }
20   
21    return (num_seg < nb_seg);
22  }
23
24
25};
26};
Note: See TracBrowser for help on using the repository browser.