From 26127b45dec21a46b89815513a452e4ad2754a3f Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 9 Jun 2015 12:45:45 +0200 Subject: [PATCH] Makefile for Vivado scripts --- scripts/vivado/.gitignore | 6 ++---- scripts/vivado/Makefile | 10 ++++++++++ .../vivado/{synth_vivado_soc.v => soc_top.v} | 2 +- scripts/vivado/synth_area.tcl | 14 ++++++++++++++ scripts/vivado/synth_area.xdc | 1 + scripts/vivado/synth_soc.tcl | 15 +++++++++++++++ scripts/vivado/synth_soc.xdc | 1 + scripts/vivado/synth_speed.tcl | 14 ++++++++++++++ .../{synth_vivado.xdc => synth_speed.xdc} | 0 scripts/vivado/synth_vivado.tcl | 18 ------------------ 10 files changed, 58 insertions(+), 23 deletions(-) create mode 100644 scripts/vivado/Makefile rename scripts/vivado/{synth_vivado_soc.v => soc_top.v} (99%) create mode 100644 scripts/vivado/synth_area.tcl create mode 100644 scripts/vivado/synth_area.xdc create mode 100644 scripts/vivado/synth_soc.tcl create mode 100644 scripts/vivado/synth_soc.xdc create mode 100644 scripts/vivado/synth_speed.tcl rename scripts/vivado/{synth_vivado.xdc => synth_speed.xdc} (100%) delete mode 100644 scripts/vivado/synth_vivado.tcl diff --git a/scripts/vivado/.gitignore b/scripts/vivado/.gitignore index 74c116e..87c273a 100644 --- a/scripts/vivado/.gitignore +++ b/scripts/vivado/.gitignore @@ -1,4 +1,2 @@ -fsm_encoding.os -synth_vivado.log -synth_vivado_*.backup.log -synth_vivado_syn.v +synth_*.log +synth_*.v diff --git a/scripts/vivado/Makefile b/scripts/vivado/Makefile new file mode 100644 index 0000000..44f66d4 --- /dev/null +++ b/scripts/vivado/Makefile @@ -0,0 +1,10 @@ + +VIVADO = /opt/Xilinx/Vivado/2014.4/bin/vivado + +help: + @echo "Usage: make {synth_speed|synth_area|synth_soc}" + +synth_%: + $(VIVADO) -nojournal -log $@.log -mode batch -source $@.tcl + rm -rf .Xil fsm_encoding.os synth_*.backup.log + diff --git a/scripts/vivado/synth_vivado_soc.v b/scripts/vivado/soc_top.v similarity index 99% rename from scripts/vivado/synth_vivado_soc.v rename to scripts/vivado/soc_top.v index e36b7fb..f57ef48 100644 --- a/scripts/vivado/synth_vivado_soc.v +++ b/scripts/vivado/soc_top.v @@ -1,6 +1,6 @@ `timescale 1 ns / 1 ps -module test_soc ( +module soc_top ( input clk, input resetn, output trap, diff --git a/scripts/vivado/synth_area.tcl b/scripts/vivado/synth_area.tcl new file mode 100644 index 0000000..b9376af --- /dev/null +++ b/scripts/vivado/synth_area.tcl @@ -0,0 +1,14 @@ + +read_verilog ../../picorv32.v +read_xdc synth_area.xdc + +synth_design -part xc7a15t-csg324 -top picorv32_axi +opt_design +place_design +route_design + +report_utilization +report_timing + +write_verilog -force synth_area.v + diff --git a/scripts/vivado/synth_area.xdc b/scripts/vivado/synth_area.xdc new file mode 100644 index 0000000..3c3d5a1 --- /dev/null +++ b/scripts/vivado/synth_area.xdc @@ -0,0 +1 @@ +create_clock -period 20.00 [get_ports clk] diff --git a/scripts/vivado/synth_soc.tcl b/scripts/vivado/synth_soc.tcl new file mode 100644 index 0000000..4311418 --- /dev/null +++ b/scripts/vivado/synth_soc.tcl @@ -0,0 +1,15 @@ + +read_verilog soc_top.v +read_verilog ../../picorv32.v +read_xdc synth_soc.xdc + +synth_design -part xc7a15t-csg324 -top soc_top +opt_design +place_design +route_design + +report_utilization +report_timing + +write_verilog -force synth_soc.v + diff --git a/scripts/vivado/synth_soc.xdc b/scripts/vivado/synth_soc.xdc new file mode 100644 index 0000000..159af1b --- /dev/null +++ b/scripts/vivado/synth_soc.xdc @@ -0,0 +1 @@ +create_clock -period 5.00 [get_ports clk] diff --git a/scripts/vivado/synth_speed.tcl b/scripts/vivado/synth_speed.tcl new file mode 100644 index 0000000..8e1c8b4 --- /dev/null +++ b/scripts/vivado/synth_speed.tcl @@ -0,0 +1,14 @@ + +read_verilog ../../picorv32.v +read_xdc synth_speed.xdc + +synth_design -part xc7a15t-csg324 -top picorv32_axi +opt_design +place_design +route_design + +report_utilization +report_timing + +write_verilog -force synth_speed.v + diff --git a/scripts/vivado/synth_vivado.xdc b/scripts/vivado/synth_speed.xdc similarity index 100% rename from scripts/vivado/synth_vivado.xdc rename to scripts/vivado/synth_speed.xdc diff --git a/scripts/vivado/synth_vivado.tcl b/scripts/vivado/synth_vivado.tcl deleted file mode 100644 index 386a070..0000000 --- a/scripts/vivado/synth_vivado.tcl +++ /dev/null @@ -1,18 +0,0 @@ - -# vivado -nojournal -log synth_vivado.log -mode batch -source synth_vivado.tcl - -read_verilog synth_vivado_soc.v -read_verilog ../../picorv32.v -read_xdc synth_vivado.xdc - -synth_design -part xc7a15t-csg324 -top picorv32_axi -# synth_design -part xc7a15t-csg324 -top test_soc -opt_design -place_design -route_design - -report_utilization -report_timing - -write_verilog -force synth_vivado_syn.v -