Added tests for binary database
This commit is contained in:
@ -25,6 +25,8 @@ gpio::gpio(sc_core::sc_module_name nm)
|
||||
, tlm_target<>(clk)
|
||||
, NAMED(clk_i)
|
||||
, NAMED(rst_i)
|
||||
, NAMED(out, 32)
|
||||
, NAMED(in, 32)
|
||||
, NAMEDD(gpio_regs, regs) {
|
||||
regs->registerResources(*this);
|
||||
SC_METHOD(clock_cb);
|
||||
|
@ -18,6 +18,7 @@
|
||||
#define _GPIO_H_
|
||||
|
||||
#include <scc/tlm_target.h>
|
||||
#include <tlm/tlm_signal.h>
|
||||
|
||||
namespace sysc {
|
||||
|
||||
@ -28,6 +29,8 @@ public:
|
||||
SC_HAS_PROCESS(gpio);
|
||||
sc_core::sc_in<sc_core::sc_time> clk_i;
|
||||
sc_core::sc_in<bool> rst_i;
|
||||
sc_core::sc_vector<tlm::tlm_signal_initiator_socket<>> out;
|
||||
sc_core::sc_vector<tlm::tlm_signal_target_socket<>> in;
|
||||
gpio(sc_core::sc_module_name nm);
|
||||
virtual ~gpio();
|
||||
|
||||
|
@ -76,7 +76,7 @@ int sc_main(int argc, char *argv[]) {
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// set up tracing & transaction recording
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
tracer trace("simple_system", tracer::TEXT, vm.count("trace"));
|
||||
tracer trace("simple_system", tracer::BINARY, vm.count("trace"));
|
||||
// todo: fix displayed clock period in VCD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
@ -66,6 +66,7 @@ simple_system::simple_system(sc_core::sc_module_name nm)
|
||||
i_master.global_interrupts_o(s_global_interrupts);
|
||||
i_master.core_interrupt_i(s_core_interrupt);
|
||||
|
||||
i_gpio.in(i_gpio.out);
|
||||
SC_THREAD(gen_reset);
|
||||
}
|
||||
|
||||
|
@ -10,5 +10,6 @@ add_executable (transaction_recording
|
||||
target_link_libraries (transaction_recording LINK_PUBLIC sc-components)
|
||||
target_link_libraries (transaction_recording LINK_PUBLIC ${SystemC_LIBRARIES})
|
||||
target_link_libraries (transaction_recording LINK_PUBLIC ${SCV_LIBRARIES})
|
||||
target_link_libraries (transaction_recording LINK_PUBLIC ${Boost_LIBRARIES} )
|
||||
target_link_libraries (transaction_recording LINK_PUBLIC ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries (transaction_recording LINK_PUBLIC ${CMAKE_DL_LIBS})
|
||||
|
@ -324,7 +324,7 @@ inline void design::data_phase() {
|
||||
outstandingType.pop_front();
|
||||
}
|
||||
}
|
||||
extern void scv_tr_sqlite_init();
|
||||
extern void scv_tr_binary_init();
|
||||
|
||||
int sc_main(int argc, char *argv[]) {
|
||||
scv_startup();
|
||||
@ -333,7 +333,7 @@ int sc_main(int argc, char *argv[]) {
|
||||
scv_tr_text_init();
|
||||
const char* fileName = "my_db.txlog";
|
||||
#else
|
||||
scv_tr_sqlite_init();
|
||||
scv_tr_binary_init();
|
||||
const char *fileName = "my_db";
|
||||
#endif
|
||||
scv_tr_db db(fileName);
|
||||
|
Reference in New Issue
Block a user