summaryrefslogtreecommitdiff
path: root/tcl/init.tcl
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tcl/init.tcl41
1 files changed, 41 insertions, 0 deletions
diff --git a/tcl/init.tcl b/tcl/init.tcl
new file mode 100644
index 0000000..039af91
--- /dev/null
+++ b/tcl/init.tcl
@@ -0,0 +1,41 @@
1project_new noncpu -revision noncpu -overwrite
2
3set_global_assignment -name DEVICE 10CL025YU256I7G
4
5set_global_assignment -name TOP_LEVEL_ENTITY top
6set_global_assignment -name VERILOG_INPUT_VERSION SYSTEMVERILOG_2005
7set_global_assignment -name VERILOG_MACRO "SYNTHESIS=1"
8
9proc pin {loc net} {
10 set_location_assignment -to $net "PIN_$loc"
11 set_instance_assignment -name IO_STANDARD "3.3V LVTTL" -to $net
12}
13
14pin E1 clk
15pin J15 reset_n
16
17# This is the clock for timing-driven synthesis, not timing analysis.
18# See clocks.sdf for the other clock.
19create_base_clock -fmax "50 MHz" clk
20
21proc add_files {typ ext dir} {
22 foreach name [glob -nocomplain -directory $dir -type f "*.$ext"] {
23 set_global_assignment -name "${typ}_FILE" $name
24 }
25}
26
27proc add_dir {dir} {
28 add_files CDF cdf $dir
29 add_files HEX hex $dir
30 add_files SDC sdc $dir
31 add_files VERILOG sv $dir
32 add_files VERILOG svh $dir
33
34 foreach subdir [glob -nocomplain -directory $dir -type d *] {
35 add_dir $subdir
36 }
37}
38
39add_dir .
40
41project_close