Skip to content

Commit 52b2a3a

Browse files
committed
putting SDK/HDK 1.1.0 onto master
Change-Id: I816c77732045155356051aa79bc6dbf40704d8f2
1 parent e01a0bd commit 52b2a3a

File tree

882 files changed

+3206347
-531315
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

882 files changed

+3206347
-531315
lines changed

.gitignore

+20-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ INCA_libs
1010
irun.log
1111
irun.key
1212

13-
fpga-local-cmd
13+
fpga-local-cmd*
1414

1515
*_compile.log
1616
*_run.log
@@ -19,6 +19,9 @@ fpga-local-cmd
1919
*.vcd
2020
*.vcdplus*
2121
waves.shm
22+
*.mod.c
23+
*.order
24+
*.symvers
2225

2326
*~
2427
.\#*
@@ -29,6 +32,22 @@ waves.shm
2932
.nfs*
3033
*.so
3134
*.a
35+
*.ko
3236

37+
nohup.out
38+
*.nohup.out
39+
40+
# Shell DCP files are stored in S3 and downloaded by hdk_setup.sh
41+
hdk/common/shell_*/build/checkpoints/from_aws/SH_CL_BB_routed.dcp*
42+
43+
# Generated checkpoints
44+
checkpoints
45+
46+
# Created when building DDR4 models
3347
build.lock
3448
hdk/common/verif/models/.vivado_version
49+
50+
# These get created when you run vivado interactively or batch
51+
vivado_pid*.str
52+
vivado*.jou
53+
vivado*.log

FAQs.md

+27-29
Large diffs are not rendered by default.

README.md

+63-56
Original file line numberDiff line numberDiff line change
@@ -7,99 +7,106 @@
77
- [FPGA Software Development Kit (SDK)](#fpgasdk)
88
- [FPGA Developer AMI available on AWS Marketplace](#devAmi)
99
- [Developer Support](#devSupport)
10-
2. [Quick Start] (#quickstart)
11-
- [Building an example AFI](#buildingAnExample)
12-
- [Using an AFI on EC2 F1 instace](#usingAfi)
13-
- [Starting a new CL](#clExamples)
10+
2. [Building an example AFI](#buildingAnExample)
11+
- [Prerequisites](#buildingafiprereq)
12+
- [Using an AFI on EC2 FPGA Instances](#usingAfi)
1413

15-
# AWS EC2 FPGA Hardware and Software Development Kits <a name="devkit"></a>
14+
<a name="devkit"></a>
15+
# AWS EC2 FPGA Hardware and Software Development Kits
1616

17-
This release includes two portions: [HDK](./hdk) for developing Amazon FPGA Image (AFI), and [SDK](./sdk) for using AFI on FPGA-enabled EC2 instances [such as F1](https://aws.amazon.com/ec2/instance-types/f1/).
17+
This release includes two portions: [HDK](./hdk) for developing Amazon FPGA Image (AFI), and [SDK](./sdk) for using AFIs on FPGA-enabled EC2 instances [such as F1](https://aws.amazon.com/ec2/instance-types/f1/).
1818

19-
Execute `git clone http://github.com/aws/aws-fpga` to download this HDK+SDK release to your EC2 Instance or local server.
20-
For an SSH connection execute `git clone [email protected]:aws/aws-fpga.git`.
19+
Execute `git clone https://github.com/aws/aws-fpga.git` to download this HDK+SDK release to your EC2 Instance or local server.
20+
For an SSH connection execute `git clone [email protected]:aws/aws-fpga.git`. [To get help with connecting to Github via SSH](https://help.github.com/articles/connecting-to-github-with-ssh/)
2121

2222
The [Release Notes](./RELEASE_NOTES.md) document covers the list of supported features, programming environment, and known restrictions.
2323

2424
**NOTE: The HDK and SDK are tested and supported for Linux operating systems, for the time being, other OSs haven't been tested by AWS**
2525

2626
Please click the "Watch" button in GitHub upper right corner to stay posted.
2727

28-
## FPGA HDK <a name="fpgahdk"></a>
28+
<a name="fpgahdk"></a>
29+
## FPGA HDK
2930

30-
The [HDK directory](./hdk) is recommended for developers wanting to start building Amazon FPGA Images (AFI). It includes the development environment, simulation, build and AFI creation scripts. The HDK can be installed on any server or EC2 instance. The HDK is not required if you are using a pre-built AFI and not planning to build your own AFI. The following resources provide further details:
31+
The [HDK directory](./hdk) contains usuful information and scripts for developers wanting to start building Amazon FPGA Images (AFI). It includes the development environment, simulation, build and AFI creation scripts. The HDK can be installed on any on-premises server or an EC2 instance. The HDK is not required if you are using a pre-built AFI and not planning to build your own AFI. The following resources provide further details:
3132

32-
[HDK readme](./hdk/README.md)
33+
[HDK README](./hdk/README.md)
3334

34-
[AWS FPGA Shell Specification](./hdk/docs/AWS_Shell_Interface_Specification.md)
35-
36-
[Developing with OpenCL/SDAccel](./hdk/docs/OpenCL_SDAccel_Development.md)
35+
[AWS FPGA Shell Interface Specification](./hdk/docs/AWS_Shell_Interface_Specification.md)
3736

3837
[FPGA PCIe Address Map](./hdk/docs/AWS_Fpga_Pcie_Memory_Map.md)
39-
4038

41-
## FPGA SDK<a name="fpgasdk"></a>
39+
40+
<a name="fpgasdk"></a>
41+
## FPGA SDK
4242

43-
The [SDK directory](./sdk) includes the runtime environment required to run on F1. It includes the drivers and tools to interact with AFIs that are loaded to EC2 F1 FPGA slots. The SDK is not required during the AFI development process; it is only required once the AFI is loaded onto an F1 instance. The following resources provide further details:
43+
The [SDK directory](./sdk) includes the runtime environment required to run on EC2 FPGA instances. It includes the drivers and tools to manage the AFIs that are loaded to EC2 FPGA instance slots. The SDK isn't required during the AFI development process; it is only required once an AFI is loaded onto an EC2 FPGA instance. The following resources provide further details:
4444

4545
[SDK readme](./sdk/README.md)
4646

47-
[Access FPGA From Linux Applications](./hdk/docs/Programmers_View.md)
47+
[Access FPGA From Linux Applications](./hdk/docs/Programmer_View.md)
4848

49-
[AFI Management Tools](./sdk/management/fpga_image_tools/README.md)
49+
[AFI Management Tools](./sdk/userspace/fpga_mgmt_tools/README.md)
5050

51+
<a name="fpgasdaccel"></a>
52+
## SDAccel - Coming Soon
5153

52-
## FPGA Developer AMI <a name="devAmi"></a>
54+
The [SDAccel directory](./sdk/SDAccel) includes the environment required to run OpenCL/SDAccel flow on EC2 instances. It includes the drivers and tools to interact with AFIs that are loaded to EC2 FPGA instance slots.
5355

54-
AWS recommends the use of the F1 FPGA developer AMI for development on EC2 instances. The FPGA Developer AMI comes with all needed Xilinx's Vivado tools and AWS CLI pre-installed. The HDK examples and quick start can be run on any [C4/M4/R4](https://aws.amazon.com/ec2/instance-types/) EC2 instance. But given the large size of the FPGA used in F1, the implementation tools require a minimum 15GiB Memory while 32GiB is optimal (C4.4XLarge or bigger, M4.2XLarge or bigger, R4.XLarge or bigger). C4.4XLarge and C4.8XLarge would provide the fastest execution time with 30 and 60GiB of memory respectively. To get started, subscribe/launch via AWS Marketplace: https://aws.amazon.com/marketplace/pp/B06VVYBLZZ
56+
[Developing with OpenCL/SDAccel](./hdk/docs/OpenCL_SDAccel_Development.md)
5557

56-
## Developer Support <a name="devSupport"></a>
58+
<a name="devAmi"></a>
59+
## FPGA Developer AMI
5760

58-
[**AWS FPGA Users' Forum**](https://forums.aws.amazon.com/index.jspa): the FPGA development user forum is the first place to go to post questions, suggestions and receive important announcements. To gain access to the user forum, please go to https://forums.aws.amazon.com/index.jspa and login. During the preview, the first time you login, click on "Your Stuff" where you will see your forums username and userID at the end of the URL. Note that in some cases you will need to logout using the logout button on the forums page and log back in to see the "Your Stuff" details. Please email these to [email protected] with "FPGA forum access" in the subject line, in order to receive forum access. To be notified on important messages, posts you will need to click the “Watch Forum” button on the right side of the screen.
61+
AWS Marketplace offers the [FPGA developer AMI](https://aws.amazon.com/marketplace/pp/B06VVYBLZZ) for development on EC2 instances. The FPGA Developer AMI comes with Xilinx tools and AWS CLI pre-installed. The HDK examples and quick start can be run on any [C4/M4/R4/T2.2XLARGE](https://aws.amazon.com/ec2/instance-types/) EC2 instance. Given the large size of the FPGA used in AWS FPGA instances, the implementation tools require 32GiB Memory (C4.4XLarge, M4.2XLarge, R4.XLarge, T2.2XLarge). C4.4XLarge and C4.8XLarge would provide the fastest execution time with 30 and 60GiB of memory respectively.
5962

60-
61-
# Quick Start <a name="quickstart"></a>
63+
<a name="devSupport"></a>
64+
## Developer Support
6265

63-
## Building an Example AFI <a name="buildingAnExample"></a>
66+
The [**Amazon FPGA Development User Forum**](https://forums.aws.amazon.com/forum.jspa?forumID=243&start=0) is the first place to go to post questions, learn from other users and read announcements from the EC2 FPGA team.
6467

65-
By following a few steps, you would have downloaded the HDK, compiled and built one of the example Custom Logic (CL) designs included with the HDK, and registered it with AWS. [Building a Custom Logic (CL) implementation for AWS FPGA instances](./hdk/cl/examples#overview-on-process-for-building-a-custom-logic-cl-implementation-for-aws-fpga-instances)
68+
* To be notified on important messages click on the “Watch Forum” button on the right side of the screen.
69+
* In case you can't see "Your Stuff" details, you will need to logout using the logout button on the forums page and log back in again.
6670

67-
#### Prerequisites
68-
* AWS FPGA HDK and SDK run in Linux environment only.
69-
* If you can not access GitHub repository, please request access permission from your AWS representative.
70-
* The build stage uses Xilinx's Vivado tool set. You should have an installed Vivado and Vivado License Manager (See [Release Notes](./RELEASE_NOTES.md) for details on the version).
71-
* Executing `aws s3 <action>` and `aws ec2 create-fpga-image` require having AWS CLI installed, having an active AWS account, and the server/instance has been configured with your credentials and the same AWS region as your S3 bucket via `aws configure` command line. It’s also required that your instance and the S3 bucket where the tarball reside in will be in the same AWS region.
71+
During the Preview to gain access to the user forum:
72+
73+
* Login to https://forums.aws.amazon.com/index.jspa
74+
* **Note** *the first time you login, click on "Your Stuff" where you will see your forums username and userID at the end of the URL. Email your userID to [email protected] with "FPGA forum access" in the subject line, in order to receive forum access.*
75+
76+
77+
<a name="buildingAnExample"></a>
78+
# Building a Custom Logic AFI for AWS FPGA Instances
79+
80+
Developers can build their own Custom Logic (CL) and deploy it on AWS.
81+
The CL must comply with the [AWS Shell Interface Specifications](./hdk/docs/AWS_Shell_Interface_Specification.md), and pass through the build scripts.
7282

83+
The [CL Examples directory](./hdk/cl/examples) is provided to assist developers in creating a functional CL implementation. Each example includes:
7384

74-
```
75-
$ git clone https://github.com/aws/aws-fpga # Step 1: Download the HDK and SDK code
76-
$ cd aws-fpga # Step 2: Move to the root directory
77-
$ source hdk_setup.sh # Step 3: Set up the HDK environment variables
78-
$ cd hdk/cl/examples/cl_simple # Step 4: Change directory to one of the provided examples
79-
$ export CL_DIR=$(pwd) # Step 5: Define this directory as the root for the CL design
80-
$ cd build/scripts # Step 6: The build directory for synthesizing, placement, timing etc
81-
$ source aws_build_dcp_from_cl.sh # Step 7: Generate a placed-and-routed design checkpoint (DCP)
82-
$ cd $CL_DIR/build/checkpoints/to_aws # Step 8: This directory includes the DCP file
83-
$ aws s3 mb s3://<bucket-name> # Step 9: Create an S3 bucket (choose a unique bucket name)
84-
$ aws s3 cp *.Developer_CL.tar \ # Step 10: Upload the file to S3
85-
s3://<bucket-name>/
86-
$ aws ec2 create-fpga-image \ # Step 11: Ingest the generated DCP to create an AFI
87-
--shell-version 0x11241611 \
88-
--fpga-pci-id DeviceId=0x1d50,VendorId=0x6789,SubsystemId=0x1d51,SubsystemVendorId=0xfedc \
89-
--input-storage-location Bucket=<bucket-name>,Key=<tarball-name> \
90-
--name MyFirstDCP \
91-
--logs-storage-location Bucket=<bucket-name>,Key=logs/
92-
```
93-
**NOTE**: The DCP generation (`Step 7` above) can take up to several hours to complete. We recommend to initiate the generation in a way that prevents interruption. For example, if working on a remote machine, we recommend using window management tools such as [`screen`](https://www.gnu.org/software/screen/manual/screen.html) to mitigate potential network disconnects.
85+
1. The source code for the example under the `/design` directory.
86+
2. The timing, clock and placement constraints files, scripts for compiling the example design. (This requires running in an instance/server that have Xilinx tools and license installed. Developers are recommended to use the FPGA Development AMI available free of charge on [AWS Marketplace](#devAmi)).
87+
3. The final build, called Design Checkpoint (DCP) that can be submitted for AWS to generate the AFI.
88+
4. An AFI-ID for a pre-generated AFI that matches the example design.
89+
5. Software source code required on the FPGA-enabled instance to run the example.
90+
6. Software binary that can be loaded on an FPGA-enabled instance to test the AFI.
9491

92+
In summary:
9593

96-
## Using an AFI on EC2 F1<a name="usingAfi"></a>
94+
- An AFI can be created using the files in #1, #2, and #3. The AFI creation can take place on any EC2 instance or on-premises.
95+
- The AFI can be used in an EC2 F1 instance by using the files in #4, #5 and #6.
9796

98-
Now that you have built an AFI, or if you want to use one of the example pre-built AFIs provided by AWS, you need to launch an EC2 F1 Instance, and install the SDK as detailed at: [SDK Quick Start](./sdk/README.md)
97+
By following the example CLs, a developer will learn how to interface to the AWS Shell of the FPGA, compile the source code to create an AFI, and load/run an AFI from the F1 instance for use.
9998

99+
<a name="buildingafiprereq"></a>
100+
### Prerequisites
101+
* AWS FPGA HDK and SDK run in Linux environment only.
102+
* During the F1 Preview preiod, if you can not access GitHub repository, please request access permission from your AWS representative.
103+
* The build stage uses Xilinx's Vivado tool set. In case you build on-premises you should have an installed Vivado that has the correct license. Please check for [supported versions of Vivado](./hdk/supported_vivado_versions.txt). [Release Notes](./RELEASE_NOTES.md) may contain additional information.
104+
* Executing `aws s3 <action>` and `aws ec2 create-fpga-image` require having AWS CLI installed, having an active AWS account, and the server/instance has been configured with your credentials and the same AWS region as your S3 bucket via `aws configure` command line. It’s also required that your instance and the S3 bucket where the tarball reside in will be in the same AWS region. Please refer to [AWS documentation for help with configuring the AWS CLI.](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html)
100105

106+
The [Getting started with CL examples](./hdk/cl/examples/README.md) guide provides step-by-step instructions to build an AFI from one of the provided examples, register it with AWS, and load it on an EC2 FPGA instance.
101107

102-
## Need to build a new Custom Logic and register it as an AFI?<a name="clExamples"></a>
108+
<a name="usingAfi"></a>
109+
## Using an AFI on EC2 FPGA Instances
110+
Now that you have built an AFI, or if you want to use one of the example pre-built AFIs provided by AWS, you need to launch an EC2 FGPA Instance, and install the SDK as detailed at: [SDK Quick Start](./sdk/README.md)
103111

104-
The [Getting started with CL examples](./hdk/cl/examples/README.md) guide provides step-by-step instructions to build an AFI from one of the provided examples, register it with AWS, and load it on an EC2 F1 instance.
105112

0 commit comments

Comments
 (0)