@@ -625,6 +625,7 @@ def __init__(
625625 enable_debug = False ,
626626 enable_instrumentation = False ,
627627 instrumentation_no_dma = False ,
628+ instrumentation_avg_n = 64 ,
628629 live_fifo_sizing = False ,
629630 partition_model_dir = None ,
630631 ):
@@ -637,6 +638,7 @@ def __init__(
637638 self .enable_debug = enable_debug
638639 self .enable_instrumentation = enable_instrumentation
639640 self .instrumentation_no_dma = instrumentation_no_dma
641+ self .instrumentation_avg_n = instrumentation_avg_n
640642 self .live_fifo_sizing = live_fifo_sizing
641643 self .partition_model_dir = partition_model_dir
642644
@@ -652,14 +654,18 @@ def apply(self, model):
652654 if self .enable_instrumentation :
653655 if self .instrumentation_no_dma is True or self .live_fifo_sizing is True :
654656 prep_transforms = [
655- GenerateInstrumentationIP (self .fpga_part , self .period_ns ),
657+ GenerateInstrumentationIP (
658+ self .fpga_part , self .period_ns , self .instrumentation_avg_n
659+ ),
656660 Floorplan (),
657661 CreateDataflowPartition (partition_model_dir = self .partition_model_dir ),
658662 ]
659663 else :
660664 # DMA & Instrumentation Wrapper Case
661665 prep_transforms = [
662- GenerateInstrumentationIP (self .fpga_part , self .period_ns ),
666+ GenerateInstrumentationIP (
667+ self .fpga_part , self .period_ns , self .instrumentation_avg_n
668+ ),
663669 InsertIODMA (self .axi_port_width ),
664670 InsertDWC (),
665671 SpecializeLayers (self .fpga_part ),
0 commit comments