@@ -8,37 +8,6 @@ def __init__(self):
8
8
self ._register_layer_attributes ()
9
9
self ._register_flows ()
10
10
11
- def create_initial_config (
12
- self ,
13
- board = 'alveo-u55c' ,
14
- part = None ,
15
- clock_period = 5 ,
16
- io_type = 'io_parallel' ,
17
- num_kernel = 1 ,
18
- num_thread = 1 ,
19
- batchsize = 8192
20
- ):
21
- '''
22
- Create initial accelerator config with default parameters
23
-
24
- Args:
25
- board: one of the keys defined in supported_boards.json
26
- clock_period: clock period passed to hls project
27
- io_type: io_parallel or io_stream
28
- num_kernel: how many compute units to create on the fpga
29
- num_thread: how many threads the host cpu uses to drive the fpga
30
- Returns:
31
- populated config
32
- '''
33
- board = board if board is not None else 'alveo-u55c'
34
- config = super ().create_initial_config (part , clock_period , io_type )
35
- config ['AcceleratorConfig' ] = {}
36
- config ['AcceleratorConfig' ]['Board' ] = board
37
- config ['AcceleratorConfig' ]['Num_Kernel' ] = num_kernel
38
- config ['AcceleratorConfig' ]['Num_Thread' ] = num_thread
39
- config ['AcceleratorConfig' ]['Batchsize' ] = batchsize
40
- return config
41
-
42
11
def _register_flows (self ):
43
12
validation_passes = [
44
13
'vitisaccelerator:validate_conv_implementation' ,
@@ -59,18 +28,16 @@ def _register_flows(self):
59
28
ip_flow_requirements .insert (ip_flow_requirements .index ('vivado:apply_templates' ), template_flow )
60
29
61
30
self ._default_flow = register_flow ('ip' , None , requires = ip_flow_requirements , backend = self .name )
62
-
31
+
63
32
def create_initial_config (
64
33
self ,
65
- board = 'pynq-z2 ' ,
34
+ board = 'alveo-u55c ' ,
66
35
part = None ,
67
36
clock_period = 5 ,
68
37
io_type = 'io_parallel' ,
69
- interface = 'axi_stream' ,
70
- driver = 'python' ,
71
- input_type = 'float' ,
72
- output_type = 'float' ,
73
- platform = 'xilinx_u250_xdma_201830_2' ,
38
+ num_kernel = 1 ,
39
+ num_thread = 1 ,
40
+ batchsize = 8192
74
41
):
75
42
'''
76
43
Create initial accelerator config with default parameters
@@ -79,32 +46,16 @@ def create_initial_config(
79
46
board: one of the keys defined in supported_boards.json
80
47
clock_period: clock period passed to hls project
81
48
io_type: io_parallel or io_stream
82
- interface: `axi_stream`: generate hardware designs and drivers which exploit axi stream channels.
83
- `axi_master`: generate hardware designs and drivers which exploit axi master channels.
84
- `axi_lite` : generate hardware designs and drivers which exploit axi lite channels. (Don't use it
85
- to exchange large amount of data)
86
- driver: `python`: generates the python driver to use the accelerator in the PYNQ stack.
87
- `c`: generates the c driver to use the accelerator bare-metal.
88
- input_type: the wrapper input precision. Can be `float` or an `ap_type`. Note: VivadoAcceleratorBackend
89
- will round the number of bits used to the next power-of-2 value.
90
- output_type: the wrapper output precision. Can be `float` or an `ap_type`. Note:
91
- VivadoAcceleratorBackend will round the number of bits used to the next power-of-2 value.
92
- platform: development target platform
93
-
49
+ num_kernel: how many compute units to create on the fpga
50
+ num_thread: how many threads the host cpu uses to drive the fpga
94
51
Returns:
95
52
populated config
96
53
'''
97
- board = board if board is not None else 'pynq-z2 '
54
+ board = board if board is not None else 'alveo-u55c '
98
55
config = super ().create_initial_config (part , clock_period , io_type )
99
56
config ['AcceleratorConfig' ] = {}
100
57
config ['AcceleratorConfig' ]['Board' ] = board
101
- config ['AcceleratorConfig' ]['Interface' ] = interface # axi_stream, axi_master, axi_lite
102
- config ['AcceleratorConfig' ]['Driver' ] = driver
103
- config ['AcceleratorConfig' ]['Precision' ] = {}
104
- config ['AcceleratorConfig' ]['Precision' ]['Input' ] = {}
105
- config ['AcceleratorConfig' ]['Precision' ]['Output' ] = {}
106
- config ['AcceleratorConfig' ]['Precision' ]['Input' ] = input_type # float, double or ap_fixed<a,b>
107
- config ['AcceleratorConfig' ]['Precision' ]['Output' ] = output_type # float, double or ap_fixed<a,b>
108
- config ['AcceleratorConfig' ]['Platform' ] = platform
109
-
110
- return config
58
+ config ['AcceleratorConfig' ]['Num_Kernel' ] = num_kernel
59
+ config ['AcceleratorConfig' ]['Num_Thread' ] = num_thread
60
+ config ['AcceleratorConfig' ]['Batchsize' ] = batchsize
61
+ return config
0 commit comments