Skip to content

Commit 3136646

Browse files
author
Lukas Stasytis
committed
fixed missing custom op, this should be merged with the main one later
1 parent fc19b7c commit 3136646

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

src/finn/custom_op/fpgadataflow/hwcustomop.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,19 @@ def reset_rtlsim(self, sim):
235235
back to one"""
236236
finnxsi.reset_rtlsim(sim)
237237

238+
def rtlsim_multi_io_custom(self, sim, io_dict, sname="_V", batch_size=1):
239+
"Run rtlsim for this node, supports multiple i/o streams."
240+
num_out_values = self.get_number_output_values() * batch_size
241+
total_cycle_count = finnxsi.rtlsim_multi_io(
242+
sim,
243+
io_dict,
244+
num_out_values,
245+
sname=sname,
246+
liveness_threshold=get_liveness_threshold_cycles(),
247+
)
248+
249+
self.set_nodeattr("cycles_rtlsim", total_cycle_count)
250+
238251
def rtlsim_multi_io(self, sim, io_dict, sname="_V"):
239252
"Run rtlsim for this node, supports multiple i/o streams."
240253
num_out_values = self.get_number_output_values()
@@ -614,7 +627,7 @@ def derive_token_access_vectors_using_rtlsim(
614627
for k in txns_out.keys():
615628
txns_out[k] = sim.trace_stream(k + sname)
616629

617-
self.rtlsim_multi_io_custom(sim, io_dict, periods_to_simulate)
630+
self.rtlsim_multi_io_custom(sim, io_dict, sname="_V", batch_size=periods_to_simulate)
618631

619632
total_cycle_count = self.get_nodeattr("cycles_rtlsim")
620633

0 commit comments

Comments
 (0)