From 3dc9aad75670cee59ba23e08901ff2b706fc37bc Mon Sep 17 00:00:00 2001 From: Steven Koo Date: Thu, 16 Jun 2022 13:39:13 -0500 Subject: ci: streaming: flash x310 fpga This uses openFPGALoader to flash the fpga before running the test. This tool is needed because uhd_image_loader only updates the flash for x3xx, which requires a hard power cycle to commit. This openFPGALoader directly updates the fpga SRAM. Signed-off-by: Steven Koo --- .ci/templates/job-uhd-streaming-tests-beauty.yml | 1 + .ci/templates/job-uhd-streaming-tests.yml | 12 ++++++++++++ 2 files changed, 13 insertions(+) (limited to '.ci') diff --git a/.ci/templates/job-uhd-streaming-tests-beauty.yml b/.ci/templates/job-uhd-streaming-tests-beauty.yml index 1a5de8381..9c6f17f87 100644 --- a/.ci/templates/job-uhd-streaming-tests-beauty.yml +++ b/.ci/templates/job-uhd-streaming-tests-beauty.yml @@ -42,6 +42,7 @@ jobs: dutNameId: '' dutNumRecvFrames: '' dutNumSendFrames: '' + jtagSerial: '251635138E94' # beauty-X410-0 X4_200: # dutName: 'beauty-X410-0' # dutType: 'x4xx' diff --git a/.ci/templates/job-uhd-streaming-tests.yml b/.ci/templates/job-uhd-streaming-tests.yml index bcce368d5..912551b7c 100644 --- a/.ci/templates/job-uhd-streaming-tests.yml +++ b/.ci/templates/job-uhd-streaming-tests.yml @@ -138,6 +138,18 @@ jobs: $(Build.BinariesDirectory)/uhddev/build-installed/bin/uhd_images_downloader -t b210 -t fpga displayName: Download B210 images condition: and(succeeded(), eq(variables.dutType, 'B210')) + + - script: | + export UHD_IMAGES_DIR=$(Build.BinariesDirectory)/uhddev/build-installed/share/uhd/images + $(Build.BinariesDirectory)/uhddev/build-installed/bin/uhd_images_downloader -t x310 + openFPGALoader -c digilent --ftdi-serial $(jtagSerial) --ftdi-channel 0 $UHD_IMAGES_DIR/usrp_x310_fpga_$(dutFPGA).bit + EXITCODE=$? + echo "Waiting for device to boot" + sleep 30 + exit $EXITCODE + displayName: Download and update X310 fpga + condition: and(succeeded(), eq(variables.dutType, 'X310')) + - script: | ssh-keygen -f ~/.ssh/known_hosts -R $USRP_EMB_TARGET_IP ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "ethtool -A sfp0 tx on" -- cgit v1.2.3