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
acfe534d
Commit
acfe534d
authored
Dec 26, 2025
by
chengshuyao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug expand order next_bit_layer
parent
409122be
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
src/BSD.h
+2
-2
src/next_layer_bit.h
+2
-2
src/top.h
+6
-6
No files found.
src/BSD.h
View file @
acfe534d
...
@@ -51,7 +51,7 @@ public:
...
@@ -51,7 +51,7 @@ public:
//BSD内部使用的变量(固定)
//BSD内部使用的变量(固定)
const
double
total_weight_max
=
pow
(
2
.
0
,
20
);
//指导权重分布修改
const
double
total_weight_max
=
pow
(
2
.
0
,
20
);
//指导权重分布修改
const
int
total_sample_max
=
1000000000
;
//指导采样个数修改
const
int
total_sample_max
=
1000000000
;
//指导采样个数修改
const
int
BSD_samples_influence_max
=
1
*
parameter_num_threads
;
//BSD确定展开序的置信度
const
int
BSD_samples_influence_max
=
1
0
*
parameter_num_threads
;
//BSD确定展开序的置信度
int
which_demo_function
;
int
which_demo_function
;
int
BDD_id
;
int
BDD_id
;
...
@@ -659,7 +659,7 @@ int BDD_class::train_BDD(int start_depth, int how_many_start_nodes, BDD_node* st
...
@@ -659,7 +659,7 @@ int BDD_class::train_BDD(int start_depth, int how_many_start_nodes, BDD_node* st
bool
*
left_mask_output_data_tmp
=
new
bool
[
BSD_samples
];
bool
*
left_mask_output_data_tmp
=
new
bool
[
BSD_samples
];
bool
*
right_mask_output_data_tmp
=
new
bool
[
BSD_samples
];
bool
*
right_mask_output_data_tmp
=
new
bool
[
BSD_samples
];
if
((
i
==
(
parameter_early_stop_depth
-
1
))
&&
(
which_BDD
==
0
)
||
((
i
==
(
parameter_early_stop_depth
-
1
))
&&
(
which_BDD
==
1
))
||
((
total_split_nodes_recursive
)
>
parameter_early_stop_split_nodes
-
BDD_width_each_layer
[
i
])){
if
((
i
==
(
parameter_early_stop_depth
-
1
))
&&
(
which_BDD
==
0
)
||
((
i
==
(
parameter_early_stop_depth
-
1
))
&&
(
which_BDD
==
1
))
||
((
total_split_nodes_recursive
)
>
parameter_early_stop_split_nodes
-
BDD_width_each_layer
[
i
])){
//
cout<<"Early Stop: Condition A "<<endl;
cout
<<
"Early Stop: Condition A "
<<
endl
;
for
(
int
zi
=
0
;
zi
<
min
(
BSD_samples
,
100
);
zi
++
){
for
(
int
zi
=
0
;
zi
<
min
(
BSD_samples
,
100
);
zi
++
){
left_mask_output_data_tmp
[
zi
]
=
left_mask_output_data_all
[
zi
+
BSD_samples
*
j
];
left_mask_output_data_tmp
[
zi
]
=
left_mask_output_data_all
[
zi
+
BSD_samples
*
j
];
if
(
left_mask_output_data_tmp
[
zi
]){
if
(
left_mask_output_data_tmp
[
zi
]){
...
...
src/next_layer_bit.h
View file @
acfe534d
...
@@ -83,8 +83,8 @@ int BDD_class::next_bit_layer_0(int depth){
...
@@ -83,8 +83,8 @@ int BDD_class::next_bit_layer_0(int depth){
amount_turn_input_data_ij
[
k
]
=
mask_input_data
[
j
][
k
];
amount_turn_input_data_ij
[
k
]
=
mask_input_data
[
j
][
k
];
}
}
amount_turn_input_data_ij
[
i
]
=
!
amount_turn_input_data_ij
[
i
];
amount_turn_input_data_ij
[
i
]
=
!
amount_turn_input_data_ij
[
i
];
//
bool amount_turn_output_data_ij = io_generator_single(amount_turn_input_data_ij,BDD[depth][which_node_this_layer_array[j]].which_bit_output);
bool
amount_turn_output_data_ij
=
io_generator_single
(
amount_turn_input_data_ij
,
BDD
[
depth
][
which_node_this_layer_array
[
j
]].
which_bit_output
);
bool
amount_turn_output_data_ij
=
io_generator_single
(
amount_turn_input_data_ij
,
0
);
//
bool amount_turn_output_data_ij = io_generator_single(amount_turn_input_data_ij,0);
amount_turn_output_data
[
i
][
j
]
=
amount_turn_output_data_ij
;
amount_turn_output_data
[
i
][
j
]
=
amount_turn_output_data_ij
;
arr_delete
(
amount_turn_input_data_ij
);
arr_delete
(
amount_turn_input_data_ij
);
}
}
...
...
src/top.h
View file @
acfe534d
#include "head.h"
#include "head.h"
#include "io_generator/c
432
.h" //io_generator中需要包含对PI_WIDTH,PO_WIDTH的全局定义,如: extern const int PI_WIDTH = 36;
#include "io_generator/c
880
.h" //io_generator中需要包含对PI_WIDTH,PO_WIDTH的全局定义,如: extern const int PI_WIDTH = 36;
#include "io_generator_vec/c
432
_vec.h" //如果有对应Verilog, 可以在aag_to_rtl里面直接生成2个文件
#include "io_generator_vec/c
880
_vec.h" //如果有对应Verilog, 可以在aag_to_rtl里面直接生成2个文件
//#include "io_generator/ip-cores/combinational_circuits/c_prefix_arbiter_base.h"
//#include "io_generator/ip-cores/combinational_circuits/c_prefix_arbiter_base.h"
//#include "io_generator/ip-cores/combinational_circuits_vec/c_prefix_arbiter_base_vec.h"
//#include "io_generator/ip-cores/combinational_circuits_vec/c_prefix_arbiter_base_vec.h"
#define INPUT_AIG //io_generator是否可以用uint按位操作进行加速,也即是否包含_vec后缀的另一个io_generator
//
#define INPUT_AIG //io_generator是否可以用uint按位操作进行加速,也即是否包含_vec后缀的另一个io_generator
#define SINGLE_BITS //io_generator是否包含每一个bit单独的io_generator_o{x}
//
#define SINGLE_BITS //io_generator是否包含每一个bit单独的io_generator_o{x}
//
#define SEARCH_PARTITION //BSD算法搜索partition策略
#define SEARCH_PARTITION //BSD算法搜索partition策略
//
#define ACCURACY_FIRST //精度优先算法: 慢且面积冗余大,在精度是瓶颈时使用,不作为默认选项。
#define ACCURACY_FIRST //精度优先算法: 慢且面积冗余大,在精度是瓶颈时使用,不作为默认选项。
extern
const
int
parameter_input_bit_width
=
PI_WIDTH
+
5
;
extern
const
int
parameter_input_bit_width
=
PI_WIDTH
+
5
;
int
parameter_output_bit_width
=
PO_WIDTH
;
int
parameter_output_bit_width
=
PO_WIDTH
;
...
...
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