source:
etc/simulation/omnet3/AribaSim.ned@
4894
Last change on this file since 4894 was 4894, checked in by , 15 years ago | |
---|---|
File size: 1.5 KB |
Rev | Line | |
---|---|---|
1 | import | |
2 | "Router", | |
3 | "SystemQueue", | |
4 | "StandardHost", | |
5 | "FlatNetworkConfigurator"; | |
6 | ||
7 | channel ethernetline2 | |
8 | delay 0.1us; | |
9 | datarate 100*1000000; | |
10 | endchannel | |
11 | ||
12 | channel gigabitline2 | |
13 | delay 0.1us; | |
14 | datarate 1000*1000000; | |
15 | endchannel | |
16 | ||
17 | module AribaSim | |
18 | parameters: | |
19 | numrouters: numeric const, | |
20 | hostsperrouter: numeric const; | |
21 | submodules: | |
22 | systemqueue: SystemQueue; | |
23 | display: "i=block/queue"; | |
24 | ||
25 | configurator: FlatNetworkConfigurator; | |
26 | parameters: | |
27 | moduleTypes = "Router StandardHost", | |
28 | nonIPModuleTypes = "", | |
29 | networkAddress = "145.236.0.0", | |
30 | netmask = "255.255.0.0"; | |
31 | display: "i=block/cogwheel"; | |
32 | ||
33 | r: Router[numrouters]; | |
34 | display: "i=abstract/router"; | |
35 | node: StandardHost[numrouters*hostsperrouter]; | |
36 | display: "i=device/laptop_vs"; | |
37 | connections nocheck: | |
38 | for i=0..numrouters-1, j=0..hostsperrouter-1 do | |
39 | node[i*hostsperrouter+j].out++ --> ethernetline2 --> r[i].in++; | |
40 | node[i*hostsperrouter+j].in++ <-- ethernetline2 <-- r[i].out++; | |
41 | endfor | |
42 | ||
43 | for i=0..numrouters-2 do | |
44 | r[i].out++ --> gigabitline2 --> r[i+1].in++; | |
45 | r[i+1].out++ --> gigabitline2 --> r[i].in++; | |
46 | endfor | |
47 | endmodule | |
48 | ||
49 | network AribaSimulation : AribaSim | |
50 | parameters: | |
51 | numrouters = input(3, "Number of routers"), | |
52 | hostsperrouter = input(5, "Hosts per router"); | |
53 | endnetwork |
Note:
See TracBrowser
for help on using the repository browser.