Changeset 134 for trunk/IPs/systemC/Environment/Data/src
- Timestamp:
- Jul 15, 2009, 10:41:01 AM (15 years ago)
- Location:
- trunk/IPs/systemC/Environment/Data/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/Environment/Data/src/Data_read.cpp
r81 r134 6 6 bool Data::read (uint32_t address, uint32_t size, char * & data_dest) 7 7 { 8 // for (uint32_t i=0; i<size; ++i) 9 // data_dest[i] = '\0'; 10 8 11 uint32_t num_seg = 0; 9 bool res = false; 10 12 11 13 // Scan all segment 12 for ( num_seg = 0; num_seg < nb_seg; num_seg ++)14 for (; num_seg < nb_seg; num_seg ++) 13 15 if (segment[num_seg]->test (address,size) == true) 14 16 { 15 17 segment[num_seg]->read (address,size,data_dest); 16 res = true;17 18 break; 18 19 } 19 20 20 return res;21 return (num_seg < nb_seg); 21 22 } 22 23 -
trunk/IPs/systemC/Environment/Data/src/Segment.cpp
r81 r134 4 4 namespace data { 5 5 6 Segment::Segment (void)7 {8 name = "";9 base = 0;10 size = 0;11 uncached = false;12 data = NULL;13 type = TYPE_TARGET_MEMORY;14 index = 0;15 }6 // Segment::Segment (void) 7 // { 8 // name = ""; 9 // base = 0; 10 // size = 0; 11 // uncached = false; 12 // data = NULL; 13 // type = TYPE_TARGET_MEMORY; 14 // index = 0; 15 // } 16 16 17 17 Segment::Segment (SEGMENT_TABLE_ENTRY * segment) … … 25 25 type = TYPE_TARGET_MEMORY; 26 26 index = 0; 27 memset((void*)data,0,size * sizeof(char)); 27 28 } 28 29 -
trunk/IPs/systemC/Environment/Data/src/Segment_read.cpp
r81 r134 1 1 #include "../include/Segment.h" 2 #include "../../Common/include/Debug.h" 2 3 3 4 namespace environment { … … 6 7 void Segment::read (uint32_t address, uint32_t size, char * & data_dest) 7 8 { 9 // _cout(true," * kane\n"); 10 // _cout(true," * address : %.8x\n",address); 8 11 for (uint32_t it = 0; it < size ; it ++) 9 data_dest [it] = data[address-base+it]; 12 { 13 data_dest [it] = data[address-base+it]; 14 // _cout(true," * [%d] : %.8x\n",address-base+it,static_cast<uint32_t>(data_dest [it])); 15 } 10 16 } 11 17 -
trunk/IPs/systemC/Environment/Data/src/loadexec.c
r122 r134 142 142 *eoffset = ringo.ladr; 143 143 ringo.mem = malloc(*esize * sizeof(char)); 144 145 memset((void *)ringo.mem,0,*esize * sizeof(char)); 146 144 147 /* Start over again from the start of the memory */ 145 148 bfd_map_over_sections(exec, bindsection, &ringo);
Note: See TracChangeset
for help on using the changeset viewer.