Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion conifer/backends/vivadohls/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ def write(ensemble_dict, cfg):
fout.write('\t#pragma HLS array_partition variable=score\n')
fout.write('\t#pragma HLS pipeline\n')
fout.write('\t#pragma HLS unroll\n')

io_type = cfg['IOtype']
if (io_type=='stream') or (io_type=='s_axilite') or (io_type=='axis'):
fout.write('\t#pragma HLS INTERFACE s_axilite port=x\n');
fout.write('\t#pragma HLS INTERFACE s_axilite port=score\n');
fout.write('\tbdt.decision_function(x, score, tree_scores);\n}')
fout.close()

Expand Down Expand Up @@ -224,7 +229,8 @@ def auto_config():
config = {'ProjectName' : 'my_prj',
'OutputDir' : 'my-conifer-prj',
'Precision' : 'ap_fixed<18,8>',
'XilinxPart' : 'xcvu9p-flgb2104-2L-e',
'XilinxPart' : 'xcvu9p-flgb2104-2L-e',
'IOtype' : 'parallel',
'ClockPeriod' : '5'}
return config

Expand Down