forked from abannon6601/Genus_synthesis_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenus_synth_script.tcl
59 lines (42 loc) · 1.87 KB
/
genus_synth_script.tcl
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
#written by Alan Bannon
#based off of work by Erik Brunvand and many other users on edaboard forums
#set <items> to your project settings and files
#Set the search paths to the libraries and the HDL files
set_attribute hdl_search_path {<path to hdl files>}
set_attribute lib_search_path {<path to lib files>}
set_attribute lib_search_path {<path to lib files>}
set_attribute library [list <lib files>]
set_attribute information_level 6
#optional. Comment this line if you accept blacboxes
set_attribute hdl_error_on_blackbox true
#Uncomment one of the next lines for specific files, or all files in a directory
#set myFiles [list <hdl files>]; #
#set myFiles [glob -directory <path to hdl files> *.v];
set basename <name of top level module>;
set myClk clk <clock name>;
set myPeriod_ps <clock period (ps)>;
set myInDelay_ns <delay from clock to inputs valid (ps)>;
set myOutDelay_ns <delay from clock to output valid (ps)>;
set runname <name appended to output files>;
#RUN AND OUTPUT
#Analyze and Elaborate the Design File
read_hdl -sv ${myFiles}
elaborate
# Apply Constraints and generate clocks
set clock [define_clock -period ${myPeriod_ps} -name ${myClk} [clock_ports]]
external_delay -input $myInDelay_ns -clock ${myClk} [find / -port ports_in/*]
external_delay -output $myOutDelay_ns -clock ${myClk} [find / -port ports_out/*]
# check that the design is OK so far
check_design -unresolved
report timing -lint
# Synthesize the design to the target library
synthesize -to_mapped -effort medium
# Write out the reports
report timing > ${basename}_${runname}_timing.rep
report gates > ${basename}_${runname}_cell.rep
report power > ${basename}_${runname}_power.rep
# Write out the structural Verilog and sdc files
write_hdl -mapped > ${basename}_${runname}.v
write_sdc > ${basename}_${runname}.sdc
# show result
gui_raise