Changeset 82 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest
- Timestamp:
- May 1, 2008, 6:48:45 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/test.h
r81 r82 7 7 */ 8 8 9 #define CYCLE_MAX 1024 9 10 10 11 #include "Common/include/Time.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test1.cpp
r81 r82 7 7 */ 8 8 9 /* 10 9 11 #include <queue> 10 12 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/test.h" 11 12 #define NB_ITERATION 113 #define CYCLE_MAX (1024*NB_ITERATION)14 15 #define LABEL(str) \16 { \17 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \18 } while(0)19 20 #define SC_START(cycle_offset) \21 do \22 { \23 /*cout << "SC_START (begin)" << endl;*/ \24 \25 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \26 if (cycle_offset != 0) \27 { \28 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \29 } \30 \31 if (cycle_current > CYCLE_MAX) \32 { \33 TEST_KO("Maximal cycles Reached"); \34 } \35 sc_start(cycle_offset); \36 /*cout << "SC_START (end )" << endl;*/ \37 } while(0)38 13 39 14 … … 55 30 56 31 #ifdef SYSTEMC 57 /********************************************************************* 58 * Déclarations des signaux 59 *********************************************************************/ 32 60 33 string rename = ""; 61 34 … … 129 102 } 130 103 131 /******************************************************** 132 * Instanciation 133 ********************************************************/ 104 // Instanciation 134 105 135 106 cout << "<" << name << "> Instanciation of _Load_store_unit" << endl; … … 215 186 Time * _time = new Time(); 216 187 217 /******************************************************** 218 * Simulation - Begin 219 ********************************************************/ 188 // Simulation - Begin 220 189 221 190 // Initialisation … … 656 625 } 657 626 658 627 LABEL("DCACHE_RSP : "+toString(in_DCACHE_RSP_VAL->read())+" - "+toString(out_DCACHE_RSP_ACK ->read())); 659 628 if (in_DCACHE_RSP_VAL->read() and out_DCACHE_RSP_ACK->read()) 660 629 { … … 677 646 678 647 679 /******************************************************** 680 * Simulation - End 681 ********************************************************/ 648 // Simulation - End 682 649 683 650 TEST_OK ("End of Simulation"); … … 755 722 #endif 756 723 } 724 */ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test2.cpp
r81 r82 9 9 #include <queue> 10 10 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/test.h" 11 12 #define CYCLE_MAX 102413 14 #define LABEL(str) \15 { \16 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \17 } while(0)18 19 #define SC_START(cycle_offset) \20 do \21 { \22 /*cout << "SC_START (begin)" << endl;*/ \23 \24 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \25 if (cycle_offset != 0) \26 { \27 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \28 } \29 \30 if (cycle_current > CYCLE_MAX) \31 { \32 TEST_KO("Maximal cycles Reached"); \33 } \34 sc_start(cycle_offset); \35 /*cout << "SC_START (end )" << endl;*/ \36 } while(0)37 38 11 39 12 //===================================================================={test} … … 71 44 _parameters_statistics, 72 45 #endif 73 _param); 46 _param, 47 USE_ALL); 74 48 75 49 #ifdef SYSTEMC … … 487 461 SC_START(0); 488 462 489 LABEL("MEMORY_IN : "+toString(in_MEMORY_IN_VAL ->read())+" - "+toString(out_MEMORY_IN_ACK ->read()));463 LABEL("MEMORY_IN : %d - %d",in_MEMORY_IN_VAL ->read(),out_MEMORY_IN_ACK ->read()); 490 464 if ( in_MEMORY_IN_VAL ->read() and out_MEMORY_IN_ACK ->read()) 491 465 { 492 466 Tpacket_t packet_id = in_MEMORY_IN_PACKET_ID->read(); 493 467 494 LABEL(" * Accepted MEMORY_IN : " + toString(packet_id));468 LABEL(" * Accepted MEMORY_IN : %d",packet_id); 495 469 cout << fifo_request.top(); 496 470 … … 509 483 } 510 484 511 LABEL("MEMORY_OUT : "+toString(out_MEMORY_OUT_VAL->read())+" - "+toString(in_MEMORY_OUT_ACK ->read()));485 LABEL("MEMORY_OUT : %d - %d",out_MEMORY_OUT_VAL->read(),in_MEMORY_OUT_ACK ->read()); 512 486 if (out_MEMORY_OUT_VAL->read() and in_MEMORY_OUT_ACK->read()) 513 487 { 514 488 Tpacket_t packet_id = out_MEMORY_OUT_PACKET_ID->read(); 515 489 516 LABEL(" * Accepted MEMORY_OUT : " + toString(packet_id));490 LABEL(" * Accepted MEMORY_OUT : %d",packet_id); 517 491 518 492 if (is_operation_memory_store(tab_request[packet_id]._operation)) … … 650 624 } 651 625 652 LABEL("DCACHE_REQ : "+toString(out_DCACHE_REQ_VAL->read())+" - "+toString(in_DCACHE_REQ_ACK ->read()));626 LABEL("DCACHE_REQ : %d - %d",out_DCACHE_REQ_VAL->read(),in_DCACHE_REQ_ACK ->read()); 653 627 if (out_DCACHE_REQ_VAL->read() and in_DCACHE_REQ_ACK->read()) 654 628 { … … 665 639 packet_id = (out_DCACHE_REQ_PACKET_ID ->read())>>1; 666 640 667 LABEL(" * Accepted DCACHE_REQ : " + toString(packet_id));641 LABEL(" * Accepted DCACHE_REQ : %d",packet_id); 668 642 669 643 if (address >= size_memory) … … 676 650 { 677 651 rdata = _memory->access (context_id, address, out_DCACHE_REQ_TYPE->read(), out_DCACHE_REQ_WDATA->read()); 678 LABEL(" * rdata : " + toString(rdata));652 LABEL(" * rdata : 0x%x",rdata); 679 653 } 680 654 … … 699 673 } 700 674 701 LABEL("DCACHE_RSP : "+toString(in_DCACHE_RSP_VAL->read())+" - "+toString(out_DCACHE_RSP_ACK ->read()));675 LABEL("DCACHE_RSP : %d - %d",in_DCACHE_RSP_VAL->read(),out_DCACHE_RSP_ACK ->read()); 702 676 if (in_DCACHE_RSP_VAL->read() and out_DCACHE_RSP_ACK->read()) 703 677 {
Note: See TracChangeset
for help on using the changeset viewer.