-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
35 lines (27 loc) · 748 Bytes
/
Copy pathmain.cpp
File metadata and controls
35 lines (27 loc) · 748 Bytes
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
#include "RRAM.h"
#include "sender.h"
int sc_main(int argc, char* argv[])
{
sc_report_handler::set_actions("/IEEE_Std_1666/deprecated", SC_DO_NOTHING);
RRAM rram("rram");
sender controller("controller");
sc_fifo<sc_bit> data_in;
sc_fifo<sc_bit> data_out;
sc_signal<sc_bit> cs;
sc_signal<bool> clk;
sc_trace_file* tracefile;
tracefile = sc_create_vcd_trace_file("waveform");
rram.data_in_p(data_in);
rram.data_out_p(data_out);
rram.clk_p(clk);
rram.cs_p(cs);
controller.bit_out(data_in);
controller.bit_in(data_out);
controller.clk(clk);
controller.cs_pin(cs);
sc_trace(tracefile,cs,"cs");
sc_trace(tracefile,clk,"clk");
sc_start();
sc_close_vcd_trace_file(tracefile);
return 0;
}