From 7a1311c16c36b18a66a5ee43511fb9ad5093ec3a Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sun, 28 Mar 2021 14:48:30 -0700 Subject: Initial commit. --- tcl/clean.tcl | 3 +++ tcl/init.tcl | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 tcl/clean.tcl create mode 100644 tcl/init.tcl (limited to 'tcl') diff --git a/tcl/clean.tcl b/tcl/clean.tcl new file mode 100644 index 0000000..49c9f65 --- /dev/null +++ b/tcl/clean.tcl @@ -0,0 +1,3 @@ +project_open noncpu -revision noncpu + +project_clean -revision noncpu 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 @@ +project_new noncpu -revision noncpu -overwrite + +set_global_assignment -name DEVICE 10CL025YU256I7G + +set_global_assignment -name TOP_LEVEL_ENTITY top +set_global_assignment -name VERILOG_INPUT_VERSION SYSTEMVERILOG_2005 +set_global_assignment -name VERILOG_MACRO "SYNTHESIS=1" + +proc pin {loc net} { + set_location_assignment -to $net "PIN_$loc" + set_instance_assignment -name IO_STANDARD "3.3V LVTTL" -to $net +} + +pin E1 clk +pin J15 reset_n + +# This is the clock for timing-driven synthesis, not timing analysis. +# See clocks.sdf for the other clock. +create_base_clock -fmax "50 MHz" clk + +proc add_files {typ ext dir} { + foreach name [glob -nocomplain -directory $dir -type f "*.$ext"] { + set_global_assignment -name "${typ}_FILE" $name + } +} + +proc add_dir {dir} { + add_files CDF cdf $dir + add_files HEX hex $dir + add_files SDC sdc $dir + add_files VERILOG sv $dir + add_files VERILOG svh $dir + + foreach subdir [glob -nocomplain -directory $dir -type d *] { + add_dir $subdir + } +} + +add_dir . + +project_close -- cgit v1.2.3