Commit 5cba0271 by chengshuyao

Debug layer switch overflow

parent 6cce9111
...@@ -1237,7 +1237,7 @@ int BDD_class::BDD_FULL_PROCESS(){ ...@@ -1237,7 +1237,7 @@ int BDD_class::BDD_FULL_PROCESS(){
max_group = zj ; max_group = zj ;
else else
max_group = zj - 1; max_group = zj - 1;
max_move_length = max(40,int((parameter_input_bit_width/(1+zj))-3)) ; max_move_length = max(10,int((parameter_input_bit_width/(1+zj))-3)) ;
cout<<"######################################################################"<<endl; cout<<"######################################################################"<<endl;
cout<<"Switch Times "<<zj<<endl; cout<<"Switch Times "<<zj<<endl;
...@@ -1255,7 +1255,7 @@ int BDD_class::BDD_FULL_PROCESS(){ ...@@ -1255,7 +1255,7 @@ int BDD_class::BDD_FULL_PROCESS(){
int move_length = min(total_BDD_depth-i-max_group-3,max_move_length); int move_length = min(total_BDD_depth-i-max_group-3,max_move_length);
for(int zi=0;zi<=move_length;zi++){ for(int zi=0;zi<=move_length;zi++){
for(int zk=0;zk<=min(max_group,move_length-1);zk++){ for(int zk=0;zk<=min(max_group,move_length-1);zk++){
BSD_switch_layer(i+zi+min(max_group,move_length-1)-zk); BSD_switch_layer((i+zi+min(max_group,move_length-1)-zk)%total_BDD_depth);
if(total_split_nodes_recursive < best_total_split_nodes_recursive){ if(total_split_nodes_recursive < best_total_split_nodes_recursive){
best_total_split_nodes_recursive = total_split_nodes_recursive; best_total_split_nodes_recursive = total_split_nodes_recursive;
cout<<" move length "<<zi<<" move group "<<zk; cout<<" move length "<<zi<<" move group "<<zk;
...@@ -1270,7 +1270,7 @@ int BDD_class::BDD_FULL_PROCESS(){ ...@@ -1270,7 +1270,7 @@ int BDD_class::BDD_FULL_PROCESS(){
if(total_split_nodes_recursive == best_total_split_nodes_recursive) if(total_split_nodes_recursive == best_total_split_nodes_recursive)
break; break;
else else
BSD_switch_layer(i+zi+min(max_group,move_length-1)-zk); BSD_switch_layer((i+zi+min(max_group,move_length-1)-zk%total_BDD_depth));
} }
} }
} }
......
#define INPUT_AIG #define INPUT_AIG
#include "usb1_crc16.h" #include "io_generator/xgate_barrel_shift.h"
#include "usb1_crc16_vec.h" #include "xgate_barrel_shift_vec.h"
extern const int parameter_input_bit_width = PI_WIDTH + 5 ; extern const int parameter_input_bit_width = PI_WIDTH + 5 ;
extern const int parameter_output_bit_width = PO_WIDTH ; extern const int parameter_output_bit_width = PO_WIDTH ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment