-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.tcl
More file actions
48 lines (39 loc) · 1.04 KB
/
build.tcl
File metadata and controls
48 lines (39 loc) · 1.04 KB
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
# Gowin CLI Synthesis Script for Tang Primer 25K SPI Flash Emulator
# Usage: gw_sh build.tcl
# Device: GW5A-LV25MG121NC1/I0 (Tang Primer 25K, MBGA121N package)
# GW5A-25B variant includes BSRAM
set_device -name GW5A-25B GW5A-LV25MG121NC1/I0
# Add Verilog source files
add_file src/top.v
add_file src/spi_trx.v
add_file src/sdram.v
add_file src/glue.v
add_file src/uart.v
add_file src/ft245.v
add_file src/fifo.v
add_file src/logger.v
add_file src/util.v
add_file src/pll.v
# Add constraints
add_file tangprimer25k.cst
add_file tangprimer25k.sdc
# Set top module
set_option -top_module top
# Synthesis options
set_option -verilog_std v2001
set_option -use_sspi_as_gpio 1
set_option -use_mspi_as_gpio 1
set_option -use_ready_as_gpio 1
set_option -use_done_as_gpio 1
set_option -use_i2c_as_gpio 1
set_option -use_cpu_as_gpio 1
set_option -print_all_synthesis_warning 1
# Place and route options
set_option -place_option 1
set_option -route_option 1
# Output directory
set_option -output_base_name spi_flash
# Run synthesis
run syn
# Run place and route
run pnr