Ignore:
Timestamp:
Dec 10, 2008, 7:31:39 PM (16 years ago)
Author:
rosiere
Message:

Almost complete design
with Test and test platform

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/Environment/Data/src/Segment_print.cpp

    r81 r88  
    11#include "../include/Segment.h"
     2#include <sstream>
    23
    34namespace environment {
    45namespace 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  }
    523 
    624  std::ostream& operator<< (std::ostream& output, Segment & x)
    725  {
    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);
    1527       
    1628    return output;
Note: See TracChangeset for help on using the changeset viewer.