|
| 1 | +# GF16 Adder Synthesis — QMTECH XC7A100T-FGG676 |
| 2 | +# BENCH-005: FPGA Synthesis — LUT/FF/Fmax measurement |
| 3 | +# |
| 4 | +# Usage: |
| 5 | +# cd fpga/openxc7-synth |
| 6 | +# vivado -mode batch -source gf16_add_synth.tcl |
| 7 | + |
| 8 | +set top_module gf16_add_top |
| 9 | +set part_name xc7a100t-fgg676-1 |
| 10 | +set project_name gf16_add |
| 11 | +set output_dir ./gf16_add_output |
| 12 | + |
| 13 | +# ============================================================================ |
| 14 | +# CREATE PROJECT |
| 15 | +# ============================================================================ |
| 16 | +puts "==========================================" |
| 17 | +puts "GF16 Adder Synthesis" |
| 18 | +puts "Target: QMTECH XC7A100T-FGG676" |
| 19 | +puts "==========================================" |
| 20 | + |
| 21 | +create_project ${project_name}_proj ${output_dir}/vivado_proj -part $part_name -force |
| 22 | + |
| 23 | +# ============================================================================ |
| 24 | +# ADD SOURCE FILES |
| 25 | +# ============================================================================ |
| 26 | +add_files -norecurse ./gf16_add_top.v |
| 27 | + |
| 28 | +# ============================================================================ |
| 29 | +# SET TOP MODULE |
| 30 | +# ============================================================================ |
| 31 | +set_property top $top_module [current_fileset] |
| 32 | +update_compile_order -fileset sources_1 |
| 33 | + |
| 34 | +# ============================================================================ |
| 35 | +# SYNTHESIS |
| 36 | +# ============================================================================ |
| 37 | +puts "\[1/4\] Running synth_design..." |
| 38 | +synth_design -top $top_module -part $part_name |
| 39 | + |
| 40 | +# ============================================================================ |
| 41 | +# OPTIMIZE |
| 42 | +# ============================================================================ |
| 43 | +puts "\[2/4\] Running opt_design..." |
| 44 | +opt_design |
| 45 | + |
| 46 | +# ============================================================================ |
| 47 | +# REPORTS |
| 48 | +# ============================================================================ |
| 49 | +puts "\[3/4\] Generating reports..." |
| 50 | + |
| 51 | +# Utilization (LUT, FF, DSP, BRAM) |
| 52 | +report_utilization -file ${output_dir}/utilization.rpt |
| 53 | + |
| 54 | +# Timing (Fmax, WNS, TNS) |
| 55 | +report_timing_summary -file ${output_dir}/timing.rpt |
| 56 | +report_power -file ${output_dir}/power.rpt |
| 57 | + |
| 58 | +# Datasheet (detailed timing) |
| 59 | +report_timing -sort_by slack -max_paths 10 -file ${output_dir}/timing_detailed.rpt |
| 60 | + |
| 61 | +# ============================================================================ |
| 62 | +# WRITE CHECKPOINT (optional, for place_route) |
| 63 | +# ============================================================================ |
| 64 | +puts "\[4/4\] Writing checkpoint..." |
| 65 | +write_checkpoint -force ${output_dir}/synth.dcp |
| 66 | + |
| 67 | +# ============================================================================ |
| 68 | +# PRINT SUMMARY |
| 69 | +# ============================================================================ |
| 70 | +puts "\n==========================================" |
| 71 | +puts "SYNTHESIS COMPLETE" |
| 72 | +puts "==========================================" |
| 73 | +puts "Reports:" |
| 74 | +puts " Utilization: ${output_dir}/utilization.rpt" |
| 75 | +puts " Timing: ${output_dir}/timing.rpt" |
| 76 | +puts " Power: ${output_dir}/power.rpt" |
| 77 | +puts " Checkpoint: ${output_dir}/synth.dcp" |
| 78 | +puts "" |
| 79 | +puts "Next steps:" |
| 80 | +puts " 1. Check utilization.rpt for LUT/FF/DSP counts" |
| 81 | +puts " 2. Check timing.rpt for Fmax (WNS = 0 means met)" |
| 82 | +puts "==========================================" |
| 83 | + |
| 84 | +close_project |
| 85 | +exit |
0 commit comments