2014-09-11 14:02:27 +08:00
|
|
|
#
|
2015-01-07 11:23:19 +08:00
|
|
|
# Vivado (TM) v2014.4 (64-bit)
|
2014-09-11 14:02:27 +08:00
|
|
|
#
|
2014-09-12 07:15:15 +08:00
|
|
|
# BOARD_NAME_HERE_rocketchip.tcl: Tcl script for re-creating project 'BOARD_NAME_HERE_rocketchip'
|
2014-09-11 14:02:27 +08:00
|
|
|
#
|
2015-01-07 11:23:19 +08:00
|
|
|
# Generated by Vivado on Tue Jan 06 14:00:36 PST 2015
|
|
|
|
# IP Build 1070531 on Tue Nov 18 01:10:18 MST 2014
|
2014-09-11 14:02:27 +08:00
|
|
|
#
|
|
|
|
# This file contains the Vivado Tcl commands for re-creating the project to the state*
|
|
|
|
# when this script was generated. In order to re-create the project, please source this
|
|
|
|
# file in the Vivado Tcl Shell.
|
|
|
|
#
|
|
|
|
# * Note that the runs in the created project will be configured the same way as the
|
|
|
|
# original project, however they will not be launched automatically. To regenerate the
|
|
|
|
# run results please launch the synthesis/implementation runs as needed.
|
|
|
|
|
2014-09-16 10:11:10 +08:00
|
|
|
# Set the reference directory for source file relative paths (by default the value is script directory path)
|
|
|
|
set origin_dir "."
|
|
|
|
|
|
|
|
# Set the directory path for the original project from where this script was exported
|
|
|
|
set orig_proj_dir "[file normalize "$origin_dir/BOARD_NAME_HERE_rocketchip"]"
|
2014-09-11 14:02:27 +08:00
|
|
|
|
|
|
|
# Create project
|
2014-09-12 07:15:15 +08:00
|
|
|
create_project BOARD_NAME_HERE_rocketchip $orig_proj_dir
|
2014-09-11 14:02:27 +08:00
|
|
|
|
|
|
|
# Set the directory path for the new project
|
|
|
|
set proj_dir [get_property directory [current_project]]
|
|
|
|
|
|
|
|
# Set project properties
|
2014-09-12 07:15:15 +08:00
|
|
|
set obj [get_projects BOARD_NAME_HERE_rocketchip]
|
2014-09-16 10:11:10 +08:00
|
|
|
set_property "default_lib" "xil_defaultlib" $obj
|
2014-09-11 14:02:27 +08:00
|
|
|
set_property "part" "PART_NUMBER_HERE" $obj
|
2014-09-13 12:44:36 +08:00
|
|
|
# REPLACE FOR OFFICIAL BOARD NAME $obj
|
2014-09-11 14:02:27 +08:00
|
|
|
set_property "simulator_language" "Mixed" $obj
|
|
|
|
|
|
|
|
# Create 'sources_1' fileset (if not found)
|
2014-09-16 10:11:10 +08:00
|
|
|
if {[string equal [get_filesets -quiet sources_1] ""]} {
|
2014-09-11 14:02:27 +08:00
|
|
|
create_fileset -srcset sources_1
|
|
|
|
}
|
|
|
|
|
2014-09-16 10:11:10 +08:00
|
|
|
# Set 'sources_1' fileset object
|
|
|
|
set obj [get_filesets sources_1]
|
2014-09-11 14:02:27 +08:00
|
|
|
set files [list \
|
2014-09-16 10:11:10 +08:00
|
|
|
"[file normalize "$origin_dir/src/verilog/clocking.vh"]"\
|
2014-09-20 09:02:35 +08:00
|
|
|
"[file normalize "$origin_dir/src/verilog/Top.CHISEL_CONFIG_HERE.v"]"\
|
2014-09-16 10:11:10 +08:00
|
|
|
"[file normalize "$origin_dir/src/verilog/rocketchip_wrapper.v"]"\
|
2014-09-11 14:02:27 +08:00
|
|
|
]
|
2014-09-16 10:11:10 +08:00
|
|
|
add_files -norecurse -fileset $obj $files
|
2014-09-11 14:02:27 +08:00
|
|
|
|
|
|
|
# Set 'sources_1' fileset file properties for remote files
|
|
|
|
# None
|
|
|
|
|
|
|
|
# Set 'sources_1' fileset file properties for local files
|
|
|
|
# None
|
|
|
|
|
|
|
|
# Set 'sources_1' fileset properties
|
|
|
|
set obj [get_filesets sources_1]
|
|
|
|
set_property "top" "rocketchip_wrapper" $obj
|
|
|
|
|
|
|
|
# Create 'constrs_1' fileset (if not found)
|
2014-09-16 10:11:10 +08:00
|
|
|
if {[string equal [get_filesets -quiet constrs_1] ""]} {
|
2014-09-11 14:02:27 +08:00
|
|
|
create_fileset -constrset constrs_1
|
|
|
|
}
|
|
|
|
|
2014-09-16 10:11:10 +08:00
|
|
|
# Set 'constrs_1' fileset object
|
2014-09-11 14:02:27 +08:00
|
|
|
set obj [get_filesets constrs_1]
|
2014-09-14 16:36:38 +08:00
|
|
|
|
2014-09-16 10:11:10 +08:00
|
|
|
# Add/Import constrs file and set constrs file properties
|
|
|
|
set file "[file normalize "$origin_dir/src/constrs/base.xdc"]"
|
|
|
|
set file_added [add_files -norecurse -fileset $obj $file]
|
|
|
|
set file "$origin_dir/src/constrs/base.xdc"
|
2014-09-11 14:02:27 +08:00
|
|
|
set file [file normalize $file]
|
2014-09-16 10:11:10 +08:00
|
|
|
set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
|
2014-09-11 14:02:27 +08:00
|
|
|
set_property "file_type" "XDC" $file_obj
|
|
|
|
|
|
|
|
# Set 'constrs_1' fileset properties
|
|
|
|
set obj [get_filesets constrs_1]
|
2014-09-16 10:11:10 +08:00
|
|
|
set_property "target_constrs_file" "[file normalize "$origin_dir/src/constrs/base.xdc"]" $obj
|
2014-09-11 14:02:27 +08:00
|
|
|
|
|
|
|
# Create 'sim_1' fileset (if not found)
|
2014-09-16 10:11:10 +08:00
|
|
|
if {[string equal [get_filesets -quiet sim_1] ""]} {
|
2014-09-11 14:02:27 +08:00
|
|
|
create_fileset -simset sim_1
|
|
|
|
}
|
|
|
|
|
2014-09-16 10:11:10 +08:00
|
|
|
# Set 'sim_1' fileset object
|
2014-09-11 14:02:27 +08:00
|
|
|
set obj [get_filesets sim_1]
|
|
|
|
# Empty (no sources present)
|
|
|
|
|
|
|
|
# Set 'sim_1' fileset properties
|
|
|
|
set obj [get_filesets sim_1]
|
|
|
|
set_property "top" "rocketchip_wrapper" $obj
|
|
|
|
|
|
|
|
# Create 'synth_1' run (if not found)
|
2014-09-16 10:11:10 +08:00
|
|
|
if {[string equal [get_runs -quiet synth_1] ""]} {
|
|
|
|
create_run -name synth_1 -part PART_NUMBER_HERE -flow {Vivado Synthesis 2014} -strategy "Vivado Synthesis Defaults" -constrset constrs_1
|
2015-01-07 11:23:19 +08:00
|
|
|
} else {
|
|
|
|
set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
|
|
|
|
set_property flow "Vivado Synthesis 2014" [get_runs synth_1]
|
2014-09-11 14:02:27 +08:00
|
|
|
}
|
|
|
|
set obj [get_runs synth_1]
|
|
|
|
set_property "needs_refresh" "1" $obj
|
|
|
|
set_property "part" "PART_NUMBER_HERE" $obj
|
|
|
|
|
|
|
|
# Create 'impl_1' run (if not found)
|
2014-09-16 10:11:10 +08:00
|
|
|
if {[string equal [get_runs -quiet impl_1] ""]} {
|
|
|
|
create_run -name impl_1 -part PART_NUMBER_HERE -flow {Vivado Implementation 2014} -strategy "Vivado Implementation Defaults" -constrset constrs_1 -parent_run synth_1
|
2015-01-07 11:23:19 +08:00
|
|
|
} else {
|
|
|
|
set_property strategy "Vivado Implementation Defaults" [get_runs impl_1]
|
|
|
|
set_property flow "Vivado Implementation 2014" [get_runs impl_1]
|
2014-09-11 14:02:27 +08:00
|
|
|
}
|
|
|
|
set obj [get_runs impl_1]
|
|
|
|
set_property "needs_refresh" "1" $obj
|
|
|
|
set_property "part" "PART_NUMBER_HERE" $obj
|
|
|
|
|
2014-09-12 07:15:15 +08:00
|
|
|
puts "INFO: Project created:BOARD_NAME_HERE_rocketchip"
|
|
|
|
|
|
|
|
puts "INFO: Recreating block diagram from src/tcl/BOARD_NAME_HERE_bd.tcl"
|
|
|
|
source src/tcl/BOARD_NAME_HERE_bd.tcl
|
2014-09-11 14:02:27 +08:00
|
|
|
|
|
|
|
exit
|