Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BSD
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chengshuyao
BSD
Commits
c92c3e51
Commit
c92c3e51
authored
Dec 30, 2025
by
chengshuyao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug for very long input bit vec
parent
132c28bc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
src/BSD.h
+3
-3
src/io_generator/rob_bsd.h
+0
-0
src/print_circuit.h
+1
-1
src/top.h
+2
-2
No files found.
src/BSD.h
View file @
c92c3e51
...
...
@@ -51,7 +51,7 @@ public:
//BSD内部使用的变量(固定)
const
double
total_weight_max
=
pow
(
2
.
0
,
20
);
//指导权重分布修改
const
int
total_sample_max
=
1000000000
;
//指导采样个数修改
const
int
BSD_samples_influence_max
=
min
(
parameter_max_samples
,
10
*
parameter_num_threads
);
//BSD确定展开序的置信度
const
int
BSD_samples_influence_max
=
min
(
parameter_max_samples
,
10
);
//BSD确定展开序的置信度
int
which_demo_function
;
int
BDD_id
;
...
...
@@ -1100,13 +1100,13 @@ int BDD_class::train_BDD(int start_depth, int how_many_start_nodes, BDD_node* st
int
BDD_class
::
BDD_infer
(){
long
i
,
j
;
gettimeofday
(
&
start_time
,
NULL
);
random_device
rd
;
mt19937
gen
(
rd
());
cout
<<
"test dataset size = "
<<
parameter_test_ios
<<
endl
;
error_amount_all
=
0
;
bool
*
error_all
=
new
bool
[
how_many_start_nodes
*
parameter_test_ios
];
gettimeofday
(
&
start_time
,
NULL
);
#pragma omp parallel for
for
(
long
zj
=
0
;
zj
<
how_many_start_nodes
*
parameter_test_ios
;
zj
++
){
int
test_bit
=
int
(
zj
/
parameter_test_ios
);
...
...
@@ -1138,6 +1138,7 @@ int BDD_class::BDD_infer(){
/////}
arr_delete
(
test_input_data
);
}
gettimeofday
(
&
finish_time
,
NULL
);
cout
<<
endl
;
circuit_accuracy_all_bits
=
new
double
[
how_many_start_nodes
];
for
(
int
test_bit
=
0
;
test_bit
<
how_many_start_nodes
;
test_bit
++
){
...
...
@@ -1163,7 +1164,6 @@ int BDD_class::BDD_infer(){
cout
<<
most_influence
[
i
]
<<
" "
;
}
cout
<<
endl
;
gettimeofday
(
&
finish_time
,
NULL
);
double
test_time
=
double
(
finish_time
.
tv_usec
-
start_time
.
tv_usec
+
1000000
*
(
finish_time
.
tv_sec
-
start_time
.
tv_sec
))
/
1000000
;
cout
<<
"Total test time = "
<<
test_time
<<
"s"
<<
endl
;
arr_delete
(
error_all
);
...
...
src/io_generator/rob_bsd.h
0 → 100644
View file @
c92c3e51
This diff is collapsed.
Click to expand it.
src/print_circuit.h
View file @
c92c3e51
...
...
@@ -3,7 +3,7 @@ int BDD_class::print_circuit(int node_depth, char* start_node_index_string){
int
i
,
j
;
int
zi
;
char
output_file_name
[
100
];
char
*
output_file_name
=
new
char
[
100
+
parameter_output_bit_width
];
//sprintf(output_file_name,"rtl/module_output_bit_%d.v",which_bit_output);
// sprintf(output_file_name,"rtl/function_%d_id_%d.v",circuit_index,BDD_id);
sprintf
(
output_file_name
,
"rtl/function_layer_%d_nodes_%s.v"
,
node_depth
,
start_node_index_string
);
...
...
src/top.h
View file @
c92c3e51
#include "head.h"
#include "io_generator/
c17
.h" //io_generator中需要包含对PI_WIDTH,PO_WIDTH的全局定义,如: extern const int PI_WIDTH = 36;
#include "io_generator/
rob_bsd
.h" //io_generator中需要包含对PI_WIDTH,PO_WIDTH的全局定义,如: extern const int PI_WIDTH = 36;
...
...
@@ -16,7 +16,7 @@ int parameter_output_bit_width = PO_WIDTH;
extern
const
int
parameter_search_iterations
=
10
;
//最大设计次数
extern
const
int
parameter_test_ios
=
100000
0
;
//测试要求多少样本
extern
const
int
parameter_test_ios
=
100000
;
//测试要求多少样本
extern
const
int
parameter_max_samples
=
1000
;
//BSD每一个节点最多进行多少次采样,至少为64
extern
const
double
parameter_early_stop_accuracy
=
1
;
//允许的错误率,如果完全不允许,设为1;
//没有特殊需要不要设到<1,会慢一些。
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment