@@ -322,6 +322,12 @@ def _vivado_synthesis_optimize_impl(ctx):
322322 timing_summary_report = ctx .actions .declare_file ("{}_timing.rpt" .format (ctx .label .name ))
323323 util_report = ctx .actions .declare_file ("{}_util.rpt" .format (ctx .label .name ))
324324 drc_report = ctx .actions .declare_file ("{}_drc.rpt" .format (ctx .label .name ))
325+ if ctx .attr .with_probes :
326+ probes_file = ctx .actions .declare_file ("{}.ltx" .format (ctx .label .name ))
327+ probes_file_path = probes_file .path
328+ else :
329+ probes_file = None
330+ probes_file_path = ""
325331
326332 checkpoint_in = ctx .attr .checkpoint [VivadoSynthCheckpointInfo ].checkpoint
327333
@@ -330,12 +336,15 @@ def _vivado_synthesis_optimize_impl(ctx):
330336 "{{CHECKPOINT_OUT}}" : synth_checkpoint .path ,
331337 "{{DRC_REPORT}}" : drc_report .path ,
332338 "{{OPT_DIRECTIVE}}" : ctx .attr .opt_directive ,
339+ "{{PROBES_FILE}}" : probes_file_path ,
333340 "{{THREADS}}" : "{}" .format (ctx .attr .threads ),
334341 "{{TIMING_REPORT}}" : timing_summary_report .path ,
335342 "{{UTIL_REPORT}}" : util_report .path ,
336343 }
337344
338345 outputs = [synth_checkpoint , timing_summary_report , util_report , drc_report ]
346+ if ctx .attr .with_probes :
347+ outputs .append (probes_file )
339348
340349 default_info = run_tcl_template (
341350 ctx ,
@@ -372,6 +381,10 @@ vivado_synthesis_optimize = rule(
372381 doc = "Threads to pass to vivado which defines the amount of parallelism." ,
373382 default = 8 ,
374383 ),
384+ "with_probes" : attr .bool (
385+ doc = "Create debug probes." ,
386+ default = False ,
387+ ),
375388 "xilinx_env" : attr .label (
376389 doc = "A shell script to source the vivado environment and " +
377390 "point to license server" ,
0 commit comments