diff options
| author | Julian Blake Kongslie | 2022-02-16 12:41:28 -0800 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-02-16 12:41:28 -0800 |
| commit | 6e39b7c16fbad9ddffc0f4eacd1799ca1b995492 (patch) | |
| tree | e538e4291992276da6a3847b02e20028ab8b30ef /tcl | |
| download | simple-memory-controller-6e39b7c16fbad9ddffc0f4eacd1799ca1b995492.tar.xz | |
Initial commit.
Diffstat (limited to '')
| -rw-r--r-- | tcl/clean.tcl | 3 | ||||
| -rw-r--r-- | tcl/init.tcl | 104 |
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 @@ | |||
| 1 | project_open memctrl -revision memctrl | ||
| 2 | |||
| 3 | project_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 @@ | |||
| 1 | project_new memctrl -revision memctrl -overwrite | ||
| 2 | |||
| 3 | set_global_assignment -name DEVICE 10CL025YU256I7G | ||
| 4 | |||
| 5 | set_global_assignment -name TOP_LEVEL_ENTITY top | ||
| 6 | set_global_assignment -name VERILOG_INPUT_VERSION SYSTEMVERILOG_2005 | ||
| 7 | set_global_assignment -name VERILOG_MACRO "SYNTHESIS=1" | ||
| 8 | |||
| 9 | proc 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 | |||
| 14 | proc iopin {net loc} { | ||
| 15 | pin $net $loc | ||
| 16 | set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to $net | ||
| 17 | } | ||
| 18 | |||
| 19 | proc rampin {net loc} { | ||
| 20 | set_location_assignment -to $net "PIN_$loc" | ||
| 21 | set_instance_assignment -name IO_STANDARD "1.8V" -to $net | ||
| 22 | } | ||
| 23 | |||
| 24 | pin clock E1 | ||
| 25 | |||
| 26 | iopin resetn J15 | ||
| 27 | |||
| 28 | iopin gpioa[1] L13 | ||
| 29 | iopin gpioa[2] L16 | ||
| 30 | iopin gpioa[3] L15 | ||
| 31 | iopin gpioa[4] K16 | ||
| 32 | iopin gpioa[5] P16 | ||
| 33 | iopin gpioa[6] R16 | ||
| 34 | iopin gpioa[7] N16 | ||
| 35 | iopin gpioa[8] N15 | ||
| 36 | iopin gpioa[9] N14 | ||
| 37 | iopin gpioa[10] P15 | ||
| 38 | iopin gpiob[13] N8 | ||
| 39 | iopin gpiob[14] P8 | ||
| 40 | iopin gpiob[15] M8 | ||
| 41 | iopin gpiob[16] L8 | ||
| 42 | iopin gpiob[17] R7 | ||
| 43 | iopin gpiob[18] T7 | ||
| 44 | iopin gpiob[19] L7 | ||
| 45 | iopin gpiob[20] M7 | ||
| 46 | iopin gpiob[21] R6 | ||
| 47 | iopin gpiob[22] T6 | ||
| 48 | iopin gpiob[23] T2 | ||
| 49 | iopin gpiob[24] M6 | ||
| 50 | iopin gpiob[25] R5 | ||
| 51 | iopin gpiob[26] T5 | ||
| 52 | iopin gpiob[27] N5 | ||
| 53 | iopin gpiob[28] N6 | ||
| 54 | iopin gpioc[31] R4 | ||
| 55 | iopin gpioc[32] T4 | ||
| 56 | iopin gpioc[33] N3 | ||
| 57 | iopin gpioc[34] P3 | ||
| 58 | iopin gpioc[35] R3 | ||
| 59 | iopin gpioc[36] T3 | ||
| 60 | iopin gpioc[37] P6 | ||
| 61 | iopin gpioc[38] P2 | ||
| 62 | iopin gpioc[39] P1 | ||
| 63 | iopin gpioc[40] R1 | ||
| 64 | |||
| 65 | rampin ramdata[0] T12 | ||
| 66 | rampin ramdata[1] T13 | ||
| 67 | rampin ramdata[2] T11 | ||
| 68 | rampin ramdata[3] R10 | ||
| 69 | rampin ramdata[4] T10 | ||
| 70 | rampin ramdata[5] R11 | ||
| 71 | rampin ramdata[6] R12 | ||
| 72 | rampin ramdata[7] R13 | ||
| 73 | rampin ramcsn[0] N12 | ||
| 74 | rampin ramcsn[1] P9 | ||
| 75 | rampin ramrwds T14 | ||
| 76 | rampin ramclkp P14 | ||
| 77 | rampin ramclkn R14 | ||
| 78 | rampin ramresetn N9 | ||
| 79 | |||
| 80 | # This is the clock for timing-driven synthesis, not timing analysis. | ||
| 81 | # See clocks.sdf for the other clock. | ||
| 82 | create_base_clock -fmax "50 MHz" clk | ||
| 83 | |||
| 84 | proc 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 | |||
| 90 | proc 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 | |||
| 102 | add_dir . | ||
| 103 | |||
| 104 | project_close | ||
