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
4bfee453
Commit
4bfee453
authored
Aug 18, 2025
by
chengshuyao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug: partition when input width > 1000
parent
f447e0e0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
54 deletions
+54
-54
src/BSD.cpp
+3
-3
src/BSD.h
+48
-48
src/top.h
+3
-3
No files found.
src/BSD.cpp
View file @
4bfee453
...
...
@@ -192,7 +192,7 @@ int search_partition(int start_order_depth, int* start_order){
// delete [] start_order_a;
// delete [] start_order_b;
}
parameter_max_orders
*=
2
;
//
parameter_max_orders *= 2;
int
area
=
0
;
int
area_a
=
search_order
(
40
,
best_output_partition_set_a
,
parameter_input_bit_width
,
best_start_order_a
);
int
area_b
=
search_order
(
40
,
best_output_partition_set_b
,
parameter_input_bit_width
,
best_start_order_b
);
...
...
@@ -357,9 +357,9 @@ int search_order(int search_iterations,bool* output_partition_set,int start_orde
int
best_area_1000
;
int
best_iteration
=
0
;
int
partition_depth
=
1000
;
int
partition_depth
=
1000
000
;
int
partition_parts
=
2
;
int
best_partition_depth
=
10000
;
int
best_partition_depth
=
10000
00
;
int
best_partition_parts
=
2
;
int
learning_rate
;
for
(
int
i
=
0
;
i
<=
search_iterations
;
i
++
){
...
...
src/BSD.h
View file @
4bfee453
...
...
@@ -1081,59 +1081,59 @@ int BDD_class::BDD_FULL_PROCESS(){
else
{
int
optimize_time
=
0
;
for
(
int
k
=
1
;
k
<
2
;
k
++
){
//for(int zj=0;zj<2;zj++){
// max_group = 2 ;
// max_move_length = max(min(50,int(parameter_input_bit_width/2)-1),int((parameter_input_bit_width/(1+zj))-1)) ;
//
// cout<<"######################################################################"<<endl;
// cout<<"Switch Times "<<zj<<endl;
// optimize_time = 0;
// int best_move_times_zk=0;
// int best_move_times_zi=0;
// random_device rd;
// mt19937 gen(rd());
// //int start_i = gen()%total_BDD_depth;
// int start_i = 0;
// for(int si=0;si<parameter_input_bit_width;si++){
// int i = (start_i + si)%total_BDD_depth;
// cout<<"Switch bit: "<<i<<" "<<endl;
// bool optimize=0;
// int move_length = min(i,max_move_length);
// for(int zk=0;zk<=max_group;zk++){
// for(int zi=0;zi<=move_length;zi++){
// BSD_switch_layer(i-zi);
// if(total_split_nodes_recursive < best_total_split_nodes_recursive){
// best_total_split_nodes_recursive = total_split_nodes_recursive;
// cout<<" move length "<<zi<<" move group "<<zk;
// cout<<" Best area update: "<<best_total_split_nodes_recursive<<endl;
// optimize_time +=1;
// }
// }
//
// }
// for(int zk=max_group;zk>=0;zk--){
// for(int zi=move_length;zi>=0;zi--){
// if(total_split_nodes_recursive == best_total_split_nodes_recursive)
// break;
// else
// BSD_switch_layer(i-zi);
// }
// }
// }
// //if(( parameter_input_bit_width<50)){
// // if((optimize_time < 1) )
// // break;
// //}else{
// // if(optimize_time < int(parameter_input_bit_width/10))
// // break;
// //}
//}
//
/
for(int zj=0;zj<2;zj++){
//
/
max_group = 2 ;
//
/
max_move_length = max(min(50,int(parameter_input_bit_width/2)-1),int((parameter_input_bit_width/(1+zj))-1)) ;
//
/
//
/
cout<<"######################################################################"<<endl;
//
/
cout<<"Switch Times "<<zj<<endl;
//
/
optimize_time = 0;
//
/
int best_move_times_zk=0;
//
/
int best_move_times_zi=0;
//
/
random_device rd;
//
/
mt19937 gen(rd());
//
/
//int start_i = gen()%total_BDD_depth;
//
/
int start_i = 0;
//
/
for(int si=0;si<parameter_input_bit_width;si++){
//
/
int i = (start_i + si)%total_BDD_depth;
//
/
cout<<"Switch bit: "<<i<<" "<<endl;
//
/
bool optimize=0;
//
/
int move_length = min(i,max_move_length);
//
/
for(int zk=0;zk<=max_group;zk++){
//
/
for(int zi=0;zi<=move_length;zi++){
//
/
BSD_switch_layer(i-zi);
//
/
if(total_split_nodes_recursive < best_total_split_nodes_recursive){
//
/
best_total_split_nodes_recursive = total_split_nodes_recursive;
//
/
cout<<" move length "<<zi<<" move group "<<zk;
//
/
cout<<" Best area update: "<<best_total_split_nodes_recursive<<endl;
//
/
optimize_time +=1;
//
/
}
//
/
}
//
/
//
/
}
//
/
for(int zk=max_group;zk>=0;zk--){
//
/
for(int zi=move_length;zi>=0;zi--){
//
/
if(total_split_nodes_recursive == best_total_split_nodes_recursive)
//
/
break;
//
/
else
//
/
BSD_switch_layer(i-zi);
//
/
}
//
/
}
//
/
}
//
/
//if(( parameter_input_bit_width<50)){
//
/
// if((optimize_time < 1) )
//
/
// break;
//
/
//}else{
//
/
// if(optimize_time < int(parameter_input_bit_width/10))
//
/
// break;
//
/
//}
//
/
}
for
(
int
zj
=
0
;
zj
<
10
;
zj
++
){
if
(
zj
==
0
)
max_group
=
zj
;
else
max_group
=
zj
-
1
;
max_move_length
=
max
(
2
0
,
int
((
parameter_input_bit_width
/
(
1
+
zj
))
-
3
))
;
max_move_length
=
max
(
4
0
,
int
((
parameter_input_bit_width
/
(
1
+
zj
))
-
3
))
;
cout
<<
"######################################################################"
<<
endl
;
cout
<<
"Switch Times "
<<
zj
<<
endl
;
...
...
src/top.h
View file @
4bfee453
...
...
@@ -2,7 +2,7 @@
#include"io_generator/c1908.h"
#include "c1908_vec.h"
extern
const
int
parameter_input_bit_width
=
PI_WIDTH
+
2
;
extern
const
int
parameter_input_bit_width
=
PI_WIDTH
+
5
;
extern
const
int
parameter_output_bit_width
=
PO_WIDTH
;
...
...
@@ -15,8 +15,8 @@ extern const int parameter_output_bit_width = PO_WIDTH ;
//#include"io_generator_tmp.h"
extern
const
int
parameter_search_iterations
=
400
;
//最大设计次数
extern
const
int
parameter_test_ios
=
100
00
;
//测试要求多少样本
extern
const
int
parameter_max_samples
=
int
(
parameter_test_ios
*
1
)
;
//BSD每一个节点最多进行多少次采样
extern
const
int
parameter_test_ios
=
100
;
//测试要求多少样本
extern
const
int
parameter_max_samples
=
int
(
parameter_test_ios
*
40
/
32
)
*
32
;
//BSD每一个节点最多进行多少次采样
bool
*
io_generator_function
(
bool
*
input_data
,
bool
*
output_data
)
{
...
...
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