mirror of
https://github.com/Polprzewodnikowy/SummerCart64.git
synced 2024-12-27 05:21:55 +01:00
c4f6a0d555
And other bug fixes related to DMA write mask
32 lines
725 B
Bash
Executable File
32 lines
725 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
source $bindir/diamond_env
|
|
|
|
diamondc build.tcl
|
|
|
|
MINIMUM_FREQ=$(cat impl1/sc64_impl1.twr \
|
|
| grep 'Preference: FREQUENCY NET "clk"' \
|
|
| head -1 \
|
|
| awk -F ' ' '{print $5}' \
|
|
)
|
|
|
|
DESIGN_FREQ=$(cat impl1/sc64_impl1.twr \
|
|
| sed -n '/Preference: FREQUENCY NET "clk"/,$p' \
|
|
| grep 'is the maximum frequency for this preference' \
|
|
| head -1 \
|
|
| awk -F ' ' '{print $2}' \
|
|
| sed 's/MHz//' \
|
|
)
|
|
|
|
echo "Minimum required frequency: $MINIMUM_FREQ MHz"
|
|
echo "Maximum design frequency: $DESIGN_FREQ MHz"
|
|
|
|
if (( $(echo "$DESIGN_FREQ < $MINIMUM_FREQ" | bc -l) )); then
|
|
echo "Timing error detected, build failed"
|
|
exit 1
|
|
fi
|
|
|
|
echo -n "$DESIGN_FREQ MHz" > impl1/fpga_max_frequency.txt
|