Changeset 101 for trunk/IPs/systemC/Environment/src
- Timestamp:
- Jan 15, 2009, 6:19:08 PM (16 years ago)
- Location:
- trunk/IPs/systemC/Environment/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/Environment/src/Cache_Access_dreq_type2cache_type.cpp
r81 r101 10 10 switch (dreq_type) 11 11 { 12 case DCACHE_TYPE_LOAD_8 : direction=cache::READ ; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 1;break;13 case DCACHE_TYPE_LOAD_16 : direction=cache::READ ; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 2;break;14 case DCACHE_TYPE_LOAD_32 : direction=cache::READ ; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 4;break;15 case DCACHE_TYPE_LOAD_64 : direction=cache::READ ; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 8;break;16 case DCACHE_TYPE_INVALIDATE : direction=cache::NONE ; type=cache::INVALIDATE ; nb_bytes = 1;break;17 case DCACHE_TYPE_FLUSH : direction=cache::NONE ; type=cache::FLUSH ; nb_bytes = 1;break;18 case DCACHE_TYPE_PREFETCH : direction=cache::NONE ; type=cache::INVALIDATE ; nb_bytes = 1;break;19 // case DCACHE_TYPE_STORE_8_ACK : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 1;break;20 case DCACHE_TYPE_STORE_8 : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 1;break;21 case DCACHE_TYPE_STORE_16 : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 2;break;22 case DCACHE_TYPE_STORE_32 : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 4;break;23 case DCACHE_TYPE_STORE_64 : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 8;break;24 case DCACHE_TYPE_ LOCK :25 case DCACHE_TYPE_ SYNCHRONIZATION :12 case DCACHE_TYPE_LOAD_8 : direction=cache::READ ;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 1;break; 13 case DCACHE_TYPE_LOAD_16 : direction=cache::READ ;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 2;break; 14 case DCACHE_TYPE_LOAD_32 : direction=cache::READ ;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 4;break; 15 case DCACHE_TYPE_LOAD_64 : direction=cache::READ ;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 8;break; 16 case DCACHE_TYPE_INVALIDATE : direction=cache::NONE ;type=cache::INVALIDATE ;nb_bytes = 1;break; 17 case DCACHE_TYPE_FLUSH : direction=cache::NONE ;type=cache::FLUSH ;nb_bytes = 1;break; 18 case DCACHE_TYPE_PREFETCH : direction=cache::NONE ;type=cache::PREFETCH ;nb_bytes = 1;break; 19 // case DCACHE_TYPE_STORE_8_ACK : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 1;break; 20 case DCACHE_TYPE_STORE_8 : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 1;break; 21 case DCACHE_TYPE_STORE_16 : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 2;break; 22 case DCACHE_TYPE_STORE_32 : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 4;break; 23 case DCACHE_TYPE_STORE_64 : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 8;break; 24 case DCACHE_TYPE_SYNCHRONIZATION : direction=cache::NONE ;type=cache::SYNCHRONIZATION ;nb_bytes = 1;break; 25 case DCACHE_TYPE_LOCK : direction=cache::NONE ;type=cache::LOCK ;nb_bytes = 1;break; 26 26 default : {std::cerr << "<ireq_type2cache_type> Unkown type (" << dreq_type << ")" << std::endl; exit(1);} 27 27 } -
trunk/IPs/systemC/Environment/src/Cache_Access_ireq_type2cache_type.cpp
r81 r101 13 13 case ICACHE_TYPE_INVALIDATE : {direction=cache::NONE ; type=cache::INVALIDATE; break;} 14 14 case ICACHE_TYPE_PREFETCH : {direction=cache::NONE ; type=cache::PREFETCH ; break;} 15 case ICACHE_TYPE_LOCK : 15 case ICACHE_TYPE_LOCK : {direction=cache::NONE ; type=cache::LOCK ; break;} 16 16 default : {std::cerr << "<ireq_type2cache_type> Unkown type (" << ireq_type << ")" << std::endl; exit(1);} 17 17 } -
trunk/IPs/systemC/Environment/src/Environment_transition.cpp
r88 r101 1 1 #include "../include/Environment.h" 2 3 #define CYCLE_MAX 0 4 #include "../../processor/Morpheo/Common/include/Test.h" 2 5 3 6 using namespace morpheo; … … 171 174 uint32_t size = param->daccess_size_data [i]/8; 172 175 173 // _cout(ENVIRONMENT," * information\n"); 174 // _cout(ENVIRONMENT," * context : %d\n" ,static_cast<uint32_t>(context)); 175 // _cout(ENVIRONMENT," * packet : %d\n" ,static_cast<uint32_t>(packet )); 176 // _cout(ENVIRONMENT," * address : %.x\n",static_cast<uint32_t>(address)); 177 // _cout(ENVIRONMENT," * type : %d\n" ,static_cast<uint32_t>(type )); 178 // _cout(ENVIRONMENT," * size : %d\n" ,static_cast<uint32_t>(size )); 179 180 // search the entity 181 data::Entity entity = component_data->entity(static_cast<uint32_t>(address),size); 182 183 std::cout << entity << std::endl; 176 _cout(ENVIRONMENT," * information\n"); 177 _cout(ENVIRONMENT," * context : %d\n" ,static_cast<uint32_t>(context)); 178 _cout(ENVIRONMENT," * packet : %d\n" ,static_cast<uint32_t>(packet )); 179 _cout(ENVIRONMENT," * address : %.x\n",static_cast<uint32_t>(address)); 180 _cout(ENVIRONMENT," * type : %d\n" ,static_cast<uint32_t>(type )); 181 _cout(ENVIRONMENT," * size : %d\n" ,static_cast<uint32_t>(size )); 184 182 185 183 bool uncached = false; … … 209 207 default :{ must_read=false; must_write=false; must_ack=false; must_ack_on_error=false; break;} 210 208 } 209 210 // search the entity 211 data::Entity entity = component_data->entity(static_cast<uint32_t>(address),nb_bytes); 212 213 std::cout << entity << std::endl; 211 214 212 215 // Test the type of the address … … 250 253 ,static_cast<uint32_t>((wdata>> 0)&0xff) 251 254 ); 255 256 if (wdata == 0) 257 std::cout << STR_OK << std::endl; 258 else 259 std::cout << STR_KO << std::endl; 252 260 253 261 stop (context); … … 289 297 // Read 290 298 _cout(ENVIRONMENT," * Read (%d bytes)\n",size); 291 bus_error |= !component_data->read(address, size,read_dram[0]); // always read a complete word299 bus_error |= !component_data->read(address,nb_bytes,read_dram[0]); // always read a complete word 292 300 293 301 _cout(ENVIRONMENT," * Rdata : "); 294 for (uint32_t i=0; i< size; i++)302 for (uint32_t i=0; i<nb_bytes; i++) 295 303 _cout(ENVIRONMENT,"%.2x",0xff&static_cast<uint32_t>(read_dram[0][i])); 296 304 _cout(ENVIRONMENT,".\n");
Note: See TracChangeset
for help on using the changeset viewer.