📄 test.ned
字号:
//-----------------------------------------------
// default components:
//-----------------------------------------------
simple application
gates:
in: lowergate_in;
in: uppergate_in;
in: blackboard_in;
out: lowergate_out;
out: uppergate_out;
endsimple
simple layer0
gates:
in: lowergate_in[];
in: uppergate_in;
in: blackboard_in;
out: lowergate_out[];
out: uppergate_out;
endsimple
//-----------------------------------------------
// sensor node definition:
//-----------------------------------------------
module sensornode
parameters:
CNNCTVTY: numeric,
KIND: numeric,
COLOR: numeric,
ANOTHER: numeric,
TYPE: numeric,
PX: numeric,
PY: numeric;
// NCOLOR: numeric;
gates:
in: in[];
out: out[];
submodules:
sm_layer0: layer0;
gatesizes:
lowergate_in[CNNCTVTY],
lowergate_out[CNNCTVTY];
display: "p=110,450;i=layer0";
sm_application: application;
display: "p=110,30;i=application";
connections nocheck:
for i=0..CNNCTVTY-1 do
in[i] --> sm_layer0.lowergate_in[i];
out[i] <-- sm_layer0.lowergate_out[i];
endfor;
sm_application.lowergate_in <-- sm_layer0.uppergate_out;
sm_application.lowergate_out --> sm_layer0.uppergate_in;
display: "b=290,485,rect;o=white";
endmodule
// the central manager
simple manager
parameters:
P_FMAP: numeric,
N_FMAP: numeric;
gates:
in: in;
out: out;
endsimple
//-------------------------------------------------
// the parent module
//-------------------------------------------------
module test
parameters:
NNODES: numeric;
submodules:
snode: sensornode[NNODES];
parameters:
CNNCTVTY = 20,
KIND = 2,
ANOTHER = 0,
TYPE = -1,
COLOR = 2,
PX = 0,
PY = 0;
gatesizes:
in[NNODES],
out[NNODES];
display: "p=52,48;b=40,24";
man: manager;
parameters:
P_FMAP = 0,
N_FMAP = 0;
connections nocheck:
display: "p=0,0;b=860,560,rect;o=white";
endmodule
//-------------------------------------------------
// the network
//-------------------------------------------------
network thetest : test
endnetwork
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -