OpenCores
URL https://opencores.org/ocsvn/openmsp430/openmsp430/trunk

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [core/] [synthesis/] [synopsys/] [synthesis.tcl] - Blame information for rev 134

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 olivier.gi
 
2
#=============================================================================#
3 134 olivier.gi
#                                Configuration                                #
4
#=============================================================================#
5
 
6
# Enable/Disable DC_ULTRA option
7
set WITH_DC_ULTRA 1
8
 
9
# Enable/Disable DFT insertion
10
set WITH_DFT      1
11
 
12
 
13
#=============================================================================#
14 2 olivier.gi
#                           Read technology library                           #
15
#=============================================================================#
16
source -echo -verbose ./library.tcl
17
 
18
 
19
#=============================================================================#
20
#                               Read design RTL                               #
21
#=============================================================================#
22
source -echo -verbose ./read.tcl
23
 
24
 
25
#=============================================================================#
26
#                           Set design constraints                            #
27
#=============================================================================#
28
source -echo -verbose ./constraints.tcl
29
 
30
 
31
#=============================================================================#
32
#              Set operating conditions & wire-load models                    #
33
#=============================================================================#
34
 
35
# Set operating conditions
36
set_operating_conditions -max $LIB_WC_OPCON -max_library $LIB_WC_NAME \
37
                         -min $LIB_WC_OPCON -min_library $LIB_BC_NAME
38
 
39
# Set wire-load models
40
set_wire_load_mode top
41
set_wire_load_model -name $LIB_WIRE_LOAD -max -library $LIB_WC_NAME
42
set_wire_load_model -name $LIB_WIRE_LOAD -min -library $LIB_BC_NAME
43
 
44
 
45
#=============================================================================#
46
#                                Synthesize                                   #
47
#=============================================================================#
48
 
49
# Prevent assignment statements in the Verilog netlist.
50
set_fix_multiple_port_nets -all -buffer_constants
51
 
52 134 olivier.gi
# Configuration
53 2 olivier.gi
current_design $DESIGN_NAME
54
set_max_area  0.0
55
set_flatten false
56
set_structure true -timing true -boolean false
57
 
58 134 olivier.gi
# Synthesis
59
if {$WITH_DC_ULTRA} {
60
    if {$WITH_DFT} {
61
        compile_ultra -scan -area_high_effort_script -no_autoungroup -no_boundary_optimization
62
    } else {
63
        compile_ultra       -area_high_effort_script -no_autoungroup -no_boundary_optimization
64
    }
65
} else {
66
    if {$WITH_DFT} {
67
        compile       -scan -map_effort high -area_effort high
68
    } else {
69
        compile             -map_effort high -area_effort high
70
    }
71
}
72 2 olivier.gi
 
73 134 olivier.gi
#=============================================================================#
74
#                                DFT Insertion                                #
75
#=============================================================================#
76
if {$WITH_DFT} {
77 2 olivier.gi
 
78 134 olivier.gi
    # DFT Signal Type Definitions
79
    set_dft_signal -view spec         -type ScanEnable  -port scan_enable -active_state 1
80
    set_dft_signal -view existing_dft -type ScanEnable  -port scan_enable -active_state 1
81
    set_dft_signal -view spec         -type Constant    -port scan_mode   -active_state 1
82
    set_dft_signal -view existing_dft -type Constant    -port scan_mode   -active_state 1
83
    set_dft_signal -view existing_dft -type ScanClock   -port dco_clk     -timing [list 45 55]
84
    set_dft_signal -view existing_dft -type ScanClock   -port lfxt_clk    -timing [list 45 55]
85
    set_dft_signal -view existing_dft -type Reset       -port reset_n     -active 0
86
 
87
    # DFT Configuration
88
    set_dft_insertion_configuration -preserve_design_name true
89
    set_scan_configuration -style multiplexed_flip_flop
90
    set_scan_configuration -clock_mixing mix_clocks
91
    set_scan_configuration -chain_count 3
92
 
93
    # DFT Test Protocol Creation
94
    create_test_protocol
95
 
96
    # DFT Design Rule Check
97
    redirect -tee -file ./results/report.dft_drc           {dft_drc}
98
    redirect      -file ./results/report.dft_drc_verbose   {dft_drc -verbose}
99
    redirect      -file ./results/report.dft_drc_coverage  {dft_drc -coverage_estimate}
100
    redirect      -file ./results/report.dft_scan_config   {report_scan_configuration}
101
    redirect      -file ./results/report.dft_insert_config {report_dft_insertion_configuration}
102
 
103
    # Preview DFT insertion
104
    redirect -tee -file ./results/report.dft_preview       {preview_dft}
105
    redirect      -file ./results/report.dft_preview_all   {preview_dft -show all -test_points all}
106
 
107
    # DFT insertion
108
    insert_dft
109
 
110
    # DFT Incremental Compile
111
    if {$WITH_DC_ULTRA} {
112
        compile_ultra -scan -incremental
113
    } else {
114
        compile       -scan -incremental
115
    }
116
 
117
    # DFT Coverage estimate
118
    redirect      -file ./results/report.dft_drc_coverage  {dft_drc -coverage_estimate}
119
}
120
 
121 2 olivier.gi
#=============================================================================#
122
#                            Reports generation                               #
123
#=============================================================================#
124
 
125 134 olivier.gi
redirect -file ./results/report.timing         {check_timing}
126
redirect -file ./results/report.constraints    {report_constraints -all_violators -verbose}
127
redirect -file ./results/report.paths.max      {report_timing -path end  -delay max -max_paths 200 -nworst 2}
128
redirect -file ./results/report.full_paths.max {report_timing -path full -delay max -max_paths 5   -nworst 2}
129
redirect -file ./results/report.paths.min      {report_timing -path end  -delay min -max_paths 200 -nworst 2}
130
redirect -file ./results/report.full_paths.min {report_timing -path full -delay min -max_paths 5   -nworst 2}
131
redirect -file ./results/report.refs           {report_reference}
132
redirect -file ./results/report.area           {report_area}
133 2 olivier.gi
 
134 56 olivier.gi
# Add NAND2 size equivalent report to the area report file
135
if {[info exists NAND2_NAME]} {
136
    set nand2_area [get_attribute [get_lib_cell $LIB_WC_NAME/$NAND2_NAME] area]
137
    redirect -variable area {report_area}
138
    regexp {Total cell area:\s+([^\n]+)\n} $area whole_match area
139
    set nand2_eq [expr $area/$nand2_area]
140
    set fp [open "./results/report.area" a]
141
    puts $fp ""
142
    puts $fp "NAND2 equivalent cell area: $nand2_eq"
143
    close $fp
144 134 olivier.gi
    puts ""
145
    puts "      ======================================================="
146
    puts "     |                       AREA SUMMARY                    "
147
    puts "     |-------------------------------------------------------"
148
    puts "     |"
149
    puts "     |    $NAND2_NAME cell gate area: $nand2_area"
150
    puts "     |"
151
    puts "     |    Total Area                : $area"
152
    puts "     |    NAND2 equivalent cell area: $nand2_eq"
153
    puts "     |"
154
    puts "      ======================================================="
155
    puts ""
156 56 olivier.gi
}
157 2 olivier.gi
 
158
#=============================================================================#
159 134 olivier.gi
#          Dump gate level netlist, final DDC file and Test protocol          #
160 2 olivier.gi
#=============================================================================#
161
current_design $DESIGN_NAME
162
 
163 134 olivier.gi
change_name -rules verilog -hierarchy
164
 
165 2 olivier.gi
write -hierarchy -format verilog -output "./results/$DESIGN_NAME.gate.v"
166
write -hierarchy -format ddc     -output "./results/$DESIGN_NAME.ddc"
167
 
168 134 olivier.gi
if {$WITH_DFT} {
169
    write_test_protocol          -output "./results/$DESIGN_NAME.spf"
170
}
171 2 olivier.gi
 
172
quit

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.