1 |
2 |
conte |
/********************************************************/
|
2 |
|
|
/* */
|
3 |
|
|
/* Basic NCSU Synthesis Script */
|
4 |
|
|
/* */
|
5 |
|
|
/* Set up for the 0.25um CMOSX library */
|
6 |
|
|
/* */
|
7 |
|
|
/* Revision History */
|
8 |
|
|
/* 1/5/97 : Author P. Franzon */
|
9 |
|
|
/* 1/2/98 : More heavilly commented */
|
10 |
|
|
/* 8/8/04 : Modified by Balaji V. Iyer */
|
11 |
|
|
/* (bviyer@ncsu.edu) */
|
12 |
|
|
/* for the OPEN RISC 2 way Multithreading */
|
13 |
|
|
/* project */
|
14 |
|
|
/* Advisor: Dr. Tom Conte */
|
15 |
|
|
/* */
|
16 |
|
|
/********************************************************/
|
17 |
|
|
/*//////////////////////////////////////////////////////////////////*/
|
18 |
|
|
/*// //*/
|
19 |
|
|
/*// Copyright (C) 2000 Authors and OPENCORES.ORG //*/
|
20 |
|
|
/*// //*/
|
21 |
|
|
/*// This source file may be used and distributed without //*/
|
22 |
|
|
/*// restriction provided that this copyright statement is not //*/
|
23 |
|
|
/*// removed from the file and that any derivative work contains //*/
|
24 |
|
|
/*// the original copyright notice and the associated disclaimer. //*/
|
25 |
|
|
/*// //*/
|
26 |
|
|
/*// This source file is free software; you can redistribute it //*/
|
27 |
|
|
/*// and/or modify it under the terms of the GNU Lesser General //*/
|
28 |
|
|
/*// Public License as published by the Free Software Foundation; //*/
|
29 |
|
|
/*// either version 2.1 of the License, or (at your option) any //*/
|
30 |
|
|
/*// later version. //*/
|
31 |
|
|
/*// //*/
|
32 |
|
|
/*// This source is distributed in the hope that it will be //*/
|
33 |
|
|
/*// useful, but WITHOUT ANY WARRANTY; without even the implied //*/
|
34 |
|
|
/*// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR //*/
|
35 |
|
|
/*// PURPOSE. See the GNU Lesser General Public License for more //*/
|
36 |
|
|
/*// details. //*/
|
37 |
|
|
/*// //*/
|
38 |
|
|
/*// You should have received a copy of the GNU Lesser General //*/
|
39 |
|
|
/*// Public License along with this source; if not, download it //*/
|
40 |
|
|
/*// from http://www.opencores.org/lgpl.shtml //*/
|
41 |
|
|
/*// //*/
|
42 |
|
|
/*//////////////////////////////////////////////////////////////////*/
|
43 |
|
|
/********************************************************/
|
44 |
|
|
/* */
|
45 |
|
|
/* Read in Verilog file and map (synthesize) */
|
46 |
|
|
/* onto a generic library */
|
47 |
|
|
/* */
|
48 |
|
|
/* MAKE SURE THAT YOU CORRECT ALL WARNINGS THAT APPEAR */
|
49 |
|
|
/* during the execution of the read command are fixed */
|
50 |
|
|
/* or understood to have no impact */
|
51 |
|
|
/* */
|
52 |
|
|
/* ALSO CHECK your latch/flip-flop list for unintended */
|
53 |
|
|
/* latches */
|
54 |
|
|
/* */
|
55 |
|
|
/********************************************************/
|
56 |
|
|
Read -f Verilog or1200_genpc.v
|
57 |
|
|
Read -f Verilog or1200_amultp2_32x32.v
|
58 |
|
|
Read -f Verilog or1200_if.v
|
59 |
|
|
Read -f Verilog or1200_ctrl.v
|
60 |
|
|
Read -f Verilog or1200_alu.v
|
61 |
|
|
Read -f Verilog or1200_mult_mac.v
|
62 |
|
|
Read -f Verilog or1200_except.v
|
63 |
|
|
Read -f Verilog or1200_dpram_32x32.v
|
64 |
|
|
Read -f Verilog or1200_rf.v
|
65 |
|
|
Read -f Verilog or1200_rf_top.v
|
66 |
|
|
Read -f Verilog or1200_mem2reg.v
|
67 |
|
|
Read -f Verilog or1200_reg2mem.v
|
68 |
|
|
Read -f Verilog or1200_lsu.v
|
69 |
|
|
Read -f Verilog or1200_operandmuxes.v
|
70 |
|
|
Read -f Verilog or1200_wbmux.v
|
71 |
|
|
Read -f Verilog or1200_cfgr.v
|
72 |
|
|
Read -f Verilog or1200_freeze.v
|
73 |
|
|
Read -f Verilog or1200_sprs.v
|
74 |
|
|
Read -f Verilog or1200_cpu.v
|
75 |
|
|
|
76 |
|
|
current_design = or1200_cpu
|
77 |
|
|
|
78 |
|
|
/********************************************************/
|
79 |
|
|
/* */
|
80 |
|
|
/* Our first Optimization 'compile' is intended to */
|
81 |
|
|
/* produce a design that will meet hold-time */
|
82 |
|
|
/* under worst-case conditions: */
|
83 |
|
|
/* - slowest process corner */
|
84 |
|
|
/* - highest operating temperature and lowest Vcc */
|
85 |
|
|
/* - expected worst case clock skew */
|
86 |
|
|
/* */
|
87 |
|
|
/********************************************************/
|
88 |
|
|
|
89 |
|
|
/*------------------------------------------------------*/
|
90 |
|
|
/* Specify the worst case (slowest) libraries and */
|
91 |
|
|
/* slowest temperature/Vcc conditions */
|
92 |
|
|
/*------------------------------------------------------*/
|
93 |
|
|
link_library = {"ncsulib25_worst.db"}
|
94 |
|
|
target_library = {"ncsulib25_worst.db"}
|
95 |
|
|
/* set_operating_conditions -library "ms080cmosxCells_XXW" "T125_V4.5" */
|
96 |
|
|
|
97 |
|
|
/*------------------------------------------------------*/
|
98 |
|
|
/* Specify a 250 ns clock period with 50% duty cycle */
|
99 |
|
|
/* and a skew of 1 ns */
|
100 |
|
|
/*------------------------------------------------------*/
|
101 |
|
|
Create_clock -period 250000 -waveform {0 125000} clk
|
102 |
|
|
set_clock_skew -uncertainty 1000 clk
|
103 |
|
|
|
104 |
|
|
/*------------------------------------------------------*/
|
105 |
|
|
/* Most libraries have bugs in them. */
|
106 |
|
|
/* This library has cells that don't have a layout version */
|
107 |
|
|
/* - the PULLUP cell is one of them */
|
108 |
|
|
/*------------------------------------------------------*/
|
109 |
|
|
/* set_dont_use ms080cmosxCells_XXW/PULLUP */
|
110 |
|
|
|
111 |
|
|
/********************************************************/
|
112 |
|
|
/* */
|
113 |
|
|
/* Now set up the 'CONSTRAINTS' on the design: */
|
114 |
|
|
/* 1. How much of the clock period is lost in the */
|
115 |
|
|
/* modules connected to it */
|
116 |
|
|
/* 2. What type of cells are driving the inputs */
|
117 |
|
|
/* 3. What type of cells and how many (fanout) must it */
|
118 |
|
|
/* be able to drive */
|
119 |
|
|
/* */
|
120 |
|
|
/********************************************************/
|
121 |
|
|
|
122 |
|
|
/*------------------------------------------------------*/
|
123 |
|
|
/* ASSUME being driven by a slowest D-flip-flop */
|
124 |
|
|
/* The DFF cell has a clock-Q delay of 1.75 ns */
|
125 |
|
|
/* Allow another 0.25 ns for wiring delay */
|
126 |
|
|
/* NOTE: THESE ARE INITIAL ASSUMPTIONS ONLY */
|
127 |
|
|
/*------------------------------------------------------*/
|
128 |
|
|
set_input_delay 1100 -clock clk all_inputs() - clk
|
129 |
|
|
|
130 |
|
|
|
131 |
|
|
/*------------------------------------------------------*/
|
132 |
|
|
/* ASSUME this module is driving a D-flip-flip */
|
133 |
|
|
/* The DFF cell has a set-up time of 1.4 ns */
|
134 |
|
|
/* Allow another 0.25 ns for wiring delay */
|
135 |
|
|
/* NOTE: THESE ARE INITIAL ASSUMPTIONS ONLY */
|
136 |
|
|
/*------------------------------------------------------*/
|
137 |
|
|
set_output_delay 950 -clock clk all_outputs()
|
138 |
|
|
|
139 |
|
|
/*------------------------------------------------------*/
|
140 |
|
|
/* ASSUME being driven by a D-flip-flop */
|
141 |
|
|
/*------------------------------------------------------*/
|
142 |
|
|
set_driving_cell -no_design_rule -cell "dp_2" -pin "q" all_inputs() - clk
|
143 |
|
|
|
144 |
|
|
/*------------------------------------------------------*/
|
145 |
|
|
/* ASSUME the woest case output load is */
|
146 |
|
|
/* 3 D-flip-flop (D-inputs) and */
|
147 |
|
|
/* and 0.5 units of wiring capacitance */
|
148 |
|
|
/*------------------------------------------------------*/
|
149 |
|
|
port_load = 0.5 + 3 * load_of (ncsulib25_worst/dp_2/ip)
|
150 |
|
|
set_load port_load all_outputs()
|
151 |
|
|
|
152 |
|
|
/********************************************************/
|
153 |
|
|
/* */
|
154 |
|
|
/* Now set the GOALS for the compile */
|
155 |
|
|
/* */
|
156 |
|
|
/* In most cases you want minimum area, so set the */
|
157 |
|
|
/* goal for maximum area to be 0 */
|
158 |
|
|
/* */
|
159 |
|
|
/********************************************************/
|
160 |
|
|
set_max_area 0
|
161 |
|
|
link
|
162 |
|
|
uniquify
|
163 |
|
|
|
164 |
|
|
/*------------------------------------------------------*/
|
165 |
|
|
/* During the initial map (synthesis), Synopsys might */
|
166 |
|
|
/* have built parts (such as adders) using its */
|
167 |
|
|
/* DesignWare(TM) library. In order to remap the */
|
168 |
|
|
/* design to our CMOSX library AND to create scope */
|
169 |
|
|
/* for logic reduction, I want to 'flatten out' the */
|
170 |
|
|
/* DesignWare components. i.e. Make one flat design */
|
171 |
|
|
/* */
|
172 |
|
|
/* 'replace_synthetic' is the cleanest way of doing this*/
|
173 |
|
|
/*------------------------------------------------------*/
|
174 |
|
|
replace_synthetic -ungroup
|
175 |
|
|
|
176 |
|
|
/*------------------------------------------------------*/
|
177 |
|
|
/* check the design before otimization */
|
178 |
|
|
/*------------------------------------------------------*/
|
179 |
|
|
check_design
|
180 |
|
|
check_timing
|
181 |
|
|
|
182 |
|
|
/********************************************************/
|
183 |
|
|
/* */
|
184 |
|
|
/* Now resynthesize the design to meet constraints, */
|
185 |
|
|
/* and try to best achieve the goal, and using the */
|
186 |
|
|
/* CMOSX parts. In large designs, compile can take */
|
187 |
|
|
/* a lllooonnnnggg time */
|
188 |
|
|
/* */
|
189 |
|
|
/********************************************************/
|
190 |
|
|
|
191 |
|
|
/*------------------------------------------------------*/
|
192 |
|
|
/* -map_effort specifies how much optimization effort */
|
193 |
|
|
/* there is low, medium, and high */
|
194 |
|
|
/* use high to squeeze out those last picoseconds */
|
195 |
|
|
/* -verify_effort specifies how much effort to spend */
|
196 |
|
|
/* making sure that the input and output designs */
|
197 |
|
|
/* are equivalent logically */
|
198 |
|
|
/*------------------------------------------------------*/
|
199 |
|
|
compile -map_effort high /* -verify -verify_effort medium */
|
200 |
|
|
|
201 |
|
|
/*------------------------------------------------------*/
|
202 |
|
|
/* Now trace the critical (slowest) path and see if */
|
203 |
|
|
/* the timing works. */
|
204 |
|
|
/* */
|
205 |
|
|
/* If the slack is NOT met, you HAVE A PROBLEM and */
|
206 |
|
|
/* need to redesign or try some other minimization */
|
207 |
|
|
/* tricks that Synopsys can do */
|
208 |
|
|
/*------------------------------------------------------*/
|
209 |
|
|
report_timing
|
210 |
|
|
report_area
|
211 |
|
|
/********************************************************/
|
212 |
|
|
/* */
|
213 |
|
|
/* This is your section to do different things to */
|
214 |
|
|
/* improve timing or area - RTFM */
|
215 |
|
|
/* */
|
216 |
|
|
/********************************************************/
|
217 |
|
|
|
218 |
|
|
/********************************************************/
|
219 |
|
|
/* */
|
220 |
|
|
/* Now resynthesize the design for the fastest corner */
|
221 |
|
|
/* making sure that hold time conditions are met */
|
222 |
|
|
/* */
|
223 |
|
|
/********************************************************/
|
224 |
|
|
|
225 |
|
|
/*------------------------------------------------------*/
|
226 |
|
|
/* Specify the fastest process corner and lowest temp */
|
227 |
|
|
/* And highest (fastest) Vcc */
|
228 |
|
|
/*------------------------------------------------------*/
|
229 |
|
|
/* link_library = {"ms080cmosxCells_XXB.db"} */
|
230 |
|
|
/* target_library = {"ms080cmosxCells_XXB.db"} */
|
231 |
|
|
/* set_operating_conditions -library "ms080cmosxCells_XXB" "T-55_V5.5" */
|
232 |
|
|
/*------------------------------------------------------*/
|
233 |
|
|
/* Since we have a 'new' library, we need to do this */
|
234 |
|
|
/* again */
|
235 |
|
|
/*------------------------------------------------------*/
|
236 |
|
|
/* set_dont_use ms080cmosxCells_XXB/PULLUP */
|
237 |
|
|
|
238 |
|
|
/*------------------------------------------------------*/
|
239 |
|
|
/* Set the design rule to 'fix hold time violations' */
|
240 |
|
|
/* Then compile the design again, telling Synopsys to */
|
241 |
|
|
/* Only change the design if there are hold time */
|
242 |
|
|
/* violations. */
|
243 |
|
|
/*------------------------------------------------------*/
|
244 |
|
|
/* set_fix_hold clk */
|
245 |
|
|
/* compile -only_design_rule -incremental */
|
246 |
|
|
|
247 |
|
|
/*------------------------------------------------------*/
|
248 |
|
|
/* Report the fastest path. Make sure the hold */
|
249 |
|
|
/* is actually met. */
|
250 |
|
|
/*------------------------------------------------------*/
|
251 |
|
|
/* report_timing -delay min */
|
252 |
|
|
|
253 |
|
|
/*------------------------------------------------------*/
|
254 |
|
|
/* Write out the 'fastest' (minimum) timing file */
|
255 |
|
|
/* in Standard Delay Format. We might use this in later*/
|
256 |
|
|
/* verification. */
|
257 |
|
|
/*------------------------------------------------------*/
|
258 |
|
|
/* write_timing -output or1200_rf_top_min.sdf -format sdf */
|
259 |
|
|
|
260 |
|
|
/*------------------------------------------------------*/
|
261 |
|
|
/* Since Synopsys has to insert logic to meet hold */
|
262 |
|
|
/* violations, we might find that we have setup */
|
263 |
|
|
/* violations now. SO lets recheck with the slowest */
|
264 |
|
|
/* corner etc. */
|
265 |
|
|
/* */
|
266 |
|
|
/* YOU problems if the slack is NOT MET */
|
267 |
|
|
/* */
|
268 |
|
|
/* 'translate' means 'translate to new library' */
|
269 |
|
|
/*------------------------------------------------------*/
|
270 |
|
|
|
271 |
|
|
/* link_library = {"ms080cmosxCells_XXB.db"} */
|
272 |
|
|
/* target_library = {"ms080cmosxCells_XXW.db"} */
|
273 |
|
|
/* set_operating_conditions -library "ms080cmosxCells_XXW" "T125_V4.5" */
|
274 |
|
|
/* translate */
|
275 |
|
|
/* report_timing */
|
276 |
|
|
|
277 |
|
|
/*------------------------------------------------------*/
|
278 |
|
|
/* Write out the resulting netlist in Verliog format */
|
279 |
|
|
/*------------------------------------------------------*/
|
280 |
|
|
/* write -f verilog -o or1200_rf_top_final.v */
|
281 |
|
|
|
282 |
|
|
/*------------------------------------------------------*/
|
283 |
|
|
/* Write out the 'slowest' (maximum) timing file */
|
284 |
|
|
/* in Standard Delay Format. We might use this in later*/
|
285 |
|
|
/* verification. */
|
286 |
|
|
/*------------------------------------------------------*/
|
287 |
|
|
/* write_timing -output or1200_rf_top_max.sdf -format sdf */
|