Skip to content
Snippets Groups Projects
Commit 978907f9 authored by Federico Vaga's avatar Federico Vaga Committed by Adam Wujek
Browse files

userspace:startup: verify that the FPGA bitstream has been programmed


Signed-off-by: default avatarFederico Vaga <federico.vaga@cern.ch>
parent 3d9f88f7
Branches
Tags
No related merge requests found
......@@ -57,6 +57,20 @@ else
echo "load_error" > $LOAD_FPGA_STATUS_FILE
fi
# At this offset there is an ID. Just check that it's there as a
# small proof that we correctly programmed the FPGA
CHK_ADDR=0x10030034
CHK_EXP=0xcafebabe
CHK_VAL=$(devmem $CHK_ADDR | tr '[:upper:]' '[:lower:]')
if [ $CHK_VAL != $CHK_EXP ]
then
echo "The bitstream $FP_FILE is not correct or there something is not working with the FPGA"
echo "Expected: [$CHK_ADDR] = $CHK_EXP"
echo "Current: [$CHK_ADDR] = $CHK_VAL"
echo "LM32 program and drivers for the bitstream components will not be loaded"
exit
fi
$WR_HOME/bin/load-lm32 $LM_FILE scb_ver=${scb_ver}
if [ $? -eq 0 ];
then
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment