Skip to content

Commit 4757608

Browse files
authored
Merge pull request #363 from aws/RC_v1_3_3
merge Rc v1 3 3
2 parents 7d2e50c + 39da961 commit 4757608

13 files changed

+380
-19929
lines changed

FAQs.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,22 +104,39 @@ It is the compiled FPGA code that is loaded into an FPGA in AWS for performing t
104104

105105
The developer can create multiple AFIs at no extra cost, up to a defined limited (typically 100 AFIs per region per AWS account). An AFI can be loaded into as many FPGAs as needed.
106106

107+
107108
**Q: What regions are supported?**
108109

109110
AWS FPGA generation and EC2 F1 instances are supported in us-east-1 (N. Virginia), us-west-2 (Oregon) and ue-west-1 (Ireland).
110111

112+
111113
**Q: What is the process for creating an AFI?**
112114

113115
The AFI process starts by creating Custom Logic (CL) code that conforms to the [Shell Specification]((./hdk/docs/AWS_Shell_Interface_Specification.md). Then, the CL must be compiled using the HDK scripts which leverages Vivado tools to create a Design Checkpoint (DCP). That DCP is submitted to AWS for generating an AFI using the `aws ec2 create-fpga-image` API.
114116

115117
Use the AWS CLI `describe-fpga-images` API to get information about the created AFIs using the AFI ID provided by `create-fpga-image`, or to list available AFIs for your account. See [describe-fpga-images](./hdk/docs/describe_fpga_images.md) document for details on how to use this API.
116118

119+
117120
**Q: Can I load an AFI on every region AWS FPGA is supported?**
118121

119122
Yes, but you must first copy the AFI using the [copy-fpga-image](./hdk/docs/copy_fpga_image.md) API. You should generate AFIs in one region and use copy to make them available in other regions. Copy preserves the Global AFI ID used to load an AFI on a EC2 instance.
120123

121124
Use [describe-fpga-images](./hdk/docs/describe_fpga_images.md) with the [--region command line option](http://docs.aws.amazon.com/cli/latest/userguide/cli-command-line.html) to list AFIs available in a specific region. Use `FpgaImageGlobalId` attribute and `fpga-image-global-id` filter to match AFI copies accross regions.
122125

126+
**Q: Can I share an AFI with other AWS accounts?**
127+
128+
Yes, sharing allows accounts other than the owner account to load and use an AFI. Use [modify-fpga-image-attribute](./hdk/docs/fpga_image_attributes.md) API to update `loadPermission` attribute to grant/remove AFI load permission. AWS AFIs support two load permission types:
129+
* `UserId`: share AFI with specific AWS accounts using account IDs.
130+
* `UserGroups`: only supports `all` group to make an AFI public or private.
131+
132+
Use [reset-fpga-image-attribute](./hdk/docs/fpga_image_attributes.md) API to revoke all load permissions.
133+
134+
**Q: Can I delete an AFI?**
135+
136+
Yes, use [delete-fpga-image](./hdk/docs/delete_fpga_image.md) to delete an AFI in a specific region. Deleting an AFI in one region does not affect AFIs in other regions.
137+
138+
Use [delete-fpga-image](./hdk/docs/delete_fpga_image.md) carefully. Once all AFIs of the same global AFI ID are deleted, the AFIs cannot be recovered from deletion. Review [IAM policy best practices](http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege) to resrict access to this API.
139+
123140
**Q: Can I bring my own bitstream for loading on an F1 FPGA?**
124141

125142
No. There is no mechanism for loading a bitstream directly onto the FPGAs of an F1 instance. All Custom Logic is loaded onto the FPGA by calling `$ fpga-local-load-image` tool at [AWS FPGA SDK](https://github.com/aws/aws-fpga/sdk).
@@ -211,6 +228,19 @@ To be able to manage and monitor the F1 FPGAs it is required to install the [FPG
211228

212229
Typically, you will not need the HDK nor any Xilinx Vivado tools on an F1 instance that is using prebuilt AFIs; unless, you want to do in-field debug using Vivado's ChipScope (Virtual JTAG).
213230

231+
**Q: How do I update the AWS CLI to use the latest EC2 commands to manage my AFI's?**
232+
233+
On the FPGA Developer AMI, you can update your AWS CLI for all users using the command:
234+
```
235+
sudo pip install awscli --upgrade
236+
```
237+
238+
If You want to upgrade the AWS CLI for just your user, you can run the following:
239+
```
240+
pip install awscli --upgrade --user
241+
```
242+
The AWS CLI [documentation page](http://docs.aws.amazon.com/cli/latest/userguide/installing.html) shows steps to update the AWS CLI.
243+
We recommend using the latest available version to be able to use the expanding list of commands that we add.
214244

215245
## Marketplace
216246
**Q: What does publishing my AFI/AMI to AWS Marketplace enables?**
@@ -404,4 +434,18 @@ elapsed = 00:08:59 . Memory (MB): peak = 4032.184 ; gain = 3031.297 ; free physi
404434
/opt/Xilinx/Vivado/2016.3/bin/loader: line 164: 8160 Killed "$RDI_PROG" "$@"
405435
Parent process (pid 8160) has died. This helper process will now exit
406436

437+
**Q: Why am I getting an error: `A valid license was not found for feature 'XYZ' and/or device 'XYZ'` from Xilinx Vivado while trying to build by dcp/running my examples?**
438+
439+
*For On Premise runs:*
440+
441+
You would need a valid [on premise license](./hdk/docs/on_premise_licensing_help.md) provided by Xilinx.
442+
443+
*For runs using the FPGA Developer AMI:*
444+
445+
**NOTE:**
446+
> * The license included on FPGA Developer AMI Versions 1.3.0_a and earlier expires on October 31 2017.
447+
> * If you see the above error, please update to FPGA Developer AMI Version 1.3.3 or later.
448+
> * All FPGA Developer AMI Versions 1.3.0_a and earlier will be deprecated once Version 1.3.3 is released.
407449
450+
* If you are using the FPGA Developer AMI Version 1.3.3 or later, please check if the environment variable `XILINXD_LICENSE_FILE` is set to `/opt/Xilinx/license/XilinxAWS.lic`
451+
* If you still face the above error, please contact us on the forums and we'd be happy to help further.

RELEASE_NOTES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
* 1 DDR controller implemented in the SH (always available)
2727
* 3 DDR controllers implemented in the CL (configurable number of implemented controllers allowed)
2828

29+
## Release 1.3.3 (See [ERRATA](./ERRATA.md) for unsupported features)
30+
* New FPGA Image APIs for deleteing and reading/editing attributes
31+
2932
## Release 1.3.2 (See [ERRATA](./ERRATA.md) for unsupported features)
3033
* SDAccel general availability
3134

hdk/cl/examples/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ You need to prepare the following information:
8686
2. Generic description of the logic design *(Optional)*.
8787
3. Location of the tarball file object in S3.
8888
4. Location of an S3 directory where AWS would write back logs of the AFI creation.
89-
5. AWS region where the AFI will be created. Use [copy-fpga-image](../../docs/copy-fpga-images.md) API if you need to load an AFI on a different region.
89+
5. AWS region where the AFI will be created. Use [copy-fpga-image](../../docs/copy_fpga_image.md) API to copy an AFI to a different region.
9090

9191
To upload your tarball file to S3, you can use any of [the tools supported by S3](http://docs.aws.amazon.com/AmazonS3/latest/dev/UploadingObjects.html)).
9292
For example, you can use the AWS CLI as follows:
@@ -154,7 +154,7 @@ After the AFI generation is complete, AWS will put the logs into the bucket loca
154154
**NOTE**: *Attempting to load the AFI immediately on an instance will result in an `Invalid AFI ID` error.
155155
Please wait until you confirm the AFI is created successfully.*
156156

157-
The [copy-fpga-image](../../docs/copy-fpga-images.md) API allows you copy AFIs to other regions and avoid the time consuming `create-fpga-image` process. Copy will also preserve the source Global AFI ID and minimize region-specific changes to your instance code or scripts.
157+
The [copy-fpga-image](../../docs/copy_fpga_image.md) API allows you to copy the AFI to other regions and avoid the time consuming `create-fpga-image` process. Copy will also preserve the source Global AFI ID and minimize region-specific changes to your instance code or scripts.
158158

159159
## Step by step guide how to load and test a registered AFI from within an F1 instance
160160

hdk/common/verif/include/sh_dpi_tasks.svh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ end
393393
input logic [5:0] id = 6'h0);
394394
logic [63:0] tmp;
395395
`SLOT_MACRO_TASK(peek(.addr(addr), .data(tmp), .id(id), .size(DataSize::UINT32), .intf(AxiPort::PORT_OCL)))
396-
data = tmp[31:0];
396+
data = {32'h0, tmp[31:0]};
397397
endtask
398398

399399
//=================================================
@@ -431,7 +431,7 @@ end
431431
input logic [5:0] id = 6'h0);
432432
logic [63:0] tmp;
433433
`SLOT_MACRO_TASK(peek(.addr(addr), .data(data), .id(id), .size(DataSize::UINT32), .intf(AxiPort::PORT_SDA)))
434-
data = tmp[31:0];
434+
data = {32'h0, tmp[31:0]};
435435
endtask
436436

437437
//=================================================
@@ -467,9 +467,9 @@ end
467467
logic [63:0] addr,
468468
output logic [63:0] data,
469469
input logic [5:0] id = 6'h0);
470-
logic [63:0] tmp;
471-
`SLOT_MACRO_TASK(peek(.addr(addr), .data(data), .id(id), .size(DataSize::UINT32), .intf(AxiPort::PORT_BAR1)))
472-
data = tmp[31:0];
470+
logic [63:0] tmp;
471+
`SLOT_MACRO_TASK(peek(.addr(addr), .data(data), .id(id), .size(DataSize::UINT32), .intf(AxiPort::PORT_BAR1)))
472+
data = {32'h0, tmp[31:0]};
473473
endtask
474474

475475
function bit is_dma_to_cl_done(input int slot_id = 0, input int chan);

hdk/docs/Virtual_JTAG_XVC.md

Lines changed: 80 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88

99
3. [Enabling Debug on FPGA-enabled EC2 Instance, using XVC](#startVJtag)
1010

11-
4. [Connecting Xilinx Hardware Manager(Vivado Lab Edition) to the Debug Target FPGA-enabled EC2 Instance](#connectToTarget)
11+
4. [Connecting Xilinx Hardware Manager(Vivado Lab Edition) running on local F1 instance to the Debug Target FPGA-enabled EC2 Instance](#connectToTargetLocally)
1212

13-
5. [Frequently Asked Questions](#faq)
13+
5. [Connecting Xilinx Hardware Manager(Vivado Lab Edition) running on remote machine to the Debug Target FPGA-enabled EC2 Instance](#connectToTargetRemotely)
14+
15+
6. [Frequently Asked Questions](#faq)
1416

1517

1618

@@ -88,10 +90,12 @@ You could call `sudo fpga-start-virtual-jtag -?` for further details on the avai
8890

8991

9092

91-
<a name="connectToTarget"></a>
92-
# Connecting Xilinx Hardware Manager (Vivado Lab Edition) to the Debug Target FPGA-enabled EC2 Instance
93+
<a name="connectToTargetLocally"></a>
94+
# Connecting Xilinx Hardware Manager (Vivado Lab Edition) running on local F1 instance to the Debug Target FPGA-enabled EC2 Instance
95+
96+
Xilinx Hardware Manager (Vivado Lab Edition) running on the target instance (i.e. the F1 itself). The TCP port on which the Virtual JTAG XVC Server is listening must be accessible to the host running Xilinx Hardware Management (See [FAQ](#faq) for configuring Linux firewall and AWS EC2 Network Security Groups).
9397

94-
Xilinx Hardware Manager (Vivado Lab Edition) running on the target instance (i.e. the F1 itself) or it can be running remotely on a different host. The TCP port on which the Virtual JTAG XVC Server is listening must be accessible to the host running Xilinx Hardware Management (See [FAQ](#faq) for configuring Linux firewall and AWS EC2 Network Security Groups).
98+
<img src="./images/Virtual_JTAG_XVC_Server_F1_instance.jpg" width="600">
9599

96100
To connect the debug Xilinx Hardware Manager to Virtual JTAG XVC server on the target, the following should be called on the machine hosting Vivado:
97101

@@ -120,7 +124,7 @@ To connect the debug Xilinx Hardware Manager to Virtual JTAG XVC server on the t
120124

121125
**NOTES:**
122126

123-
- If you are running Vivado's Lab Edition on the same instance as the target instance, use IP address 127.0.0.1, which is the localhost.
127+
- Since you are running Vivado's Lab Edition on the same instance as the target instance, use IP address 127.0.0.1, which is the localhost.
124128

125129
- If the above command fails, its most likely that either the virtual jtag server is not running, the IP/Port are wrong, or a firewall/security-group rule is blocking the connection. See the [FAQ](#faq) section in the end of this document.
126130

@@ -147,7 +151,72 @@ Vivado can now be used to debug your design: the next figure shows how a CL desi
147151
The connection Vivado and the target instance can be terminated by closing the XVC server from Vivado using the right click menu. If the target FPGA PCIe connection is lost, a new AFI is loaded or the Virtual JTAG Server application stops running, the connection to the FPGA and associated debug cores will also be lost.
148152

149153
**NOTE:** Xilinx Hardware Manager (Vivado Lab Edition) should not be connected to the target Virtual JTAG XVC Server when the AFI is not in READY state. If the AFI going to go through `fpga-clear-image` or `fpga-load-local-image`, Vivado should be disconnected, and the Virtual JTAG XVC Server should be terminated by killing the process the runs the JTAG XVC Server.
154+
155+
156+
<a name="connectToTargetRemotely"></a>
157+
# Connecting Xilinx Hardware Manager (Vivado Lab Edition) running on a remote machine to the Debug Target FPGA-enabled EC2 Instance
158+
159+
<img src="./images/Virtual_JTAG_XVC_Server_remote_instance.jpg" width="600">
160+
161+
162+
Xilinx Hardware Manager (Vivado Lab Edition) running on a remote machine. The TCP port on which the hw_server and the Virtual JTAG XVC Server is listening must be accessible to the host running Xilinx Hardware Management (See [FAQ](#faq) for configuring Linux firewall and AWS EC2 Network Security Groups).
163+
Note: Running the hw_server locally on the F1 instance ensures superior performance between Vivado running on the remote machine to connect and debug the design running on the F1 instance.
164+
165+
To connect the debug Xilinx Hardware Manager to Virtual JTAG XVC server on the target, the following should be called on the machine hosting Vivado:
166+
167+
1) Launch Vivado Lab Edition (or full featured Vivado)
168+
169+
2) Select “Open HW Manager” as shown in the next figure:
170+
171+
172+
<img src="./images/Open_HW_Manager.jpg" width="600">
150173

174+
175+
176+
177+
3) Start Vivado hw_server using the following command in Vivado's .tcl console
178+
179+
`> connect_hw_server -url <hostname or IP address>:3121`
180+
181+
182+
<img src="./images/connect_hw_server.jpg" width="600">
183+
184+
185+
186+
187+
188+
4) Connect to the target instance Virtual JTAG XVC server using the following command in Vivado's tcl console.
189+
190+
`> open_hw_target -xvc_url <hostname or IP address>:10201`
191+
192+
**NOTES:**
193+
194+
- If the above command fails, its most likely that either the virtual jtag server is not running, the IP/Port are wrong, or a firewall/security-group rule is blocking the connection. See the [FAQ](#faq) section in the end of this document.
195+
196+
197+
Upon successful connection, Vivado's Hardware panel will be populated with a debug bridge instance.
198+
199+
5) Select the debug bridge instance from the Vivado Hardware panel
200+
201+
6) You will need a "Probes file" in the next step. A "Probes file" with an ".ltx" extension is generated during the build process and written to the checkpoints directory.
202+
203+
7) In the Hardware Device Properties window select the appropriate “Probes file” for your design by clicking the icon next to the “Probes file” entry, selecting the file, and clicking “OK”. This will refresh the hardware device and it should now show the debug cores present in your design. Note the Probes file is written out during the design implementation, and is typically has the extension ".ltx".
204+
205+
<img src="./images/select_probes_file.jpg" width="600">
206+
207+
208+
209+
210+
Vivado can now be used to debug your design: the next figure shows how a CL design with two ILAs and one VIO would look in Vivado Lab Edition Hardware Manager, once the steps 1-6 mentioned earlier are followed
211+
212+
<img src="./images/cl_vio_ila_screen.jpg">
213+
214+
## Other considerations
215+
216+
The connection Vivado and the target instance can be terminated by closing the XVC server from Vivado using the right click menu. If the target FPGA PCIe connection is lost, a new AFI is loaded or the Virtual JTAG Server application stops running, the connection to the FPGA and associated debug cores will also be lost.
217+
218+
**NOTE:** Xilinx Hardware Manager (Vivado Lab Edition) should not be connected to the target Virtual JTAG XVC Server when the AFI is not in READY state. If the AFI going to go through `fpga-clear-image` or `fpga-load-local-image`, Vivado should be disconnected, and the Virtual JTAG XVC Server should be terminated by killing the process the runs the JTAG XVC Server.
219+
151220

152221
<a name="faq"></a>
153222
# Frequently Asked Questions
@@ -164,6 +233,8 @@ No, you may run Vivado on a "remote" host as long as your instance/VPC has the r
164233

165234
**Q: Can I have a secure connection (i.e. SSL/TLS) to the target FPGA-enable EC2 Instance running Virtual JTAG service?**
166235

236+
You may use the ssh "port forwarding" option (-L) to forward connections from the F1 instance via the SSH client, then to a destination server. You can now use this destination server in the Vivado Hardware Manager running on a remote machine to connect to the hw_server and Virtual JTAG server running on the F1 instance.
237+
167238

168239
**Q: Do I need a Vivado license to use Virtual JTAG and Xilinx' VIO / LIA debug capabilities?**
169240

@@ -182,6 +253,8 @@ Yes, you must start the the `$ fpga-start-virtual-jtag` with a different Slot/P
182253

183254
**Q: What are some of the best practices I should be aware when working with Virtual JTAG?**
184255

256+
If you are running Vivado on a remote machine trying to connect to Virtual JTAG - we recommend running the hw_server on the F1 instance - to ensure optimal performance between Vivado and the Virtual JTAG server.
257+
185258

186259
**Q: Can other instances running on the same F1 server access the Virtual JTAG of my instance?**
187260

@@ -203,4 +276,4 @@ This could mean there is already a server running with thtat TCP port. Either f
203276

204277
Xilinc Virtual Cable (XVC) is a protocol for transferring JTAG commands over TCP/IP network connection between a debug tool (like Vivado Lab Edition Hardware Manager) and a debug target.
205278

206-
The full specification for XVC version 1.0 is available [here](https://github.com/Xilinx/XilinxVirtualCable/blob/master/README.md).
279+
More information including a link to the full specification for XVC version 1.0 is available [here](https://www.xilinx.com/products/intellectual-property/xvc.html).

hdk/docs/copy_fpga_image.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@ To allow copies, the source AFI must meet the following requirements:
99
* AFI must be owned by caller. Access to an AFI does not grant sufficient permissions to copy it.
1010
* AFI must be in `available` state. Copy is not allowed if source AFI is in `pending`, `failed` or `unavailable` states.
1111

12-
## Load preview AWS cli model
13-
14-
`copy-fpga-image` is currently a preview API available after loading the preview json model included in the SDK:
15-
```
16-
$ aws configure add-model --service-name ec2 --service-model file://./sdk/aws-cli-preview/ec2_copy-fpga-image.json
17-
```
18-
1912
## Example usage
2013

2114
* Show command manual page:

0 commit comments

Comments
 (0)