6hcube
所属分类:.net编程
开发工具:Visual C++
文件大小:479KB
下载次数:3
上传日期:2010-01-09 22:00:20
上 传 者:
heqqww
说明: 入门omnet++,omnet++仿真实验,欢迎大家一起交流。
(It is very useful for student who study omnet++.)
文件列表:
hcube\.cvsignore (17, 2006-10-21)
hcube\ChangeLog (2239, 2006-10-21)
hcube\gensink.cpp (2979, 2006-10-21)
hcube\gensink.h (743, 2006-10-21)
hcube\gensink.ned (610, 2006-10-21)
hcube\hcpacket.msg (404, 2006-10-21)
hcube\hcube.dsp (9622, 2009-07-26)
hcube\hcube.dsp.in (9516, 2006-10-21)
hcube\hcube.dsw (535, 2006-10-21)
hcube\hcube.exe (1617920, 2006-10-21)
hcube\hcube.ned (1503, 2006-10-21)
hcube\hc_net.ned (1730, 2006-10-21)
hcube\hc_rte.cpp (4942, 2006-10-21)
hcube\hc_rte.h (579, 2006-10-21)
hcube\hc_rte.ned (511, 2006-10-21)
hcube\Makefile.vc (3660, 2006-10-21)
hcube\omnetpp.ini (721, 2006-10-21)
hcube (0, 2009-07-26)
HCUBE
=====
Hypercube-interconnected network with simplified deflection routing.
Each node consists of router (rte) module, a source and a sink.
Demonstrates:
- hypercube topology with dimension as parameter
- topology templates
- output vectors
Model description
-----------------
A hypercube with d dimensions has 2^d nodes. If we number the nodes
from 0 thru (2^d)-1 and look at the numbers as d-digit binary
numbers, then each node will be connected to d other nodes which differ
only in one bit. That is, suppose d=4 for example, then 0010 (node 2)
will be connected to 1010 (node 10), 0110 (node 6), 0000 (0) and 0011
(node 3). This is how the hypercube is built in hcube.ned; the gate
number is the number of the bit that differs, that is, node 0010's
gate #2 goes to node 0110.
The hypercube module in hcube.ned takes the d dimension as a parameter.
It also takes another parameter called nodetype: a string that names
the module type to be used as node in the hypercube. In hc_net.ned,
when a hypercube network is described, nodetype is give the "HypercubeNode"
value. HypercubeNode is a compound module type which consists of a
traffic source (generator), a traffic sink and a router module.
The router module works in the following way. There are time slots to which
all transmission is synchronized. In each time slot, the router node
receives packets from its neighbors, decides on which gate each packet
needs to be sent, and sends them out in the next time slot.
In a hypercube, routing is simple: the binary numbers of the current
node and the destination node differ in some bits; one bit needs
to be 'corrected' and the packet needs to be sent out thru the corresponding
gate. For example, if we are in node 0010 and the packet's destination
is 1000, then bit 3 and bit 1 differ, thus the packet can be sent out either
on gate 3 or on gate 1. Thus ideally, any packet could reach its destination
in a number of hops that is the Hamming distance between its source and
destination binary node numbers.
The router module uses deflection routing. This means that there is no buffer
in the router module: if more than one packet needs to be sent out thru
the same gate, then one is deflected: it is sent out thru another gate.
Packets from the local user (traffic source or generator) can only be
accepted if there is a free gate left in the given time slot, that is,
less than d packets need to be routed. The hc_rte.cc file contains the
HCRouter simple module which implements a simple deflection routing
scheme.
近期下载者:
相关文件:
收藏者: