Added SCC and refactored CMake files
This commit is contained in:
15
components/CMakeLists.txt
Normal file
15
components/CMakeLists.txt
Normal file
@ -0,0 +1,15 @@
|
||||
FILE(GLOB LibHeaders *.h)
|
||||
set(LIB_HEADERS ${LibHeaders} )
|
||||
set(LIB_SOURCES
|
||||
initiator.cpp
|
||||
logging.cpp
|
||||
target.cpp
|
||||
)
|
||||
|
||||
|
||||
# Define two variables in order not to repeat ourselves.
|
||||
set(LIBRARY_NAME components)
|
||||
|
||||
# Define the library
|
||||
add_library(${LIBRARY_NAME} SHARED ${LIB_SOURCES})
|
||||
target_link_libraries (${LIBRARY_NAME} LINK_PUBLIC sc-components)
|
@ -9,8 +9,7 @@
|
||||
#define COMPONENTS_H_
|
||||
|
||||
//#include "tx_example_mods.h"
|
||||
#include <systemc.h>
|
||||
#include "logging.h"
|
||||
//#include "logging.h"
|
||||
#include "initiator.h"
|
||||
#include "router.h"
|
||||
#include "target.h"
|
||||
|
@ -6,7 +6,8 @@
|
||||
*/
|
||||
|
||||
#include "initiator.h"
|
||||
#include "logging.h"
|
||||
|
||||
#include <scc/report.h>
|
||||
|
||||
|
||||
Initiator::Initiator(::sc_core::sc_module_name nm)
|
||||
@ -51,7 +52,7 @@ void Initiator::thread_process() {
|
||||
wait( dmi_data.get_write_latency() );
|
||||
}
|
||||
|
||||
LOG_INFO << "DMI = { " << (cmd ? 'W' : 'R') << ", " << hex << i
|
||||
SCINFO() << "DMI = { " << (cmd ? 'W' : 'R') << ", " << hex << i
|
||||
<< " } , data = " << hex << data << " at time " << sc_time_stamp();
|
||||
}
|
||||
else
|
||||
@ -97,7 +98,7 @@ void Initiator::thread_process() {
|
||||
dmi_ptr_valid = socket->get_direct_mem_ptr( *trans, dmi_data );
|
||||
}
|
||||
|
||||
LOG_INFO << "trans = { " << (cmd ? 'W' : 'R') << ", " << hex << i
|
||||
SCINFO() << "trans = { " << (cmd ? 'W' : 'R') << ", " << hex << i
|
||||
<< " } , data = " << hex << data << " at time " << sc_time_stamp();
|
||||
}
|
||||
}
|
||||
@ -115,7 +116,7 @@ void Initiator::thread_process() {
|
||||
|
||||
for (unsigned int i = 0; i < n_bytes; i += 4)
|
||||
{
|
||||
LOG_INFO << "mem[" << (A + i) << "] = "
|
||||
SCINFO() << "mem[" << (A + i) << "] = "
|
||||
<< *(reinterpret_cast<unsigned int*>( &data[i] ));
|
||||
}
|
||||
|
||||
@ -127,7 +128,7 @@ void Initiator::thread_process() {
|
||||
|
||||
for (unsigned int i = 0; i < n_bytes; i += 4)
|
||||
{
|
||||
LOG_INFO << "mem[" << (A + i) << "] = "
|
||||
SCINFO() << "mem[" << (A + i) << "] = "
|
||||
<< *(reinterpret_cast<unsigned int*>( &data[i] ));
|
||||
}
|
||||
}
|
||||
|
@ -6,12 +6,12 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "logging.h"
|
||||
#include <systemc>
|
||||
#include <deque>
|
||||
#include <array>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include "logging_.h"
|
||||
|
||||
using namespace sc_core;
|
||||
|
||||
|
Reference in New Issue
Block a user