summaryrefslogtreecommitdiff
path: root/tcl
diff options
context:
space:
mode:
authorJulian Blake Kongslie2022-02-16 12:41:28 -0800
committerJulian Blake Kongslie2022-02-16 12:41:28 -0800
commit6e39b7c16fbad9ddffc0f4eacd1799ca1b995492 (patch)
treee538e4291992276da6a3847b02e20028ab8b30ef /tcl
downloadsimple-memory-controller-6e39b7c16fbad9ddffc0f4eacd1799ca1b995492.tar.xz
Initial commit.
Diffstat (limited to 'tcl')
-rw-r--r--tcl/clean.tcl3
-rw-r--r--tcl/init.tcl104
2 files changed, 107 insertions, 0 deletions
diff --git a/tcl/clean.tcl b/tcl/clean.tcl
new file mode 100644
index 0000000..17de924
--- /dev/null
+++ b/tcl/clean.tcl
@@ -0,0 +1,3 @@
1project_open memctrl -revision memctrl
2
3project_clean -revision memctrl
diff --git a/tcl/init.tcl b/tcl/init.tcl
new file mode 100644
index 0000000..13c08ec
--- /dev/null
+++ b/tcl/init.tcl
@@ -0,0 +1,104 @@
1project_new memctrl -revision memctrl -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 {net loc} {
10 set_location_assignment -to $net "PIN_$loc"
11 set_instance_assignment -name IO_STANDARD "3.3V LVTTL" -to $net
12}
13
14proc iopin {net loc} {
15 pin $net $loc
16 set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to $net
17}
18
19proc rampin {net loc} {
20 set_location_assignment -to $net "PIN_$loc"
21 set_instance_assignment -name IO_STANDARD "1.8V" -to $net
22}
23
24pin clock E1
25
26iopin resetn J15
27
28iopin gpioa[1] L13
29iopin gpioa[2] L16
30iopin gpioa[3] L15
31iopin gpioa[4] K16
32iopin gpioa[5] P16
33iopin gpioa[6] R16
34iopin gpioa[7] N16
35iopin gpioa[8] N15
36iopin gpioa[9] N14
37iopin gpioa[10] P15
38iopin gpiob[13] N8
39iopin gpiob[14] P8
40iopin gpiob[15] M8
41iopin gpiob[16] L8
42iopin gpiob[17] R7
43iopin gpiob[18] T7
44iopin gpiob[19] L7
45iopin gpiob[20] M7
46iopin gpiob[21] R6
47iopin gpiob[22] T6
48iopin gpiob[23] T2
49iopin gpiob[24] M6
50iopin gpiob[25] R5
51iopin gpiob[26] T5
52iopin gpiob[27] N5
53iopin gpiob[28] N6
54iopin gpioc[31] R4
55iopin gpioc[32] T4
56iopin gpioc[33] N3
57iopin gpioc[34] P3
58iopin gpioc[35] R3
59iopin gpioc[36] T3
60iopin gpioc[37] P6
61iopin gpioc[38] P2
62iopin gpioc[39] P1
63iopin gpioc[40] R1
64
65rampin ramdata[0] T12
66rampin ramdata[1] T13
67rampin ramdata[2] T11
68rampin ramdata[3] R10
69rampin ramdata[4] T10
70rampin ramdata[5] R11
71rampin ramdata[6] R12
72rampin ramdata[7] R13
73rampin ramcsn[0] N12
74rampin ramcsn[1] P9
75rampin ramrwds T14
76rampin ramclkp P14
77rampin ramclkn R14
78rampin ramresetn N9
79
80# This is the clock for timing-driven synthesis, not timing analysis.
81# See clocks.sdf for the other clock.
82create_base_clock -fmax "50 MHz" clk
83
84proc add_files {typ ext dir} {
85 foreach name [glob -nocomplain -directory $dir -type f "*.$ext"] {
86 set_global_assignment -name "${typ}_FILE" $name
87 }
88}
89
90proc add_dir {dir} {
91 add_files CDF cdf $dir
92 add_files HEX hex $dir
93 add_files SDC sdc $dir
94 add_files VERILOG sv $dir
95 add_files VERILOG svh $dir
96
97 foreach subdir [glob -nocomplain -directory $dir -type d *] {
98 add_dir $subdir
99 }
100}
101
102add_dir .
103
104project_close