| 1 |
4 |
rudi |
###############################################################################
|
| 2 |
|
|
#
|
| 3 |
|
|
# Actual Synthesis Script
|
| 4 |
|
|
#
|
| 5 |
|
|
# This script does the actual synthesis
|
| 6 |
|
|
#
|
| 7 |
|
|
# Author: Rudolf Usselmann
|
| 8 |
|
|
# rudi@asics.ws
|
| 9 |
|
|
#
|
| 10 |
|
|
# Revision:
|
| 11 |
|
|
# 3/7/01 RU Initial Sript
|
| 12 |
|
|
#
|
| 13 |
|
|
#
|
| 14 |
|
|
###############################################################################
|
| 15 |
|
|
|
| 16 |
|
|
# ==============================================
|
| 17 |
|
|
# Setup Design Parameters
|
| 18 |
|
|
source ../bin/design_spec.dc
|
| 19 |
|
|
|
| 20 |
|
|
# ==============================================
|
| 21 |
|
|
# Setup Libraries
|
| 22 |
|
|
source ../bin/lib_spec.dc
|
| 23 |
|
|
|
| 24 |
|
|
# ==============================================
|
| 25 |
|
|
# Setup IO Files
|
| 26 |
|
|
|
| 27 |
|
|
append log_file ../log/$active_design "_cmp.log"
|
| 28 |
|
|
append pre_comp_db_file ../out/$design_name "_pre.db"
|
| 29 |
|
|
append post_comp_db_file ../out/$design_name ".db"
|
| 30 |
|
|
append post_syn_verilog_file ../out/$design_name "_ps.v"
|
| 31 |
|
|
set junk_file /dev/null
|
| 32 |
|
|
|
| 33 |
|
|
sh rm -f $log_file
|
| 34 |
|
|
|
| 35 |
|
|
# ==============================================
|
| 36 |
|
|
# Setup Misc Variables
|
| 37 |
|
|
|
| 38 |
|
|
set hdlin_enable_vpp true ;# Important - this enables 'ifdefs
|
| 39 |
|
|
|
| 40 |
|
|
# ==============================================
|
| 41 |
|
|
# Read Design
|
| 42 |
|
|
|
| 43 |
|
|
echo "+++++++++ Reading Design ..." >> $log_file
|
| 44 |
|
|
read_file $pre_comp_db_file >> $log_file
|
| 45 |
|
|
|
| 46 |
|
|
# ==============================================
|
| 47 |
|
|
# Operating conditions
|
| 48 |
|
|
|
| 49 |
|
|
echo "+++++++++ Setting up Operation Conditions ..." >> $log_file
|
| 50 |
|
|
current_design $design_name
|
| 51 |
|
|
set_operating_conditions WORST >> $log_file
|
| 52 |
|
|
|
| 53 |
|
|
# Turn off automatic wire load selection, as this
|
| 54 |
|
|
# always (WHY ???) defaults to "zero_load"
|
| 55 |
|
|
#set auto_wire_load_selection false
|
| 56 |
|
|
#set_wire_load_mode enclosed >> $log_file
|
| 57 |
|
|
#set_wire_load_mode top >> $log_file
|
| 58 |
|
|
#set_wire_load_model -name suggested_40K >> $log_file
|
| 59 |
|
|
|
| 60 |
|
|
# ==============================================
|
| 61 |
|
|
# Setup Clocks and Resets
|
| 62 |
|
|
|
| 63 |
|
|
echo "+++++++++ Setting up Clocks ..." >> $log_file
|
| 64 |
|
|
|
| 65 |
|
|
set_drive 0 [find port {*clk}]
|
| 66 |
|
|
|
| 67 |
|
|
# !!! WISHBONE Clock !!!
|
| 68 |
|
|
set clock_period 5
|
| 69 |
|
|
create_clock -period $clock_period clk
|
| 70 |
|
|
set_clock_skew -uncertainty 0.1 clk
|
| 71 |
|
|
set_clock_transition 0.5 clk
|
| 72 |
|
|
set_dont_touch_network clk
|
| 73 |
|
|
|
| 74 |
|
|
# !!! Memory Clock !!!
|
| 75 |
|
|
set clock_period2 10
|
| 76 |
|
|
create_clock -period $clock_period2 mc_clk
|
| 77 |
|
|
set_clock_skew -uncertainty 0.5 mc_clk
|
| 78 |
|
|
set_clock_transition 0.9 mc_clk
|
| 79 |
|
|
set_dont_touch_network mc_clk
|
| 80 |
|
|
|
| 81 |
|
|
# !!! Reset !!!
|
| 82 |
|
|
set_drive 0 [find port {rst*}]
|
| 83 |
|
|
set_dont_touch_network [find port {rst*}]
|
| 84 |
|
|
|
| 85 |
|
|
# ==============================================
|
| 86 |
|
|
# Setup IOs
|
| 87 |
|
|
|
| 88 |
|
|
echo "+++++++++ Setting up IOs ..." >> $log_file
|
| 89 |
|
|
|
| 90 |
|
|
# Need to spell out external IOs
|
| 91 |
|
|
|
| 92 |
|
|
set_driving_cell -cell NAND2D2 -pin Z [all_inputs] >> $junk_file
|
| 93 |
|
|
set_load 0.2 [all_outputs]
|
| 94 |
|
|
|
| 95 |
|
|
set mem_ports_i { mc_br mc_ack mc_data_i mc_dp_i mc_sts }
|
| 96 |
|
|
|
| 97 |
|
|
set mem_ports_o { mc_bg mc_addr mc_data_o mc_dp_o mc_data_oe \
|
| 98 |
|
|
mc_dqm mc_oe_ mc_we_ mc_cas_ mc_ras_ mc_cke_ \
|
| 99 |
|
|
mc_cs_ mc_rp_ mc_vpen mc_adsc_ mc_adv_ mc_zz mc_c_oe }
|
| 100 |
|
|
|
| 101 |
|
|
set wb_ports_i { wb_data_i wb_addr_i wb_sel_i wb_we_i wb_cyc_i \
|
| 102 |
|
|
wb_stb_i susp_req resume_req }
|
| 103 |
|
|
|
| 104 |
|
|
set wb_ports_o { wb_data_o wb_ack_o wb_err_o suspended poc}
|
| 105 |
|
|
|
| 106 |
|
|
|
| 107 |
|
|
set_input_delay -max 1 -clock clk $wb_ports_i
|
| 108 |
|
|
set_output_delay -max 1 -clock clk $wb_ports_o
|
| 109 |
|
|
|
| 110 |
|
|
#set_input_delay -max 1 -clock clk [all_inputs]
|
| 111 |
|
|
#set_output_delay -max 1 -clock clk [all_outputs]
|
| 112 |
|
|
|
| 113 |
|
|
set_input_delay -max 1 -clock mc_clk $mem_ports_i
|
| 114 |
|
|
set_output_delay -max 1 -clock mc_clk $mem_ports_o
|
| 115 |
|
|
|
| 116 |
|
|
#set_input_delay -max 1 -clock mc_clk [all_inputs]
|
| 117 |
|
|
#set_output_delay -max 1 -clock mc_clk [all_outputs]
|
| 118 |
|
|
|
| 119 |
|
|
# ==============================================
|
| 120 |
|
|
# Setup Area Constrains
|
| 121 |
|
|
set_max_area 0.0
|
| 122 |
|
|
|
| 123 |
|
|
# ==============================================
|
| 124 |
|
|
# Force Ultra
|
| 125 |
|
|
set_ultra_optimization -f
|
| 126 |
|
|
|
| 127 |
|
|
# ==============================================
|
| 128 |
|
|
# Compile Design
|
| 129 |
|
|
|
| 130 |
|
|
echo "+++++++++ Starting Compile ..." >> $log_file
|
| 131 |
|
|
compile -map_effort medium -area_effort medium -ungroup_all >> $log_file
|
| 132 |
|
|
#compile -map_effort low -area_effort low >> $log_file
|
| 133 |
|
|
#compile -map_effort high -area_effort high -ungroup_all >> $log_file
|
| 134 |
|
|
#compile -map_effort high -area_effort high -auto_ungroup >> $log_file
|
| 135 |
|
|
|
| 136 |
|
|
# ==============================================
|
| 137 |
|
|
# Write Out the optimized design
|
| 138 |
|
|
|
| 139 |
|
|
echo "+++++++++ Saving Optimized Design ..." >> $log_file
|
| 140 |
|
|
write_file -format verilog -output $post_syn_verilog_file
|
| 141 |
|
|
write_file -hierarchy -format db -output $post_comp_db_file
|
| 142 |
|
|
|
| 143 |
|
|
# ==============================================
|
| 144 |
|
|
# Create Some Basic Reports
|
| 145 |
|
|
|
| 146 |
|
|
echo "+++++++++ Reporting Final Results ..." >> $log_file
|
| 147 |
|
|
report_timing -nworst 10 >> $log_file
|
| 148 |
|
|
report_area >> $log_file
|
| 149 |
|
|
|
| 150 |
|
|
|