OpenCores
URL https://opencores.org/ocsvn/noc/noc/trunk

Subversion Repositories noc

[/] [noc/] [src/] [noc.cc] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 imori
#include <systemc>
2
#include <iostream>
3
#include "top.h"
4
#include "power_model.h"
5
 
6
using namespace sc_core;
7
 
8
double oi_energy = 0;
9
double ei_energy = 0;
10
double oi_delay = 0;
11
double ei_delay = 0;
12
 
13
int sc_main(int argc, char *argv[])
14
{
15
        cout << "---------------------------------------------" << endl;
16
        cout << "ROW: [" << ROW << "], COLUMN: [" << COLUMN << "]"<< endl;
17
        sc_set_time_resolution(1, SC_NS);
18
 
19
        top noc("noc");
20
 
21
        sc_clock clk("clk",10,SC_NS,0.5);
22
        sc_trace_file *tf;
23
 
24
        tf = sc_create_vcd_trace_file("noc");
25
        tf->set_time_unit(1,SC_NS);
26
 
27
        noc.clk(clk.signal());
28
 
29
        sc_trace(tf, noc.clk, "clk");
30
        sc_trace(tf, noc.reset_n, "reset_n");
31
 
32
        //Signal between tile1 and tile2. 
33
        sc_trace(tf, noc.data_in[0], "data_in0");
34
        sc_trace(tf, noc.data_out[0], "data_out0");
35
        sc_trace(tf, noc.oi_in[0], "OI_in0");
36
        sc_trace(tf, noc.oi_out[0], "OI_out0");
37
 
38
        sc_trace(tf, noc.in_full[0],"in_full0");
39
        sc_trace(tf, noc.out_full[0], "out_full0");
40
        sc_trace(tf, noc.in_sel[0], "in_sel0");
41
        sc_trace(tf, noc.out_sel[0], "out_sel0");
42
        sc_trace(tf, noc.in_write_n[0], "in_write_n0");
43
        sc_trace(tf, noc.out_write_n[0], "out_write_n0");
44
 
45
        sc_start(5000, SC_NS);
46
        sc_close_vcd_trace_file(tf);
47
        Energy_disp();
48
        return 0;
49
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.