OpenCores
URL https://opencores.org/ocsvn/ssbcc/ssbcc/trunk

Subversion Repositories ssbcc

[/] [ssbcc/] [trunk/] [core/] [9x8/] [build/] [vivado-xc7/] [vivado/] [make] - Blame information for rev 6

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 sinclairrf
#!/bin/bash
2
#
3
# Script to build the micro controller for various 7-series FPGA.
4
#
5
# Usage:
6
#   source /opt/Xilinx/Vivado/2014.1/setttings64.sh
7
#   export DEVICE=xc7a35t-3cpg236
8
#   export PERIOD=100
9
#   [export OPTART="-propconst -sweep -remap -resynth_area"]
10
#   ./make
11
# Note:  See the pinouts directory for a list of available devices.
12
 
13
# Ensure a version of vivado has been specified.
14
 
15
if [ -z "`which vivado 2> /dev/null`" ]; then
16
  echo "FATAL ERROR:  Vivado version not specified" > /dev/stderr;
17
  exit 1;
18
fi
19
 
20
# Build the micro controller and convert it to a Vivado IP.
21
 
22
( cd ../uc_led; ./make ) || { echo "FATAL ERROR -- uc build failed" > /dev/stderr; exit 1; }
23
 
24
#
25
# Run the Vivado TCL script.
26
#
27
 
28
cat < clock.xdc
29
create_clock -period ${PERIOD} [get_ports {pi_clk}]
30
EOF
31
 
32
time vivado -mode tcl <
33
# Create the project.
34
create_project build . -part ${DEVICE} -force
35
set_property constrs_type XDC [current_fileset -constrset]
36
# Create the top-level design
37
set_property ip_repo_paths { ../uc_led } [current_fileset];
38
update_ip_catalog
39
remove_files -quiet build.scrs/sources_1/bd/top/top.bd
40
create_bd_design "top"
41
create_bd_cell -type ip -vlnv sinclairrf.com:none:uc_led:1.0 uc_led
42
create_bd_port -dir I pi_clk
43
create_bd_port -dir I pi_rst
44
create_bd_port -dir O po_led
45
foreach {sig1 sig2} {
46
  pi_clk        uc_led/i_clk
47
  pi_rst        uc_led/i_rst
48
  uc_led/o_led  po_led
49
} {
50
  connect_bd_net [get_bd_pins \$sig1] [get_bd_pins \$sig2];
51
}
52
save_bd_design
53
# Prepare for synthesis.
54
generate_target {Synthesis} [get_files build.srcs/sources_1/bd/top/top.bd]
55
generate_target {Implementation} [get_files build.srcs/sources_1/bd/top/top.bd]
56
set_property top top [current_fileset]
57
# Run synthesis.
58
read_xdc clock.xdc
59
synth_design
60
report_clocks
61
# Incorporate device-dependent pinout.
62
read_xdc pinouts/${DEVICE}.xdc
63
# Place and route the design.
64
opt_design ${OPTARG}
65
place_design
66
route_design
67
# Performance reports.
68
report_utilization
69
report_timing_summary
70
EOF
71
 
72
rm -rf clock.xdc;
73
 
74
#
75
# Extract desired performance statistics from the log file.
76
#
77
 
78
# TODO

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.