Merge branch 'master' into develop
Conflicts: .cproject .settings/language.settings.xml CMakeLists.txt examples/simple_system/gpio.cpp examples/simple_system/plic.cpp sc-components
This commit is contained in:
@ -21,7 +21,6 @@
|
||||
*/
|
||||
|
||||
#include <scc/report.h>
|
||||
#include <scc/scv_tr_db.h>
|
||||
#include <scc/tracer.h>
|
||||
#include <boost/program_options.hpp>
|
||||
#include <scc/ordered_semaphore.h>
|
||||
@ -50,7 +49,7 @@ private:
|
||||
sem_t.set_capacity(4);
|
||||
sem_t.post();
|
||||
sem.post();
|
||||
sc_stop();
|
||||
sc_core::sc_stop();
|
||||
}
|
||||
scc::ordered_semaphore sem{"sem", 2};
|
||||
scc::ordered_semaphore_t<2> sem_t{"sem_t"};
|
||||
@ -103,8 +102,8 @@ int sc_main(int argc, char *argv[]) {
|
||||
SCCERR() << "simulation timed out";
|
||||
sc_core::sc_stop();
|
||||
}
|
||||
auto errcnt = sc_report_handler::get_count(SC_ERROR);
|
||||
auto warncnt = sc_report_handler::get_count(SC_WARNING);
|
||||
auto errcnt = sc_core::sc_report_handler::get_count(sc_core::SC_ERROR);
|
||||
auto warncnt = sc_core::sc_report_handler::get_count(sc_core::SC_WARNING);
|
||||
SCCINFO() << "Finished, there were " << errcnt << " error" << (errcnt == 1 ? "" : "s") << " and " << warncnt << " warning"
|
||||
<< (warncnt == 1 ? "" : "s, 1 warning expected");
|
||||
return errcnt + (warncnt-1);
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "pkt_sender.h"
|
||||
#include "types.h"
|
||||
#include <scc/report.h>
|
||||
#include <tlm/tlm_mm.h>
|
||||
#include <tlm/scc/tlm_mm.h>
|
||||
|
||||
using namespace sc_core;
|
||||
|
||||
@ -54,7 +54,7 @@ void pkt_sender::gen_routing(std::vector<uint8_t> &route_vec) {
|
||||
void pkt_sender::run() {
|
||||
wait(clk_i.posedge_event());
|
||||
for(auto i=0U; i<count; i++){
|
||||
tlm::tlm_generic_payload* gp = tlm::tlm_mm<>::get().allocate<packet_ext>();
|
||||
tlm::tlm_generic_payload* gp = tlm::scc::tlm_mm<>::get().allocate<packet_ext>();
|
||||
gen_routing(gp->get_extension<packet_ext>()->routing);
|
||||
tlm::tlm_phase phase{tlm::BEGIN_REQ};
|
||||
sc_time delay;
|
||||
|
@ -10,15 +10,15 @@
|
||||
|
||||
#include <systemc>
|
||||
#include "packet.h"
|
||||
#include <scc/initiator_mixin.h>
|
||||
#include <scc/target_mixin.h>
|
||||
#include <tlm/scc/initiator_mixin.h>
|
||||
#include <tlm/scc/target_mixin.h>
|
||||
|
||||
|
||||
class pkt_sender : sc_core::sc_module {
|
||||
public:
|
||||
sc_core::sc_in<bool> clk_i{"clk_i"};
|
||||
scc::initiator_mixin<tlm::tlm_initiator_socket<32>> isck;
|
||||
scc::target_mixin<tlm::tlm_target_socket<32>> tsck;
|
||||
tlm::scc::initiator_mixin<tlm::tlm_initiator_socket<32>> isck;
|
||||
tlm::scc::target_mixin<tlm::tlm_target_socket<32>> tsck;
|
||||
pkt_sender(sc_core::sc_module_name const&, unsigned dim, unsigned pos_x, unsigned pos_y, unsigned count);
|
||||
virtual ~pkt_sender() = default;
|
||||
sc_core::sc_event const& get_finish_event(){return finish_evt;}
|
||||
|
@ -10,7 +10,6 @@
|
||||
#endif
|
||||
#include "pkt_switch.h"
|
||||
#include "types.h"
|
||||
#include <tlm/tlm_mm.h>
|
||||
#include <scc/report.h>
|
||||
|
||||
using namespace sc_core;
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
#include <systemc>
|
||||
#include "packet.h"
|
||||
#include <scc/tagged_initiator_mixin.h>
|
||||
#include <scc/tagged_target_mixin.h>
|
||||
#include <tlm/scc/tagged_initiator_mixin.h>
|
||||
#include <tlm/scc/tagged_target_mixin.h>
|
||||
#include <scc/sc_owning_signal.h>
|
||||
#include <array>
|
||||
|
||||
@ -20,8 +20,8 @@ class pkt_switch : sc_core::sc_module {
|
||||
public:
|
||||
enum {NONE=std::numeric_limits<unsigned>::max()};
|
||||
sc_core::sc_in<bool> clk_i{"clk_i"};
|
||||
sc_core::sc_vector<scc::tagged_target_mixin<tlm::tlm_target_socket<32>>> tsck{"tsck",4};
|
||||
sc_core::sc_vector<scc::tagged_initiator_mixin<tlm::tlm_initiator_socket<32>>> isck{"isck",4};
|
||||
sc_core::sc_vector<tlm::scc::tagged_target_mixin<tlm::tlm_target_socket<32>>> tsck{"tsck",4};
|
||||
sc_core::sc_vector<tlm::scc::tagged_initiator_mixin<tlm::tlm_initiator_socket<32>>> isck{"isck",4};
|
||||
pkt_switch(sc_core::sc_module_name const&);
|
||||
virtual ~pkt_switch() = default;
|
||||
private:
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "top.h"
|
||||
#include <scc/perf_estimator.h>
|
||||
#include <scc/report.h>
|
||||
#include <scc/scv_tr_db.h>
|
||||
#include <scc/tracer.h>
|
||||
#include <boost/program_options.hpp>
|
||||
|
||||
@ -88,19 +87,19 @@ int sc_main(int argc, char *argv[]) {
|
||||
// run simulation
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
sc_start(sc_core::sc_time(1, sc_core::SC_MS));
|
||||
if(sc_is_running()) {
|
||||
if(sc_core::sc_is_running()) {
|
||||
SCCERR() << "simulation timed out"; // calls sc_stop
|
||||
sc_core::sc_stop();
|
||||
}
|
||||
} catch(sc_report& e) {
|
||||
} catch(sc_core::sc_report& e) {
|
||||
SCCERR() << "Caught sc_report exception during simulation: " << e.what() << ":" << e.get_msg();
|
||||
} catch(std::exception& e) {
|
||||
SCCERR() << "Caught exception during simulation: " << e.what();
|
||||
} catch(...) {
|
||||
SCCERR() << "Caught unspecified exception during simulation";
|
||||
}
|
||||
auto errcnt = sc_report_handler::get_count(SC_ERROR);
|
||||
auto warncnt = sc_report_handler::get_count(SC_WARNING);
|
||||
auto errcnt = sc_core::sc_report_handler::get_count(sc_core::SC_ERROR);
|
||||
auto warncnt = sc_core::sc_report_handler::get_count(sc_core::SC_WARNING);
|
||||
SCCINFO() << "simulation finished, " << errcnt << " error" << (errcnt == 1 ? "" : "s") << " and " << warncnt << " warning"
|
||||
<< (warncnt == 1 ? "" : "s");
|
||||
return errcnt + warncnt;
|
||||
|
Reference in New Issue
Block a user