File size: 4,262 Bytes
23d354c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | # Test SDF reading with edge specifiers, PORT delays, and write options.
# Targets: SdfReader.cc (edge specifiers, PORT delay, RECOVERY/REMOVAL/PERIOD)
# SdfWriter.cc (write with various option combinations)
# ReportAnnotation.cc (annotation reporting with multiple check types)
# SdfParse.yy (edge specifier grammar paths, PORT DELAY)
source ../../test/helpers.tcl
set test_name sdf_edge_write
read_liberty ../../test/nangate45/Nangate45_typ.lib
read_verilog sdf_test3.v
link_design sdf_test3
create_clock -name clk -period 10 [get_ports clk]
set_input_delay -clock clk 0 [get_ports d]
set_input_delay -clock clk 0 [get_ports en]
set_output_delay -clock clk 0 [get_ports q]
set_output_delay -clock clk 0 [get_ports q_inv]
#---------------------------------------------------------------
# Read SDF with edge specifiers and timing checks
#---------------------------------------------------------------
puts "--- read_sdf test3 (edge specifiers, RECOVERY/REMOVAL/PERIOD) ---"
read_sdf sdf_test3.sdf
#---------------------------------------------------------------
# Report annotated delay: all combinations
#---------------------------------------------------------------
puts "--- report_annotated_delay combinations ---"
report_annotated_delay
report_annotated_delay -cell
report_annotated_delay -net
report_annotated_delay -from_in_ports
report_annotated_delay -to_out_ports
report_annotated_delay -cell -net
report_annotated_delay -report_annotated
report_annotated_delay -report_unannotated
report_annotated_delay -constant_arcs
report_annotated_delay -max_lines 3
report_annotated_delay -max_lines 1
#---------------------------------------------------------------
# Report annotated check: all check types
#---------------------------------------------------------------
puts "--- report_annotated_check combinations ---"
report_annotated_check
report_annotated_check -setup
report_annotated_check -hold
report_annotated_check -recovery
report_annotated_check -removal
report_annotated_check -width
report_annotated_check -period
report_annotated_check -nochange
report_annotated_check -max_skew
report_annotated_check -setup -hold
report_annotated_check -setup -hold -recovery -removal
report_annotated_check -report_annotated
report_annotated_check -report_unannotated
report_annotated_check -constant_arcs
report_annotated_check -max_lines 2
#---------------------------------------------------------------
# Write SDF with various option combinations
#---------------------------------------------------------------
puts "--- write_sdf various options ---"
# Default write
set sdf_out1 [make_result_file "${test_name}_default.sdf"]
write_sdf $sdf_out1
# With divider
set sdf_out2 [make_result_file "${test_name}_dot.sdf"]
write_sdf -divider . $sdf_out2
# With digits
set sdf_out3 [make_result_file "${test_name}_d4.sdf"]
write_sdf -digits 4 $sdf_out3
set sdf_out3b [make_result_file "${test_name}_d8.sdf"]
write_sdf -digits 8 $sdf_out3b
# With include_typ
set sdf_out4 [make_result_file "${test_name}_typ.sdf"]
write_sdf -include_typ $sdf_out4
# With no_timestamp
set sdf_out5 [make_result_file "${test_name}_nots.sdf"]
write_sdf -no_timestamp $sdf_out5
# With no_version
set sdf_out6 [make_result_file "${test_name}_nover.sdf"]
write_sdf -no_version $sdf_out6
# Gzip write
set sdf_out7 [make_result_file "${test_name}_gz.sdf.gz"]
write_sdf -gzip $sdf_out7
# All options combined
set sdf_out8 [make_result_file "${test_name}_all.sdf"]
write_sdf -digits 6 -include_typ -no_timestamp -no_version $sdf_out8
# Divider + digits + include_typ
set sdf_out9 [make_result_file "${test_name}_combo.sdf"]
write_sdf -divider . -digits 3 -include_typ $sdf_out9
#---------------------------------------------------------------
# report_checks with SDF annotations (exercises delay comparison)
#---------------------------------------------------------------
puts "--- report_checks with SDF annotations ---"
report_checks
report_checks -path_delay min
report_checks -path_delay max
report_checks -format full_clock
report_checks -fields {slew cap input_pins}
# Different paths through the annotated design
report_checks -from [get_ports d] -to [get_ports q]
report_checks -from [get_ports en] -to [get_ports q]
|