Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
饶先宏
hdl4se
提交
90a27b52
H
hdl4se
项目概览
饶先宏
/
hdl4se
通知
12
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hdl4se
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
90a27b52
编写于
8月 03, 2021
作者:
饶先宏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
202108030635
上级
3b657fae
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
111 addition
and
49 deletion
+111
-49
examples/hdl4secnn/cnn/cnn/cnn_pooling.c
examples/hdl4secnn/cnn/cnn/cnn_pooling.c
+10
-5
examples/hdl4secnn/cnn/cnncell/cnncell_innerproduct.c
examples/hdl4secnn/cnn/cnncell/cnncell_innerproduct.c
+1
-0
examples/hdl4secnn/cnn/cnncell/cnncell_pooling.c
examples/hdl4secnn/cnn/cnncell/cnncell_pooling.c
+9
-5
examples/hdl4secnn/googlenet/verilog/googlenet.c
examples/hdl4secnn/googlenet/verilog/googlenet.c
+10
-10
examples/hdl4secnn/googlenet/verilog/googlenet.dump.v
examples/hdl4secnn/googlenet/verilog/googlenet.dump.v
+9
-9
examples/hdl4secnn/googlenet/verilog/googlenet.v
examples/hdl4secnn/googlenet/verilog/googlenet.v
+10
-10
examples/hdl4secnn/googlenet/verilog/main.c
examples/hdl4secnn/googlenet/verilog/main.c
+60
-8
hdl4sesim/src/hdl4sesim.c
hdl4sesim/src/hdl4sesim.c
+2
-2
未找到文件。
examples/hdl4secnn/cnn/cnn/cnn_pooling.c
浏览文件 @
90a27b52
...
...
@@ -113,7 +113,7 @@ static int cnn_layer_setup_pooling(cnn_pooling_layer_node * node)
return
0
;
}
#define POOLINGDEBUG
0
#define POOLINGDEBUG
1
#if POOLINGDEBUG
static
FILE
*
pDumpFile
=
NULL
;
...
...
@@ -132,9 +132,9 @@ static int cnn_layer_pushdata_pooling(cnn_pooling_layer_node * node, int port, C
node
->
base
.
inputsize
[
0
][
1
]
*
node
->
base
.
inputsize
[
0
][
2
]
*
sizeof
(
CNNData
));
}
#if POOLINGDEBUG
if
(
layer_info
->
layer_base
.
layer_index
==
1
1
)
{
if
(
layer_info
->
layer_base
.
layer_index
==
1
65
)
{
if
(
pDumpFile
==
NULL
)
{
pDumpFile
=
fopen
(
"d:/gitwork/poolingdebug_1
1
_cnn.txt"
,
"wt"
);
pDumpFile
=
fopen
(
"d:/gitwork/poolingdebug_1
65
_cnn.txt"
,
"wt"
);
}
}
#endif
...
...
@@ -169,7 +169,7 @@ static int cnn_layer_pushdata_pooling(cnn_pooling_layer_node * node, int port, C
/* store it to output buffer */
line_out
[
ww
*
node
->
base
.
outputsize
[
0
][
2
]
+
cc
]
=
data_max
;
#if POOLINGDEBUG
if
(
pDumpFile
!=
NULL
&&
(
layer_info
->
layer_base
.
layer_index
==
1
1
))
if
(
pDumpFile
!=
NULL
&&
(
layer_info
->
layer_base
.
layer_index
==
1
65
))
fprintf
(
pDumpFile
,
"%d, %d, %d, %f
\n
"
,
hh
,
ww
,
cc
,
data_max
);
#endif
...
...
@@ -194,7 +194,12 @@ static int cnn_layer_pushdata_pooling(cnn_pooling_layer_node * node, int port, C
}
}
/* store it to output buffer */
line_out
[
ww
*
node
->
base
.
outputsize
[
0
][
2
]
+
cc
]
=
data_total
/
count
;
data_total
/=
count
;
line_out
[
ww
*
node
->
base
.
outputsize
[
0
][
2
]
+
cc
]
=
data_total
;
#if POOLINGDEBUG
if
(
pDumpFile
!=
NULL
&&
(
layer_info
->
layer_base
.
layer_index
==
165
))
fprintf
(
pDumpFile
,
"%d, %d, %d, %f
\n
"
,
hh
,
ww
,
cc
,
data_total
);
#endif
}
}
}
...
...
examples/hdl4secnn/cnn/cnncell/cnncell_innerproduct.c
浏览文件 @
90a27b52
...
...
@@ -159,6 +159,7 @@ DEFINE_FUNC(cnncell_innerproduct_gen_output_coeff) {
}
END_DEFINE_FUNC
DEFINE_FUNC
(
cnncell_innerproduct_gen_output_read
)
{
vput
(
wDataRead
,
1
);
if
(
vget
(
nwReset
)
==
0
)
{
}
else
{
...
...
examples/hdl4secnn/cnn/cnncell/cnncell_pooling.c
浏览文件 @
90a27b52
...
...
@@ -119,7 +119,7 @@ DEFINE_FUNC(cnncell_pooling_gen_write) {
}
}
END_DEFINE_FUNC
#define CONVDEBUG
0
#define CONVDEBUG
1
#if CONVDEBUG
static
FILE
*
pDumpFile
=
NULL
;
...
...
@@ -135,9 +135,9 @@ DEFINE_FUNC(cnncell_pooling_gen_line) {
int
ww
,
cc
;
int
lineindex
=
vget
(
lineindex
);
#if CONVDEBUG
if
(
strcmp
(
pobj
->
data
.
name
,
"pooling_1
1
"
)
==
0
)
{
if
(
strcmp
(
pobj
->
data
.
name
,
"pooling_1
65
"
)
==
0
)
{
if
(
pDumpFile
==
NULL
)
{
pDumpFile
=
fopen
(
"d:/gitwork/pooling_1
1
.txt"
,
"wt"
);
pDumpFile
=
fopen
(
"d:/gitwork/pooling_1
65
.txt"
,
"wt"
);
}
}
#endif
...
...
@@ -159,7 +159,7 @@ DEFINE_FUNC(cnncell_pooling_gen_line) {
}
}
#if CONVDEBUG
if
(
pDumpFile
!=
NULL
&&
(
strcmp
(
pobj
->
data
.
name
,
"pooling_1
1
"
)
==
0
))
if
(
pDumpFile
!=
NULL
&&
(
strcmp
(
pobj
->
data
.
name
,
"pooling_1
65
"
)
==
0
))
fprintf
(
pDumpFile
,
"%d, %d, %d, %f
\n
"
,
vget
(
writeline
),
ww
,
cc
,
data_max
);
#endif
#if 0
...
...
@@ -200,7 +200,11 @@ DEFINE_FUNC(cnncell_pooling_gen_line) {
#endif
/* store it to output buffer */
pobj
->
line_out
[
ww
*
pobj
->
output_c
+
cc
]
=
data_total
;
}
#if CONVDEBUG
if
(
pDumpFile
!=
NULL
&&
(
strcmp
(
pobj
->
data
.
name
,
"pooling_165"
)
==
0
))
fprintf
(
pDumpFile
,
"%d, %d, %d, %f
\n
"
,
vget
(
writeline
),
ww
,
cc
,
data_total
);
#endif
}
}
}
#if CONVDEBUG
...
...
examples/hdl4secnn/googlenet/verilog/googlenet.c
浏览文件 @
90a27b52
...
...
@@ -31,7 +31,7 @@
/*
* Created by HDL4SE @
Mon Aug 2 06:11:45
2021
* Created by HDL4SE @
Tue Aug 3 06:10:17
2021
* Don't edit it.
*/
...
...
@@ -3206,7 +3206,7 @@ GEN_MODULE_INIT
", wDataWrite_11, bDataWriteData_11"
);
CELL_INST
(
"9AA0D743-5FFB-4649-ACEC-4B4675AE2A57"
,
/* hdl4se_cnn_buf_r4 */
"cnn_buf_11"
,
"32'h20, 32'h
18
0"
,
"32'h20, 32'h
960
0"
,
"wClk, nwReset, wDataRead_13, wDataReadValid_13, bDataReadData_13, wDataRead_15, wDataReadValid_15"
", bDataReadData_15, wDataRead_19, wDataReadValid_19, bDataReadData_19, wDataRead_23"
", wDataReadValid_23, bDataReadData_23, wDataWriteEnable_11, wDataWrite_11, bDataWriteData_11"
);
...
...
@@ -3349,7 +3349,7 @@ GEN_MODULE_INIT
", bDataWriteData_26"
);
CELL_INST
(
"9AA0D743-5FFB-4649-ACEC-4B4675AE2A57"
,
/* hdl4se_cnn_buf_r4 */
"cnn_buf_26"
,
"32'h20, 32'h
2
00"
,
"32'h20, 32'h
c8
00"
,
"wClk, nwReset, wDataRead_28, wDataReadValid_28, bDataReadData_28, wDataRead_30, wDataReadValid_30"
", bDataReadData_30, wDataRead_34, wDataReadValid_34, bDataReadData_34, wDataRead_38"
", wDataReadValid_38, bDataReadData_38, wDataWriteEnable_26, wDataWrite_26, bDataWriteData_26"
);
...
...
@@ -3502,7 +3502,7 @@ GEN_MODULE_INIT
", wDataWrite_42, bDataWriteData_42"
);
CELL_INST
(
"9AA0D743-5FFB-4649-ACEC-4B4675AE2A57"
,
/* hdl4se_cnn_buf_r4 */
"cnn_buf_42"
,
"32'h20, 32'h
3c
0"
,
"32'h20, 32'h
1770
0"
,
"wClk, nwReset, wDataRead_44, wDataReadValid_44, bDataReadData_44, wDataRead_46, wDataReadValid_46"
", bDataReadData_46, wDataRead_50, wDataReadValid_50, bDataReadData_50, wDataRead_54"
", wDataReadValid_54, bDataReadData_54, wDataWriteEnable_42, wDataWrite_42, bDataWriteData_42"
);
...
...
@@ -3645,7 +3645,7 @@ GEN_MODULE_INIT
", bDataWriteData_57"
);
CELL_INST
(
"9AA0D743-5FFB-4649-ACEC-4B4675AE2A57"
,
/* hdl4se_cnn_buf_r4 */
"cnn_buf_57"
,
"32'h20, 32'h
4
00"
,
"32'h20, 32'h
28
00"
,
"wClk, nwReset, wDataRead_67, wDataReadValid_67, bDataReadData_67, wDataRead_69, wDataReadValid_69"
", bDataReadData_69, wDataRead_73, wDataReadValid_73, bDataReadData_73, wDataRead_77"
", wDataReadValid_77, bDataReadData_77, wDataWriteEnable_57, wDataWrite_57, bDataWriteData_57"
);
...
...
@@ -3788,7 +3788,7 @@ GEN_MODULE_INIT
", bDataWriteData_80"
);
CELL_INST
(
"9AA0D743-5FFB-4649-ACEC-4B4675AE2A57"
,
/* hdl4se_cnn_buf_r4 */
"cnn_buf_80"
,
"32'h20, 32'h
4
00"
,
"32'h20, 32'h
28
00"
,
"wClk, nwReset, wDataRead_82, wDataReadValid_82, bDataReadData_82, wDataRead_84, wDataReadValid_84"
", bDataReadData_84, wDataRead_88, wDataReadValid_88, bDataReadData_88, wDataRead_92"
", wDataReadValid_92, bDataReadData_92, wDataWriteEnable_80, wDataWrite_80, bDataWriteData_80"
);
...
...
@@ -3931,7 +3931,7 @@ GEN_MODULE_INIT
", bDataWriteData_95"
);
CELL_INST
(
"9AA0D743-5FFB-4649-ACEC-4B4675AE2A57"
,
/* hdl4se_cnn_buf_r4 */
"cnn_buf_95"
,
"32'h20, 32'h
4
00"
,
"32'h20, 32'h
28
00"
,
"wClk, nwReset, wDataRead_97, wDataReadValid_97, bDataReadData_97, wDataRead_99, wDataReadValid_99"
", bDataReadData_99, wDataRead_103, wDataReadValid_103, bDataReadData_103, wDataRead_107"
", wDataReadValid_107, bDataReadData_107, wDataWriteEnable_95, wDataWrite_95, bDataWriteData_95"
);
...
...
@@ -4074,7 +4074,7 @@ GEN_MODULE_INIT
", wDataWriteEnable_110, wDataWrite_110, bDataWriteData_110"
);
CELL_INST
(
"9AA0D743-5FFB-4649-ACEC-4B4675AE2A57"
,
/* hdl4se_cnn_buf_r4 */
"cnn_buf_110"
,
"32'h20, 32'h
42
0"
,
"32'h20, 32'h
294
0"
,
"wClk, nwReset, wDataRead_120, wDataReadValid_120, bDataReadData_120, wDataRead_122"
", wDataReadValid_122, bDataReadData_122, wDataRead_126, wDataReadValid_126, bDataReadData_126"
", wDataRead_130, wDataReadValid_130, bDataReadData_130, wDataWriteEnable_110, wDataWrite_110"
...
...
@@ -4228,7 +4228,7 @@ GEN_MODULE_INIT
", wDataWrite_134, bDataWriteData_134"
);
CELL_INST
(
"9AA0D743-5FFB-4649-ACEC-4B4675AE2A57"
,
/* hdl4se_cnn_buf_r4 */
"cnn_buf_134"
,
"32'h20, 32'h
68
0"
,
"32'h20, 32'h
410
0"
,
"wClk, nwReset, wDataRead_136, wDataReadValid_136, bDataReadData_136, wDataRead_138"
", wDataReadValid_138, bDataReadData_138, wDataRead_142, wDataReadValid_142, bDataReadData_142"
", wDataRead_146, wDataReadValid_146, bDataReadData_146, wDataWriteEnable_134, wDataWrite_134"
...
...
@@ -4372,7 +4372,7 @@ GEN_MODULE_INIT
", wDataWriteEnable_149, wDataWrite_149, bDataWriteData_149"
);
CELL_INST
(
"9AA0D743-5FFB-4649-ACEC-4B4675AE2A57"
,
/* hdl4se_cnn_buf_r4 */
"cnn_buf_149"
,
"32'h20, 32'h
68
0"
,
"32'h20, 32'h
410
0"
,
"wClk, nwReset, wDataRead_151, wDataReadValid_151, bDataReadData_151, wDataRead_153"
", wDataReadValid_153, bDataReadData_153, wDataRead_157, wDataReadValid_157, bDataReadData_157"
", wDataRead_161, wDataReadValid_161, bDataReadData_161, wDataWriteEnable_149, wDataWrite_149"
...
...
examples/hdl4secnn/googlenet/verilog/googlenet.dump.v
浏览文件 @
90a27b52
...
...
@@ -2313,7 +2313,7 @@ module googlenet
,
32'h3
,
32'h3
,
32'h2
,
32'h2
,
32'h0
,
32'h0
,
32'h0
,
32'h0
)
pooling_11
(
wClk
,
nwReset
,
wDataRead_11
,
wDataReadValid_11
,
bDataReadData_11
,
wDataWriteEnable_11
,
wDataWrite_11
,
bDataWriteData_11
);
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
18
0
)
cnn_buf_11
(
wClk
,
nwReset
,
wDataRead_13
,
wDataReadValid_13
,
bDataReadData_13
,
wDataRead_15
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
960
0
)
cnn_buf_11
(
wClk
,
nwReset
,
wDataRead_13
,
wDataReadValid_13
,
bDataReadData_13
,
wDataRead_15
,
wDataReadValid_15
,
bDataReadData_15
,
wDataRead_19
,
wDataReadValid_19
,
bDataReadData_19
,
wDataRead_23
,
wDataReadValid_23
,
bDataReadData_23
,
wDataWriteEnable_11
,
wDataWrite_11
,
bDataWriteData_11
);
...
...
@@ -2407,7 +2407,7 @@ module googlenet
,
wDataReadValid_26_1
,
bDataReadData_26_1
,
wDataRead_26_2
,
wDataReadValid_26_2
,
bDataReadData_26_2
,
wDataRead_26_3
,
wDataReadValid_26_3
,
bDataReadData_26_3
,
wDataWriteEnable_26
,
wDataWrite_26
,
bDataWriteData_26
);
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
2
00
)
cnn_buf_26
(
wClk
,
nwReset
,
wDataRead_28
,
wDataReadValid_28
,
bDataReadData_28
,
wDataRead_30
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
c8
00
)
cnn_buf_26
(
wClk
,
nwReset
,
wDataRead_28
,
wDataReadValid_28
,
bDataReadData_28
,
wDataRead_30
,
wDataReadValid_30
,
bDataReadData_30
,
wDataRead_34
,
wDataReadValid_34
,
bDataReadData_34
,
wDataRead_38
,
wDataReadValid_38
,
bDataReadData_38
,
wDataWriteEnable_26
,
wDataWrite_26
,
bDataWriteData_26
);
...
...
@@ -2507,7 +2507,7 @@ module googlenet
,
32'h3
,
32'h3
,
32'h2
,
32'h2
,
32'h0
,
32'h0
,
32'h0
,
32'h0
)
pooling_42
(
wClk
,
nwReset
,
wDataRead_42
,
wDataReadValid_42
,
bDataReadData_42
,
wDataWriteEnable_42
,
wDataWrite_42
,
bDataWriteData_42
);
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
3c
0
)
cnn_buf_42
(
wClk
,
nwReset
,
wDataRead_44
,
wDataReadValid_44
,
bDataReadData_44
,
wDataRead_46
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
1770
0
)
cnn_buf_42
(
wClk
,
nwReset
,
wDataRead_44
,
wDataReadValid_44
,
bDataReadData_44
,
wDataRead_46
,
wDataReadValid_46
,
bDataReadData_46
,
wDataRead_50
,
wDataReadValid_50
,
bDataReadData_50
,
wDataRead_54
,
wDataReadValid_54
,
bDataReadData_54
,
wDataWriteEnable_42
,
wDataWrite_42
,
bDataWriteData_42
);
...
...
@@ -2601,7 +2601,7 @@ module googlenet
,
wDataReadValid_57_1
,
bDataReadData_57_1
,
wDataRead_57_2
,
wDataReadValid_57_2
,
bDataReadData_57_2
,
wDataRead_57_3
,
wDataReadValid_57_3
,
bDataReadData_57_3
,
wDataWriteEnable_57
,
wDataWrite_57
,
bDataWriteData_57
);
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
4
00
)
cnn_buf_57
(
wClk
,
nwReset
,
wDataRead_67
,
wDataReadValid_67
,
bDataReadData_67
,
wDataRead_69
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
28
00
)
cnn_buf_57
(
wClk
,
nwReset
,
wDataRead_67
,
wDataReadValid_67
,
bDataReadData_67
,
wDataRead_69
,
wDataReadValid_69
,
bDataReadData_69
,
wDataRead_73
,
wDataReadValid_73
,
bDataReadData_73
,
wDataRead_77
,
wDataReadValid_77
,
bDataReadData_77
,
wDataWriteEnable_57
,
wDataWrite_57
,
bDataWriteData_57
);
...
...
@@ -2695,7 +2695,7 @@ module googlenet
,
wDataReadValid_80_1
,
bDataReadData_80_1
,
wDataRead_80_2
,
wDataReadValid_80_2
,
bDataReadData_80_2
,
wDataRead_80_3
,
wDataReadValid_80_3
,
bDataReadData_80_3
,
wDataWriteEnable_80
,
wDataWrite_80
,
bDataWriteData_80
);
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
4
00
)
cnn_buf_80
(
wClk
,
nwReset
,
wDataRead_82
,
wDataReadValid_82
,
bDataReadData_82
,
wDataRead_84
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
28
00
)
cnn_buf_80
(
wClk
,
nwReset
,
wDataRead_82
,
wDataReadValid_82
,
bDataReadData_82
,
wDataRead_84
,
wDataReadValid_84
,
bDataReadData_84
,
wDataRead_88
,
wDataReadValid_88
,
bDataReadData_88
,
wDataRead_92
,
wDataReadValid_92
,
bDataReadData_92
,
wDataWriteEnable_80
,
wDataWrite_80
,
bDataWriteData_80
);
...
...
@@ -2789,7 +2789,7 @@ module googlenet
,
wDataReadValid_95_1
,
bDataReadData_95_1
,
wDataRead_95_2
,
wDataReadValid_95_2
,
bDataReadData_95_2
,
wDataRead_95_3
,
wDataReadValid_95_3
,
bDataReadData_95_3
,
wDataWriteEnable_95
,
wDataWrite_95
,
bDataWriteData_95
);
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
4
00
)
cnn_buf_95
(
wClk
,
nwReset
,
wDataRead_97
,
wDataReadValid_97
,
bDataReadData_97
,
wDataRead_99
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
28
00
)
cnn_buf_95
(
wClk
,
nwReset
,
wDataRead_97
,
wDataReadValid_97
,
bDataReadData_97
,
wDataRead_99
,
wDataReadValid_99
,
bDataReadData_99
,
wDataRead_103
,
wDataReadValid_103
,
bDataReadData_103
,
wDataRead_107
,
wDataReadValid_107
,
bDataReadData_107
,
wDataWriteEnable_95
,
wDataWrite_95
,
bDataWriteData_95
);
...
...
@@ -2883,7 +2883,7 @@ module googlenet
,
wDataReadValid_110_1
,
bDataReadData_110_1
,
wDataRead_110_2
,
wDataReadValid_110_2
,
bDataReadData_110_2
,
wDataRead_110_3
,
wDataReadValid_110_3
,
bDataReadData_110_3
,
wDataWriteEnable_110
,
wDataWrite_110
,
bDataWriteData_110
);
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
42
0
)
cnn_buf_110
(
wClk
,
nwReset
,
wDataRead_120
,
wDataReadValid_120
,
bDataReadData_120
,
wDataRead_122
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
294
0
)
cnn_buf_110
(
wClk
,
nwReset
,
wDataRead_120
,
wDataReadValid_120
,
bDataReadData_120
,
wDataRead_122
,
wDataReadValid_122
,
bDataReadData_122
,
wDataRead_126
,
wDataReadValid_126
,
bDataReadData_126
,
wDataRead_130
,
wDataReadValid_130
,
bDataReadData_130
,
wDataWriteEnable_110
,
wDataWrite_110
,
bDataWriteData_110
);
...
...
@@ -2983,7 +2983,7 @@ module googlenet
,
32'h3
,
32'h3
,
32'h2
,
32'h2
,
32'h0
,
32'h0
,
32'h0
,
32'h0
)
pooling_134
(
wClk
,
nwReset
,
wDataRead_134
,
wDataReadValid_134
,
bDataReadData_134
,
wDataWriteEnable_134
,
wDataWrite_134
,
bDataWriteData_134
);
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
68
0
)
cnn_buf_134
(
wClk
,
nwReset
,
wDataRead_136
,
wDataReadValid_136
,
bDataReadData_136
,
wDataRead_138
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
410
0
)
cnn_buf_134
(
wClk
,
nwReset
,
wDataRead_136
,
wDataReadValid_136
,
bDataReadData_136
,
wDataRead_138
,
wDataReadValid_138
,
bDataReadData_138
,
wDataRead_142
,
wDataReadValid_142
,
bDataReadData_142
,
wDataRead_146
,
wDataReadValid_146
,
bDataReadData_146
,
wDataWriteEnable_134
,
wDataWrite_134
,
bDataWriteData_134
);
...
...
@@ -3077,7 +3077,7 @@ module googlenet
,
wDataReadValid_149_1
,
bDataReadData_149_1
,
wDataRead_149_2
,
wDataReadValid_149_2
,
bDataReadData_149_2
,
wDataRead_149_3
,
wDataReadValid_149_3
,
bDataReadData_149_3
,
wDataWriteEnable_149
,
wDataWrite_149
,
bDataWriteData_149
);
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
68
0
)
cnn_buf_149
(
wClk
,
nwReset
,
wDataRead_151
,
wDataReadValid_151
,
bDataReadData_151
,
wDataRead_153
hdl4se_cnn_buf_r4
#(
32'h20
,
32'h
410
0
)
cnn_buf_149
(
wClk
,
nwReset
,
wDataRead_151
,
wDataReadValid_151
,
bDataReadData_151
,
wDataRead_153
,
wDataReadValid_153
,
bDataReadData_153
,
wDataRead_157
,
wDataReadValid_157
,
bDataReadData_157
,
wDataRead_161
,
wDataReadValid_161
,
bDataReadData_161
,
wDataWriteEnable_149
,
wDataWrite_149
,
bDataWriteData_149
);
...
...
examples/hdl4secnn/googlenet/verilog/googlenet.v
浏览文件 @
90a27b52
...
...
@@ -31,7 +31,7 @@
/*
* 由googlenet程序生成
* 生成时间:Mon Aug 2 1
6:02:33
2021
* 生成时间:Mon Aug 2 1
9:54:05
2021
* 请不要手工修改。
*/
`include
"hdl4secell.v"
...
...
@@ -531,7 +531,7 @@ module googlenet(
wDataWrite_11
,
bDataWriteData_11
);
hdl4se_cnn_buf_r4
#(
32
,
384
)
hdl4se_cnn_buf_r4
#(
32
,
384
00
)
cnn_buf_11
(
wClk
,
nwReset
,
...
...
@@ -1303,7 +1303,7 @@ module googlenet(
wDataWrite_26
,
bDataWriteData_26
);
hdl4se_cnn_buf_r4
#(
32
,
512
)
hdl4se_cnn_buf_r4
#(
32
,
512
00
)
cnn_buf_26
(
wClk
,
nwReset
,
...
...
@@ -2120,7 +2120,7 @@ module googlenet(
wDataWrite_42
,
bDataWriteData_42
);
hdl4se_cnn_buf_r4
#(
32
,
960
)
hdl4se_cnn_buf_r4
#(
32
,
960
00
)
cnn_buf_42
(
wClk
,
nwReset
,
...
...
@@ -2892,7 +2892,7 @@ module googlenet(
wDataWrite_57
,
bDataWriteData_57
);
hdl4se_cnn_buf_r4
#(
32
,
1024
)
hdl4se_cnn_buf_r4
#(
32
,
1024
0
)
cnn_buf_57
(
wClk
,
nwReset
,
...
...
@@ -3664,7 +3664,7 @@ module googlenet(
wDataWrite_80
,
bDataWriteData_80
);
hdl4se_cnn_buf_r4
#(
32
,
1024
)
hdl4se_cnn_buf_r4
#(
32
,
1024
0
)
cnn_buf_80
(
wClk
,
nwReset
,
...
...
@@ -4436,7 +4436,7 @@ module googlenet(
wDataWrite_95
,
bDataWriteData_95
);
hdl4se_cnn_buf_r4
#(
32
,
1024
)
hdl4se_cnn_buf_r4
#(
32
,
1024
0
)
cnn_buf_95
(
wClk
,
nwReset
,
...
...
@@ -5208,7 +5208,7 @@ module googlenet(
wDataWrite_110
,
bDataWriteData_110
);
hdl4se_cnn_buf_r4
#(
32
,
1056
)
hdl4se_cnn_buf_r4
#(
32
,
1056
0
)
cnn_buf_110
(
wClk
,
nwReset
,
...
...
@@ -6025,7 +6025,7 @@ module googlenet(
wDataWrite_134
,
bDataWriteData_134
);
hdl4se_cnn_buf_r4
#(
32
,
1664
)
hdl4se_cnn_buf_r4
#(
32
,
1664
0
)
cnn_buf_134
(
wClk
,
nwReset
,
...
...
@@ -6797,7 +6797,7 @@ module googlenet(
wDataWrite_149
,
bDataWriteData_149
);
hdl4se_cnn_buf_r4
#(
32
,
1664
)
hdl4se_cnn_buf_r4
#(
32
,
1664
0
)
cnn_buf_149
(
wClk
,
nwReset
,
...
...
examples/hdl4secnn/googlenet/verilog/main.c
浏览文件 @
90a27b52
...
...
@@ -77,14 +77,66 @@ int main(int argc, char* argv[])
#if VCDOUTPUT
vcdfile
=
hdl4sesimCreateVCDFile
(
"googlenet.vcd"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/lrn_5"
,
"wDataRead"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/lrn_5"
,
"wDataReadValid"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/lrn_5"
,
"bDataReadData"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/lrn_5"
,
"wDataWriteEnable"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/lrn_5"
,
"wDataWrite"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/lrn_5"
,
"bDataWriteData"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/lrn_5"
,
"state"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/lrn_5"
,
"index"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"wDataRead_0"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"wDataReadValid_0"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"bDataReadData_0"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"wDataRead_1"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"wDataReadValid_1"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"bDataReadData_1"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"wDataRead_2"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"wDataReadValid_2"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"bDataReadData_2"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"wDataRead_3"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"wDataReadValid_3"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"bDataReadData_3"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"wDataWriteEnable"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"wDataWrite"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"bDataWriteData"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"wDataWriteEnable_0"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"wDataWriteEnable_1"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"wDataWriteEnable_2"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/cnn_buf_11"
,
"wDataWriteEnable_3"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net"
,
"wDataWrite_11"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net"
,
"wDataWriteEnable_11"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/concat_26"
,
"wDataRead_0"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/concat_26"
,
"wDataReadValid_0"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/concat_26"
,
"bDataReadData_0"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/concat_26"
,
"wDataRead_1"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/concat_26"
,
"wDataReadValid_1"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/concat_26"
,
"bDataReadData_1"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/concat_26"
,
"wDataRead_2"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/concat_26"
,
"wDataReadValid_2"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/concat_26"
,
"bDataReadData_2"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/concat_26"
,
"wDataRead_3"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/concat_26"
,
"wDataReadValid_3"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/concat_26"
,
"bDataReadData_3"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/concat_26"
,
"wDataWriteEnable"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/concat_26"
,
"wDataWrite"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/concat_26"
,
"bDataWriteData"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/concat_26"
,
"index"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/convolution_17"
,
"index"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/convolution_17"
,
"state"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/convolution_13"
,
"index"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net/convolution_13"
,
"state"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net"
,
"wDataReadValid_26_1"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net"
,
"wDataWrite_17"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net"
,
"wDataWriteEnable_17"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net"
,
"wDataReadValid_17"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net"
,
"wDataWrite_15"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net"
,
"wDataReadValid_15"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net"
,
"wDataWrite_11"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net"
,
"wDataReadValid_13"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net"
,
"bDataReadData_13"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net"
,
"wDataWriteEnable_13"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net"
,
"wDataWrite_13"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net"
,
"wDataReadValid_26_0"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net"
,
"wDataRead_26_0"
);
objectCall2
(
vcdfile
,
AddSignal
,
"/top/net"
,
"wDataWriteEnable_26"
);
objectCall1
(
vcdfile
,
SetTopModule
,
topmodule
);
objectCall0
(
vcdfile
,
StartRecord
);
...
...
hdl4sesim/src/hdl4sesim.c
浏览文件 @
90a27b52
...
...
@@ -224,7 +224,7 @@ static int hdl4sesim_hdl4se_simulator_ClkTick(HOBJECT object)
for
(
i
=
0
;
i
<
pobj
->
singlethreadmodules
.
itemcount
;
i
++
)
{
hdl4se_module_ClkTick
(
&
((
IHDL4SEModuleVar
*
)(
pobj
->
singlethreadmodules
.
array
[
i
]))
->
data
);
}
#pragma omp parallel for num_threads(
8
)
#pragma omp parallel for num_threads(
16
)
for
(
i
=
0
;
i
<
pobj
->
multithreadmodules
.
itemcount
;
i
++
)
{
hdl4se_module_ClkTick
(
&
((
IHDL4SEModuleVar
*
)(
pobj
->
multithreadmodules
.
array
[
i
]))
->
data
);
}
...
...
@@ -243,7 +243,7 @@ static int hdl4sesim_hdl4se_simulator_Setup(HOBJECT object)
for
(
i
=
0
;
i
<
pobj
->
singlethreadmodules
.
itemcount
;
i
++
)
{
hdl4se_module_Setup
(
&
((
IHDL4SEModuleVar
*
)(
pobj
->
singlethreadmodules
.
array
[
i
]))
->
data
);
}
#pragma omp parallel for num_threads(
8
)
#pragma omp parallel for num_threads(
16
)
for
(
i
=
0
;
i
<
pobj
->
multithreadmodules
.
itemcount
;
i
++
)
{
hdl4se_module_Setup
(
&
((
IHDL4SEModuleVar
*
)(
pobj
->
multithreadmodules
.
array
[
i
]))
->
data
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录