Last change
on this file since 5 was
5,
checked in by guillaumeb, 15 years ago
|
Réorganisation des dossiers
déplacement des fichiers source dans le sous dossier ./src
déplacement de systemc dans le sous-dossier ./lib
|
File size:
919 bytes
|
Rev | Line | |
---|
[2] | 1 | #ifndef CPU_REQ_H_ |
---|
| 2 | #define CPU_REQ_H_ |
---|
| 3 | |
---|
| 4 | #include <systemc.h> |
---|
| 5 | #include <iostream> |
---|
| 6 | #include <iomanip> |
---|
| 7 | |
---|
| 8 | class RawAddress { |
---|
| 9 | |
---|
| 10 | public: |
---|
| 11 | unsigned int address; |
---|
| 12 | |
---|
| 13 | RawAddress (const unsigned int address = 0) { |
---|
| 14 | this->address = address; |
---|
| 15 | } |
---|
| 16 | |
---|
| 17 | inline bool operator == (const RawAddress& rhs) const { |
---|
| 18 | return (rhs.address == address); |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | inline RawAddress& operator = (const RawAddress& rhs) { |
---|
| 22 | address = rhs.address; |
---|
| 23 | return *this; |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | inline friend void sc_trace(sc_trace_file *tf, const RawAddress & v, const std::string & NAME ) { |
---|
| 28 | // FIXME |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | inline friend ostream& operator << ( ostream& os, RawAddress const & v ) { |
---|
| 33 | os << "0x" << hex << std::setfill('0') << std::setw(8) << v.address ; |
---|
| 34 | return os; |
---|
| 35 | } |
---|
| 36 | |
---|
| 37 | inline bool operator < (const RawAddress& rhs) const { |
---|
| 38 | return (rhs.address < address); |
---|
| 39 | } |
---|
| 40 | }; |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.