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
f4c821d4
Commit
f4c821d4
authored
Dec 10, 2025
by
chengshuyao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove redundant codes
parent
c0daef9d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
27 deletions
+29
-27
src/BSD_top.h
+23
-22
src/top.h
+6
-5
No files found.
src/BSD_top.h
View file @
f4c821d4
...
...
@@ -39,6 +39,7 @@ bool* io_generator_function(bool* input_data, bool* output_data) {
int
i
,
j
;
bool
*
output_data_temp
=
new
bool
[
PO_WIDTH
];
io_generator_outer
(
input_data
,
output_data_temp
);
for
(
i
=
0
;
i
<
parameter_output_bit_width
;
i
++
){
if
(
parameter_output_bit_width
==
PO_WIDTH
)
...
...
@@ -47,7 +48,7 @@ bool* io_generator_function(bool* input_data, bool* output_data) {
output_data
[
i
]
=
output_data_temp
[
output_bit_index
[
i
]];
}
delete
[]
output_data_temp
;
return
output_data
;
}
...
...
@@ -332,10 +333,10 @@ int search_reward(BSD_features BSD_features_0){
};
int
search_order
(
int
search_iterations
=
parameter_search_iterations
,
bool
*
output_partition_set
=
default_partition_set
,
int
start_order_depth
=
0
,
int
*
start_order
=
start_order
){
ofstream
result_0
(
"result_0_20bit"
,
ios
::
app
);
ofstream
result_10
(
"result_10_20bit"
,
ios
::
app
);
ofstream
result_100
(
"result_100_20bit"
,
ios
::
app
);
ofstream
result_1000
(
"result_1000_20bit"
,
ios
::
app
);
//
ofstream result_0("result_0_20bit",ios::app);
//
ofstream result_10("result_10_20bit",ios::app);
//
ofstream result_100("result_100_20bit",ios::app);
//
ofstream result_1000("result_1000_20bit",ios::app);
variable_order
=
new
int
*
[
parameter_max_orders
];
for
(
int
vi
=
0
;
vi
<
parameter_max_orders
;
vi
++
){
...
...
@@ -394,23 +395,23 @@ int search_order(int search_iterations = parameter_search_iterations ,bool* outp
GLOBAL_BDD_id_number
+=
1
;
if
(
i
==
1
){
result_0
<<
best_area
<<
endl
;
best_area_0
=
best_area
;
}
else
if
(
i
==
11
){
result_10
<<
best_area
<<
endl
;
best_area_10
=
best_area
;
}
else
if
(
i
==
101
){
result_100
<<
best_area
<<
endl
;
best_area_100
=
best_area
;
}
else
if
(
i
==
999
){
result_1000
<<
best_area
<<
endl
;
}
//
if(i==1){
//
result_0 << best_area << endl;
//
best_area_0 = best_area;
//
}
//
else if(i==11){
//
result_10 << best_area << endl;
//
best_area_10 = best_area;
//
//
}
//
else if(i==101){
//
result_100 << best_area << endl;
//
best_area_100 = best_area;
//
//
}
//
else if(i==999){
//
result_1000 << best_area << endl;
//
}
int
parameter_learning_rate
=
2
;
if
(
best_area
>
10000
){
...
...
src/top.h
View file @
f4c821d4
#include "head.h"
#define INPUT_AIG //是否可以用uint按位操作进行加速
#define SINGLE_BITS //是否包含每一个bit单独的io generator
#include "io_generator/c432.h"
#include "io_generator_vec/c432_vec.h"
#include "io_generator/c432.h" //io_generator中需要包含对PI_WIDTH,PO_WIDTH的全局定义,如: extern const int PI_WIDTH = 36;
#include "io_generator_vec/c432_vec.h" //如果有对应Verilog, 可以在aag_to_rtl里面直接生成2个文件
#define INPUT_AIG //io_generator是否可以用uint按位操作进行加速,也即是否包含_vec后缀的另一个io_generator
#define SINGLE_BITS //io_generator是否包含每一个bit单独的io_generator_o{x}
extern
const
int
parameter_input_bit_width
=
PI_WIDTH
+
5
;
int
parameter_output_bit_width
=
PO_WIDTH
;
//最小为1,最大为PO_WIDTH
int
parameter_output_bit_width
=
PO_WIDTH
;
extern
const
int
parameter_search_iterations
=
10
;
//最大设计次数
...
...
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