Markus Koch
f21122c54b
For some reason, GHDL adds some (not all) asserts to the synthesis netlist. This script removes them.
15 lines
263 B
Bash
Executable File
15 lines
263 B
Bash
Executable File
#!/bin/bash
|
|
|
|
file="$1"
|
|
echo "Removing \$assert from $file..."
|
|
|
|
LOCS=`grep -n '$assert' "$file" | sed 's/:.*//g'`
|
|
|
|
IFS=$'\n'
|
|
for LOC in $LOCS; do
|
|
START=$(($LOC-2))
|
|
END=$(($LOC+14))
|
|
echo "Deleting lines $START -> $END"
|
|
sed -i -e "${START},${END}d" "$file"
|
|
done
|