Compare commits
2 Commits
a88c420ca5
...
09b3d51015
Author | SHA1 | Date | |
---|---|---|---|
09b3d51015 | |||
863af26422 |
@ -12,6 +12,18 @@ JNZ DELAY11
|
||||
|
||||
MOV AL,#0x01
|
||||
out byte #0xB0
|
||||
MOV AL,#0x48
|
||||
out byte #0xA5
|
||||
MOV AL,#0x65
|
||||
out byte #0xA5
|
||||
MOV AL,#0x6c
|
||||
out byte #0xA5
|
||||
MOV AL,#0x6c
|
||||
out byte #0xA5
|
||||
MOV AL,#0x6f
|
||||
out byte #0xA5
|
||||
MOV AL,#0x20
|
||||
out byte #0xA5
|
||||
|
||||
MOV DL,#0xF0
|
||||
DELAY21:
|
||||
|
@ -66,7 +66,7 @@ else
|
||||
$(error invalid ECP5 device ${ECP5_DEVICE})
|
||||
endif
|
||||
|
||||
ECP5_TARGETS=synth_ecp5.json synth_ecp5_out.config synth_ecp5.bit synth_ecp5.dfu
|
||||
ECP5_TARGETS=synth_ecp5.json synth_ecp5_out.config synth_ecp5.bit synth_ecp5.dfu synth_pnr_report.json
|
||||
ECP5_TARGETS+=abc.history # created from yosys
|
||||
|
||||
EXTRA_SYNTHESIS_SOURCES=peripherals/I2C_driver.v peripherals/ascii_to_HD44780_driver.v peripherals/pcf8574_for_HD44780.v
|
||||
@ -78,7 +78,8 @@ synth_ecp5.json: ${SOURCES} ${TOP_LEVEL_SOURCE} fpga_config/${FPGA_BOARD}/fpga_t
|
||||
|
||||
synth_ecp5_out.config:synth_ecp5.json
|
||||
${QUIET_NEXTPNR}
|
||||
${Q} nextpnr-ecp5 --Werror -q --json $< --textcfg $@ ${NEXTPNR_ECP5_DEV} --package ${ECP5_PACKAGE} --lpf fpga_config/${FPGA_BOARD}/pin_constraint.pcf
|
||||
${Q} nextpnr-ecp5 --Werror -q --json $< --textcfg $@ ${NEXTPNR_ECP5_DEV} --package ${ECP5_PACKAGE} --lpf fpga_config/${FPGA_BOARD}/pin_constraint.pcf --report=synth_pnr_report.json
|
||||
${Q}../tools/parse_nextpnr_stats.sh --brief synth_pnr_report.json
|
||||
|
||||
synth_ecp5.bit:synth_ecp5_out.config
|
||||
${QUIET_ECPPACK}
|
||||
|
49
tools/parse_nextpnr_stats.sh
Executable file
49
tools/parse_nextpnr_stats.sh
Executable file
@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
if ! which jq &> /dev/null
|
||||
then
|
||||
echo to get stastics, please install jq
|
||||
exit 0
|
||||
fi
|
||||
|
||||
REPORT_TYPE=brief
|
||||
|
||||
if [ $# == 0 ]
|
||||
then
|
||||
echo $0' [report type] <report json file>'
|
||||
exit 1
|
||||
elif [ $# == 2 ]
|
||||
then
|
||||
case "$1" in
|
||||
"--brief")
|
||||
REPORT_TYPE=brief
|
||||
;;
|
||||
*)
|
||||
echo unkown parameter "\"$1\""
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
REPORT=$2
|
||||
else
|
||||
REPORT=$1
|
||||
fi
|
||||
|
||||
if ! [ -e "$REPORT" ]
|
||||
then
|
||||
echo file "\"${REPORT}\"" doesn\'t exist!
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LUT_AVAIL=$(jq '.utilization.TRELLIS_COMB.available' "$REPORT" )
|
||||
LUT_USED=$(jq '.utilization.TRELLIS_COMB.used' "$REPORT" )
|
||||
FF_AVAIL=$(jq '.utilization.TRELLIS_FF.available' "$REPORT" )
|
||||
FF_USED=$(jq '.utilization.TRELLIS_FF.used' "$REPORT" )
|
||||
|
||||
if [ "$REPORT_TYPE" == "brief" ]
|
||||
then
|
||||
printf '\e[1;30m'
|
||||
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 '^.*\..')%\)
|
||||
printf '\e[0m'
|
||||
fi
|
Loading…
Reference in New Issue
Block a user