Skip to content
Snippets Groups Projects
Unverified Commit 002049d1 authored by Recolic Keghart's avatar Recolic Keghart
Browse files

bug: it won't report error on wrong --top. fixed

parent c7e52288
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,9 @@ _vw_version="${_vw_version_major}.${_vw_version_minor}"
[[ $_vw_version_major == 0 ]] && echo "Vivado wrapper is unfinished, and unable to work." && exit 11
[[ $_vw_bin_name == '' ]] && _vw_bin_name=vivado-wrapper
trap "exit 9" TERM
export _vw_mypid=$$
function show_help () {
echo "Vivado wrapper ${_vw_version}
Usage:
......@@ -63,6 +66,10 @@ Examples:
"
}
function echo2 () {
echo $@ > /dev/fd/2
}
function where_is_him () {
SOURCE="$1"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
......@@ -110,14 +117,16 @@ function import_vivadofile () {
}
function get_constraint_of_module () {
# stdout of this function is used as return val.
_mod_name="$1"
for _ele in "${top_modules[@]}" ; do
_key=${_ele%%:*}
_value=${_ele#*:}
[[ ${_key} == ${_mod_name} ]] && echo -n "${_value}" && return 0
done
echo "Error: Can not find constraint for module '$_mod_name'"
exit 1
echo2 "Error: Can not find constraint for module '$_mod_name'"
# `exit 9` won't work.
kill -s TERM $_vw_mypid
}
function generate_real_project () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment