Changeset 88 for trunk/IPs/systemC/Environment/Data/src
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- Location:
- trunk/IPs/systemC/Environment/Data/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/Environment/Data/src/Segment_init.cpp
r81 r88 1 1 #include "../include/Segment.h" 2 #include "../../Common/include/Debug.h" 2 3 3 4 namespace environment { … … 22 23 23 24 memcpy(data, ptab, size); 24 25 25 26 free (ptab); 27 28 29 // { 30 // _cout(DATA,"Segment Init\n"); 31 // _cout(DATA," * size : %d\n",size); 32 // _cout(DATA," * size : %d\n",this->size); 33 // _cout(DATA,"%s\n",print(0).c_str()); 34 35 // uint32_t addr = base; 36 // uint32_t step1 = 4; 37 // uint32_t step2 = step1*8; 38 39 // for (int32_t i=0; i<size; ++i) 40 // { 41 // if ((i%step1) == 0) 42 // _cout(DATA," "); 43 // if ((i%step2) ==0) 44 // { 45 // _cout(DATA,"\n%.8x : ",addr); 46 // addr += step2; 47 // } 48 // _cout(DATA,"%.2x",0xff&static_cast<uint32_t>(data[i])); 49 // } 50 // _cout(DATA,"\n"); 51 // } 26 52 27 53 return true; -
trunk/IPs/systemC/Environment/Data/src/Segment_print.cpp
r81 r88 1 1 #include "../include/Segment.h" 2 #include <sstream> 2 3 3 4 namespace environment { 4 5 namespace data { 6 7 std::string Segment::print(uint32_t depth) 8 { 9 std::ostringstream out(""); 10 std::string tab = std::string(depth,'\t'); 11 12 13 out << tab << "Segment \"" << name << "\"" << std::endl 14 << std::hex 15 << tab << " * base : " << std::setw(8) << std::setfill('0') << base << std::endl 16 << tab << " * size : " << std::setw(8) << std::setfill('0') << size << std::endl 17 << std::dec 18 << tab << " * uncached : " << uncached << std::endl 19 << tab << " * type : " << type; 20 21 return out.str(); 22 } 5 23 6 24 std::ostream& operator<< (std::ostream& output, Segment & x) 7 25 { 8 output << "Segment \"" << x.name << "\"" << std::endl 9 << std::hex 10 << " * base : " << std::setw(8) << std::setfill('0') << x.base << std::endl 11 << " * size : " << std::setw(8) << std::setfill('0') << x.size << std::endl 12 << std::dec 13 << " * uncached : " << x.uncached << std::endl 14 << " * type : " << x.type; 26 output << x.print(0); 15 27 16 28 return output;
Note: See TracChangeset
for help on using the changeset viewer.