-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtop.cpp
35 lines (33 loc) · 1.07 KB
/
top.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
* @file top.cpp
* @brief Top-level interconnect implementation
*/
#include "top.hpp"
#include "stimulus.hpp"
#include "duplicator.hpp"
#include "dut.hpp"
#include "checker.hpp"
#include "sc_time_literals.hpp"
using namespace sc_core;
//..............................................................................
Top_module::Top_module( sc_module_name instance ) //< Constructor
: sc_module( instance )
{
/**
* Instantiate
*/
stim = std::make_unique<Stimulus_module> ( "stim" );
dupl = std::make_unique<Duplicator_module> ( "dupl" );
dut = std::make_unique<Dut_module> ( "dut" );
check = std::make_unique<Checker_module> ( "check" );
/**
* Connect
*/
stim->rawout_port .bind( raw_fifo );
dupl->input_port .bind( raw_fifo );
dut->input_port .bind( dupl->out1_xport );
check->result_port .bind( dut->out_xport );
check->rawin_port .bind( dupl->out2_xport );
}
//..............................................................................
Top_module::~Top_module( void ) = default;