Skip to content

Commit

Permalink
remove another junk dir
Browse files Browse the repository at this point in the history
  • Loading branch information
recolic committed Sep 3, 2018
2 parents c99d34c + e894e17 commit f451acf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions gen_tcl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ elif [[ $1 == gui ]]; then
echo "open_project ${xpr}
`find ${proj_dir}/*.srcs -regex '^.*\.s?vh?$' -exec echo add_files \{\} \;`
start_gui"
elif [[ $1 == init-project ]]; then
proj_name="$2"
proj_dir="$3"
part_name="$4" # xc7a100tcsg324-1
echo "# Generated by Vivado wrapper, licensed under GPL 3.0
# Copyright (C) Recolic Keghart <root@recolic.net>
create_project ${proj_name} ${proj_dir} -part ${part_name}
file mkdir ${proj_dir}/${proj_name}.srcs/constrs_1/new
close [ open ${proj_dir}/${proj_name}.srcs/constrs_1/new/constraint.xdc w ]
add_files -fileset constrs_1 ${proj_dir}/${proj_name}.srcs/constrs_1/new/constraint.xdc"
rm -f ${proj_dir}/${proj_name}.srcs/constrs_1/new/constraint.xdc
else
echo "Usage: $0 build <xpr path> <run_name_synth> <run_name_impl> <to_step> <top module name> <threads_num>
$0 burn <xpr path> <run_name_impl> <top_module_name> <dev_name(Ex:xc7a100t_0)>"
Expand Down
3 changes: 3 additions & 0 deletions template/Vivadofile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ top_modules=(
# top_module=test_main
top_module=

# Name of your board in vivado
board="xc7a100tcsg324-1"

#
# Optional options
#
Expand Down
3 changes: 2 additions & 1 deletion vivado-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,13 @@ function get_constraint_of_module () {
function generate_real_project () {
[[ "$constr_path" == '' ]] && constr_path="$(pwd)/$(get_constraint_of_module $top_module)"
cp -r "$my_path/template/project" "$temp_dir/"
# todo: use new init-project to generate if template not exist
_real_proj_src="$temp_dir/project/temp_project.srcs"
for src in `echo ${sources[@]}`; do
mkdir -p "$_real_proj_src/sources_1/new/$(dirname "$src")"
ln -s "$(pwd)/$src" "$_real_proj_src/sources_1/new/$src"
done
rm "$_real_proj_src/constrs_1/new/constraint.xdc"
rm -f "$_real_proj_src/constrs_1/new/constraint.xdc"
ln -s "$constr_path" "$_real_proj_src/constrs_1/new/constraint.xdc"
echo "real_project generated at $temp_dir"
}
Expand Down

0 comments on commit f451acf

Please sign in to comment.