Build system: Added maximum CPU frequency to build system info and improved the way nextpnr seed is handled, fixing builds with older versions of make
This commit is contained in:
parent
dd50114c07
commit
dd1080b42c
@ -80,12 +80,12 @@ synth_ecp5.json: ${SOURCES} fpga_config/${FPGA_BOARD}/fpga_top.v ${EXTRA_SYNTHES
|
|||||||
${QUIET_YOSYS}
|
${QUIET_YOSYS}
|
||||||
${Q} yosys -q -p 'read_verilog -defer -noautowire -sv '"${SOURCES} fpga_config/${FPGA_BOARD}/fpga_top.v ${EXTRA_SYNTHESIS_SOURCES} ${EXTERNAL_IP_SOURCES}; attrmap -tocase keep -imap keep="true" keep=1 -imap keep="false" keep=0 -remove keep=0; synth_ecp5 -json $@ -abc9 -top fpga_top"
|
${Q} yosys -q -p 'read_verilog -defer -noautowire -sv '"${SOURCES} fpga_config/${FPGA_BOARD}/fpga_top.v ${EXTRA_SYNTHESIS_SOURCES} ${EXTERNAL_IP_SOURCES}; attrmap -tocase keep -imap keep="true" keep=1 -imap keep="false" keep=0 -remove keep=0; synth_ecp5 -json $@ -abc9 -top fpga_top"
|
||||||
|
|
||||||
RANDOM :::= $(shell seq 1 200|sort -R|head -n1)
|
NEXTPNR_SEED ::= $(shell seq 1 200|sort -R|head -n1)
|
||||||
|
|
||||||
synth_ecp5_out.config:synth_ecp5.json
|
synth_ecp5_out.config:synth_ecp5.json
|
||||||
${QUIET_NEXTPNR}
|
${QUIET_NEXTPNR}
|
||||||
${Q}printf '\e[1;30mNotice: nextpnr rng seed is : %s\e[0m\n' "${RANDOM}"
|
${Q}printf '\e[1;30mNotice: nextpnr rng seed is : %s\e[0m\n' "${NEXTPNR_SEED}"
|
||||||
${Q} nextpnr-ecp5 --threads 5 --timing-allow-fail --seed ${RANDOM} --Werror -q --json $< --textcfg $@.1 ${NEXTPNR_ECP5_DEV} --package ${ECP5_PACKAGE} --speed 8 --lpf fpga_config/${FPGA_BOARD}/pin_constraint.pcf --report=synth_pnr_report.json
|
${Q} nextpnr-ecp5 --threads 5 --timing-allow-fail --seed ${NEXTPNR_SEED} --Werror -q --json $< --textcfg $@.1 ${NEXTPNR_ECP5_DEV} --package ${ECP5_PACKAGE} --speed 8 --lpf fpga_config/${FPGA_BOARD}/pin_constraint.pcf --report=synth_pnr_report.json
|
||||||
${Q}../tools/parse_nextpnr_stats.sh --brief synth_pnr_report.json
|
${Q}../tools/parse_nextpnr_stats.sh --brief synth_pnr_report.json
|
||||||
${Q}mv "$@.1" "$@"
|
${Q}mv "$@.1" "$@"
|
||||||
|
|
||||||
@ -104,8 +104,6 @@ upload_orangecrab:synth_ecp5.dfu
|
|||||||
${QUIET_DFU_UTIL}
|
${QUIET_DFU_UTIL}
|
||||||
${Q}stdbuf -o0 dfu-util --download "$<" |stdbuf -o0 tr '\n' '\a' | stdbuf -o0 tr '\r' '\n' | grep Download --line-buffered | stdbuf -o0 tr '\n' '\r' |stdbuf -o0 tr '\a' '\n'
|
${Q}stdbuf -o0 dfu-util --download "$<" |stdbuf -o0 tr '\n' '\a' | stdbuf -o0 tr '\r' '\n' | grep Download --line-buffered | stdbuf -o0 tr '\n' '\r' |stdbuf -o0 tr '\a' '\n'
|
||||||
|
|
||||||
NEXTPNR_SEED=186
|
|
||||||
|
|
||||||
nextpnr-gui: synth_ecp5.json
|
nextpnr-gui: synth_ecp5.json
|
||||||
${QUIET_NEXTPNR}
|
${QUIET_NEXTPNR}
|
||||||
${Q} nextpnr-ecp5 --seed ${NEXTPNR_SEED} --json $< ${NEXTPNR_ECP5_DEV} --package ${ECP5_PACKAGE} --speed 8 --lpf fpga_config/${FPGA_BOARD}/pin_constraint.pcf --gui
|
${Q} nextpnr-ecp5 --seed ${NEXTPNR_SEED} --json $< ${NEXTPNR_ECP5_DEV} --package ${ECP5_PACKAGE} --speed 8 --lpf fpga_config/${FPGA_BOARD}/pin_constraint.pcf --gui
|
||||||
|
@ -39,11 +39,14 @@ LUT_AVAIL=$(jq '.utilization.TRELLIS_COMB.available' "$REPORT" )
|
|||||||
LUT_USED=$(jq '.utilization.TRELLIS_COMB.used' "$REPORT" )
|
LUT_USED=$(jq '.utilization.TRELLIS_COMB.used' "$REPORT" )
|
||||||
FF_AVAIL=$(jq '.utilization.TRELLIS_FF.available' "$REPORT" )
|
FF_AVAIL=$(jq '.utilization.TRELLIS_FF.available' "$REPORT" )
|
||||||
FF_USED=$(jq '.utilization.TRELLIS_FF.used' "$REPORT" )
|
FF_USED=$(jq '.utilization.TRELLIS_FF.used' "$REPORT" )
|
||||||
|
FREQ_GOT=$(jq '.fmax."$glbnet$CPU_SPEED".achieved' "$REPORT" |grep -o '..\..')
|
||||||
|
FREQ_MAX=$(jq '.fmax."$glbnet$CPU_SPEED".constraint' "$REPORT" |grep -o '..\..')
|
||||||
|
|
||||||
if [ "$REPORT_TYPE" == "brief" ]
|
if [ "$REPORT_TYPE" == "brief" ]
|
||||||
then
|
then
|
||||||
printf '\e[1;30m'
|
printf '\e[1;30m'
|
||||||
echo Luts $LUT_USED/$LUT_AVAIL \($(echo "($LUT_USED*100)/$LUT_AVAIL"|bc -l|grep -o '^.*\..')%\)
|
echo Luts $LUT_USED/$LUT_AVAIL \($(echo "($LUT_USED*100)/$LUT_AVAIL"|bc -l|grep -o '^.*\..')%\)
|
||||||
echo Flip Flops $FF_USED/$FF_AVAIL \($(echo "($FF_USED*100)/$FF_AVAIL"|bc -l|grep -o '^.*\..')%\)
|
echo Flip Flops $FF_USED/$FF_AVAIL \($(echo "($FF_USED*100)/$FF_AVAIL"|bc -l|grep -o '^.*\..')%\)
|
||||||
|
echo Max CPU freq $FREQ_GOT/$FREQ_MAX
|
||||||
printf '\e[0m'
|
printf '\e[0m'
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user