aws / aws-fpga

Official repository of the AWS EC2 FPGA Hardware and Software Development Kit
Other
1.51k stars 514 forks source link

Python test cases are not working in my AWS FPGA f1 large instance #479

Closed LinusLogicsTechnologies closed 4 years ago

LinusLogicsTechnologies commented 4 years ago

step1: git clone https://github.com/aws/aws-fpga.git $AWS_FPGA_REPO_DIR step2: cd $AWS_FPGA_REPO_DIR step3: source hdk_setup.sh step4: source sdk_setup.sh step5: sudo fpga-describe-local-image -S 0 -H step6: sudo fpga-load-local-image -S 0 -I agfi-088bffb3ab91ca2d1 (#agfi-088.. is the unique name for the hello world project generated by amazon in shell version 0x04261818 ) step7: sudo fpga-describe-local-image -S 0 -R -H I wnat to use fpga PCIe function using python But How can i get this information class FPGAFuncs(object): def init(self): self.slot = int(os.environ['BSWAPPER_SLOT'], 0) self.AFI = os.environ['BSWAPPER_AFI'].encode('utf-8') self.register = int(os.environ['BSWAPPER_REG'], 0) logger.info("Slot to be loaded: {}\nAFI: {}\nregister: 0x{:x}".format(self.slot, self.AFI, self.register)) fpga_mgmt.fpga_mgmt_init()

deeppat commented 4 years ago

@LinusLogics, the test app has an example of using the pci functions: https://github.com/aws/aws-fpga/blob/master/sdk/apps/byte_swapper/fpga_funcs.py

Are you having issues running the flask app?