# ########################################################################## # Source script for 32-bit updown counter for synthesis and power estimation # Author: Hetaswi Vankani (hetaswi@vt.edu) # Last Modified : September 30, 2013 # ########################################################################## # Define Search Path set_attribute lib_search_path ./libs/ # Define library to use set_attribute library {tcbn65gplusbc0d88.lib} # Enable cross-referencing to RTL files set_attribute hdl_track_filename_row_col true # Read veilog code read_hdl ./cnt_updown.v # Creates technology independent schematic elaborate # Specifying timing and design constraints BEFORE SYNTHESIS # Read timing constraints from a separate file read_sdc ./cnt_updown.sdc # If no user-asserted switching activities are specified for a net driven by a clock port, # RTL Compiler derives the probability and toggle rate from the duty cycle of the clock # Other tools use default values on net # The default probability in RTL Compiler (set through the lp_default_probability attribute) is 0.5 # The default toggle rate in RTL Compiler (set through the lp_default_toggle_rate attribute) is 0.02 per nanosecond # Annotate switching activities read_tcf ./dut.tcf # Create technology dependent schematic # Mapped over generic synthesis - tool fails to find gate level implementation in generic case for certain blocks/functional units synthesize -to_mapped # retime - improves perfomance of the design by either optimizing the area or clock period retime -prepare # -min_delay options optimizes design for timing retime -min_delay # Retiming takes care of technology dependent optimizations. # Wite synthesized file to a netlist write -mapped > syn_mapped_cnt_updown.v # write -generic > syn_generic_cnt_updown.v # Summary of script executed write_script > script # Output the various timing constraints executed/imposed by the tool write_sdc > syn_cnt_updown.sdc # RTL power analysis build_rtl_power_models -clean_up_netlist -design updown_counter # Timing report report power -rtl_cross_reference -detail > early_power_RTLbased_generic_retime.rpt # Power consumed by gates report gates -power > gates_power_generic_retime.rpt # Gates consuming max power report power -nworst 10 -sort internal [find / -inst instances_seq/*] > nworst_power_generic_retime.rpt # Power dissipated by net connected to clk3 # get_attr lp_net_power [find . -max 3 -port clk3]