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

Subversion Repositories async_sdm_noc

[/] [async_sdm_noc/] [trunk/] [vc/] [tb/] [node_top.v] - Blame information for rev 80

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 44 wsong0210
/*
2
 Asynchronous SDM NoC
3
 (C)2011 Wei Song
4
 Advanced Processor Technologies Group
5
 Computer Science, the Univ. of Manchester, UK
6
 
7
 Authors:
8
 Wei Song     wsong83@gmail.com
9
 
10
 License: LGPL 3.0 or later
11
 
12
 A network node including a router, a NI and a processing element.
13
 
14
 History:
15
 03/03/2011  Initial version. <wsong83@gmail.com>
16
 04/03/2011  Support VC. <wsong83@gmail.com>
17
 05/06/2011  Clean up for opensource. <wsong83@gmail.com>
18
 
19
*/
20
 
21
// the router structure definitions
22
`include "define.v"
23
 
24
module node_top(/*AUTOARG*/
25
   // Outputs
26
   sia, wia, nia, eia, sic, wic, nic, eic, so0, so1, so2, so3, wo0,
27
   wo1, wo2, wo3, no0, no1, no2, no3, eo0, eo1, eo2, eo3, soft, woft,
28
   noft, eoft, sovc, wovc, novc, eovc, soca, woca, noca, eoca,
29
   // Inputs
30
   si0, si1, si2, si3, wi0, wi1, wi2, wi3, ni0, ni1, ni2, ni3, ei0,
31
   ei1, ei2, ei3, sift, wift, nift, eift, sivc, wivc, nivc, eivc,
32
   sica, wica, nica, eica, soa, woa, noa, eoa, soc, woc, noc, eoc,
33
   rst_n
34
   );
35
   parameter DW = 32;
36
   parameter VCN = 1;
37
   parameter FT = 3;
38
   parameter x = 0;
39
   parameter y = 0;
40
   parameter SCN = DW/2;
41
 
42
   input [SCN-1:0]    si0, si1, si2, si3;
43
   input [SCN-1:0]    wi0, wi1, wi2, wi3;
44
   input [SCN-1:0]    ni0, ni1, ni2, ni3;
45
   input [SCN-1:0]    ei0, ei1, ei2, ei3;
46
   input [FT-1:0]     sift, wift, nift, eift;
47
   input [VCN-1:0]    sivc, wivc, nivc, eivc;
48
   output             sia, wia, nia, eia;
49
   output [VCN-1:0]   sic, wic, nic, eic;
50
   input [VCN-1:0]    sica, wica, nica, eica;
51
 
52
   output [SCN-1:0]   so0, so1, so2, so3;
53
   output [SCN-1:0]   wo0, wo1, wo2, wo3;
54
   output [SCN-1:0]   no0, no1, no2, no3;
55
   output [SCN-1:0]   eo0, eo1, eo2, eo3;
56
   output [FT-1:0]    soft, woft, noft, eoft;
57
   output [VCN-1:0]   sovc, wovc, novc, eovc;
58
   input              soa, woa, noa, eoa;
59
   input [VCN-1:0]    soc, woc, noc, eoc;
60
   output [VCN-1:0]   soca, woca, noca, eoca;
61
 
62
   wire [SCN-1:0]     li0, li1, li2, li3;
63
   wire [SCN-1:0]     lo0, lo1, lo2, lo3;
64
   wire [FT-1:0]      lift;
65
   wire [VCN-1:0]     livc;
66
   wire               lia;
67
   wire [VCN-1:0]     lic;
68
   wire [VCN-1:0]     lica;
69
   wire [FT-1:0]      loft;
70
   wire [VCN-1:0]     lovc;
71
   wire               loa;
72
   wire [VCN-1:0]     loc;
73
   wire [VCN-1:0]     loca;
74
 
75
   input                 rst_n;
76
 
77
 
78
   // the network node
79
   NetNode #(.DW(DW), .VCN(VCN), .FT(FT), .x(x), .y(y))
80
   Node (
81
         .doa(loa), .doc(loc),
82
         .do0(lo0), .do1(lo1), .do2(lo2), .do3(lo3),
83
         .doft(loft), .dovc(lovc), .doca(loca),
84
         .dia(lia), .dic(lic),
85
         .di0(li0), .di1(li1), .di2(li2), .di3(li3),
86
         .dift(lift), .divc(livc), .dica(lica),
87
         .rst_n(rst_n)
88
         );
89
 
90
 
91
   // router wrapper
92
   router_hdl #(.DW(DW), .VCN(VCN))
93
   RTN (
94
        .so0(so0), .so1(so1), .so2(so2), .so3(so3), .soa(soa), .soft(soft), .sovc(sovc), .soc(soc), .soca(soca),
95
        .wo0(wo0), .wo1(wo1), .wo2(wo2), .wo3(wo3), .woa(woa), .woft(woft), .wovc(wovc), .woc(woc), .woca(woca),
96
        .no0(no0), .no1(no1), .no2(no2), .no3(no3), .noa(noa), .noft(noft), .novc(novc), .noc(noc), .noca(noca),
97
        .eo0(eo0), .eo1(eo1), .eo2(eo2), .eo3(eo3), .eoa(eoa), .eoft(eoft), .eovc(eovc), .eoc(eoc), .eoca(eoca),
98
        .lo0(lo0), .lo1(lo1), .lo2(lo2), .lo3(lo3), .loa(loa), .loft(loft), .lovc(lovc), .loc(loc), .loca(loca),
99
        .si0(si0), .si1(si1), .si2(si2), .si3(si3), .sia(sia), .sift(sift), .sivc(sivc), .sic(sic), .sica(sica),
100
        .wi0(wi0), .wi1(wi1), .wi2(wi2), .wi3(wi3), .wia(wia), .wift(wift), .wivc(wivc), .wic(wic), .wica(wica),
101
        .ni0(ni0), .ni1(ni1), .ni2(ni2), .ni3(ni3), .nia(nia), .nift(nift), .nivc(nivc), .nic(nic), .nica(nica),
102
        .ei0(ei0), .ei1(ei1), .ei2(ei2), .ei3(ei3), .eia(eia), .eift(eift), .eivc(eivc), .eic(eic), .eica(eica),
103
        .li0(li0), .li1(li1), .li2(li2), .li3(li3), .lia(lia), .lift(lift), .livc(livc), .lic(lic), .lica(lica),
104
        .addrx (b2chain(x)),
105
        .addry (b2chain(y)),
106 45 wsong0210
        .rst_n (rst_n)
107 44 wsong0210
   );
108
 
109
 
110
   // binary to 1-of-4 (Chain) converter
111
   function [7:0] b2chain;
112
      input [3:0]         data;
113
      begin
114
         b2chain[0] = (data[1:0] == 2'b00);
115
         b2chain[1] = (data[1:0] == 2'b01);
116
         b2chain[2] = (data[1:0] == 2'b10);
117
         b2chain[3] = (data[1:0] == 2'b11);
118
         b2chain[4] = (data[3:2] == 2'b00);
119
         b2chain[5] = (data[3:2] == 2'b01);
120
         b2chain[6] = (data[3:2] == 2'b10);
121
         b2chain[7] = (data[3:2] == 2'b11);
122
      end
123
   endfunction
124
 
125
endmodule // node_top

powered by: WebSVN 2.1.0

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