Skip to content

Commit 806c0f0

Browse files
committed
v1.2.4 release
1 parent 8de6a39 commit 806c0f0

File tree

8 files changed

+258
-16
lines changed

8 files changed

+258
-16
lines changed

FAQs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ The developer can create multiple AFIs at no extra cost, up to a defined limited
112112

113113
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.
114114

115-
115+
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.
116116

117117
**Q: Can I bring my own bitstream for loading on an F1 FPGA?**
118118

@@ -128,7 +128,7 @@ Yes, on-premises tools can be used to develop the Design Checkpoint needed for c
128128
If a developer uses local tools and license, please check the [supported versions of Vivado](./hdk/supported_vivado_versions.txt) for the exact Xilinx Vivado tool version supported by the HDK. Developers have access to Xilinx Vivado running in the AWS by using the [FPGA Developer AMI on AWS Marketplace](https://aws.amazon.com/marketplace/pp/B06VVYBLZZ)
129129

130130

131-
**Q: Is there a “best practice” system template? **
131+
**Q: Is there a “best practice” system template?**
132132

133133
AWS prefers not to limit developers to a specific template in terms of how we advise to use AWS FPGAs. A good overview of these interfaces can be found [here](https://github.com/aws/aws-fpga/blob/master/hdk/docs/Programmer_View.md)
134134

@@ -384,7 +384,7 @@ The Shell consumes about 20% of the FPGA resources, and that includes the PCIe G
384384

385385

386386
## Troubleshooting
387-
**Q: Why do I see error “vivado not found” while running hdk_setup.sh*?**
387+
**Q: Why do I see error “vivado not found” while running hdk_setup.sh?**
388388

389389
This is an indication that Xilinx Vivado tool set are not installed. Try installing the tool if you are working on your own environment, or alternative use AWS FPGA Development AMI available on AWS Marketplace, which comes with pre-installed Vivado toolset and license.
390390

RELEASE_NOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ See [Errata](./ERRATA.md) for additional documentation of unsupported features a
2727
* 1 DDR controller implemented in the SH (always available)
2828
* 3 DDR controllers implemented in the CL (configurable number of implemented controllers allowed)
2929

30+
# Release 1.2.4
31+
* AWS SDK API `aws ec2 describe-fpga-images` released. See [describe-fpga-images](./hdk/docs/describe_fpga_images.md) document for details on how to use this API.
32+
* Fix cl_dram_dam debug probes (.ltx) generation in build scripts
33+
* Fixed bugs with DMA in the simulation model and testbench
34+
3035
# Release 1.2.3
3136
* New [Errata](./ERRATA.md)
3237
* Added debug probes (.ltx) generation to build scripts

hdk/cl/examples/README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,35 @@ Once your policy passes the checks, your ready to start AFI creation.
170170
The output of this command includes two identifiers that refer to your AFI:
171171
- **FPGA Image Identifier** or **AFI ID**: this is the main ID used to manage your AFI through the AWS EC2 CLI commands and AWS SDK APIs.
172172
This ID is regional, i.e., if an AFI is copied across multiple regions, it will have a different unique AFI ID in each region.
173-
An example AFI ID is **`agfi-0f0e045f919413242`**.
173+
An example AFI ID is **`afi-06d0ffc989feeea2a`**.
174174
- **Glogal FPGA Image Identifier** or **AGFI ID**: this is a global ID that is used to refer to an AFI from within an F1 instance.
175175
For example, to load or clear an AFI from an FPGA slot, you use the AGFI ID.
176176
Since the AGFI IDs is global (by design), it allows you to copy a combination of AFI/AMI to multiple regions, and they will work without requiring any extra setup.
177177
An example AGFI ID is **`agfi-0f0e045f919413242`**.
178178

179+
The [describe-fpga-images](../../docs/describe_fpga_images.md) API allows you to check the AFI state during the background AFI generation process. You must provide the **FPGA Image Identifier** returned by `create-fpga-image`:
180+
```
181+
$ aws ec2 describe-fpga-images --fpga-image-ids afi-06d0ffc989feeea2a
182+
```
183+
184+
The AFI can only be loaded to an instance once the AFI generation completes and the AFI state is set to `available`:
185+
```
186+
{
187+
"FpgaImages": [
188+
{
189+
...
190+
"State": {
191+
"Code": "available"
192+
},
193+
...
194+
"FpgaImageId": "afi-06d0ffc989feeea2a",
195+
...
196+
}
197+
]
198+
}
199+
200+
```
201+
179202
After the AFI generation is complete, AWS will put the logs into the bucket location (```s3://<bucket-name>/<logs-folder-name>```) provided by the developer. The presence of these logs is an indication that the creation process is complete. Please look for either a “State” file indicating the state of the AFI (e.g., available or failed), or the Vivado logs detailing errors encountered during the creation process. For help with AFI creation issues, see [create-fpga-image error codes](../../docs/create_fpga_image_error_codes.md)
180203

181204

hdk/cl/examples/cl_dram_dma/build/scripts/create_dcp_from_cl.tcl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ write_checkpoint -force $CL_DIR/build/checkpoints/${timestamp}.CL.post_synth.dcp
352352
write_debug_probes -force -no_partial_ltxfile -file $CL_DIR/build/checkpoints/${timestamp}.debug_probes.ltx
353353

354354
close_project
355+
355356
#Set param back to default value
356357
set_param sta.enableAutoGenClkNamePersistence 1
357358

@@ -585,6 +586,10 @@ report_timing_summary -file $CL_DIR/build/reports/${timestamp}.SH_CL_final_timin
585586
puts "AWS FPGA: ([clock format [clock seconds] -format %T]) writing final DCP to to_aws directory.";
586587

587588
write_checkpoint -force $CL_DIR/build/checkpoints/to_aws/${timestamp}.SH_CL_routed.dcp
589+
590+
# Generate debug probes file
591+
write_debug_probes -force -no_partial_ltxfile -file $CL_DIR/build/checkpoints/${timestamp}.debug_probes.ltx
592+
588593
close_project
589594

590595
# ################################################

hdk/cl/examples/cl_dram_dma/verif/tests/test_dram_dma.sv

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,6 @@ module test_dram_dma();
117117

118118
$display("[%t] : starting C2H DMA channels ", $realtime);
119119

120-
//Start transfers of data from CL DDR
121-
tb.start_que_to_buffer(.chan(0));
122-
tb.start_que_to_buffer(.chan(1));
123-
tb.start_que_to_buffer(.chan(2));
124-
tb.start_que_to_buffer(.chan(3));
125-
126120
// read the data from cl and put it in the host memory
127121
host_memory_buffer_address = 64'h0_0001_0800;
128122
tb.que_cl_to_buffer(.chan(0), .dst_addr(host_memory_buffer_address), .cl_addr(64'h0000_0000_0002), .len(len0) ); // move DDR0 to buffer
@@ -136,6 +130,12 @@ module test_dram_dma();
136130
host_memory_buffer_address = 64'h0_0004_3800;
137131
tb.que_cl_to_buffer(.chan(3), .dst_addr(host_memory_buffer_address), .cl_addr(64'h0000_3000_0000), .len(len3) ); // move DDR3 to buffer
138132

133+
//Start transfers of data from CL DDR
134+
tb.start_que_to_buffer(.chan(0));
135+
tb.start_que_to_buffer(.chan(1));
136+
tb.start_que_to_buffer(.chan(2));
137+
tb.start_que_to_buffer(.chan(3));
138+
139139
// wait for dma transfers to complete
140140
timeout_count = 0;
141141
do begin
@@ -152,7 +152,8 @@ module test_dram_dma();
152152
error_count++;
153153
end
154154

155-
155+
#1us;
156+
156157
// DDR 0
157158
// Compare the data in host memory with the expected data
158159
$display("[%t] : DMA buffer from DDR 0", $realtime);

hdk/common/verif/models/sh_bfm/sh_bfm.sv

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,8 @@ module sh_bfm #(
497497
} DMA_OP;
498498

499499
DMA_OP h2c_dma_list[0:3][$];
500+
int h2c_dma_wr_cmd_cnt[0:3];
501+
500502
DMA_OP c2h_dma_list[0:3][$];
501503
DMA_OP c2h_data_dma_list[0:3][$];
502504

@@ -682,6 +684,12 @@ module sh_bfm #(
682684
//
683685
//=================================================
684686

687+
// initial various counts for DMA operations
688+
initial begin
689+
for(int i=0; i<4; i++)
690+
h2c_dma_wr_cmd_cnt[i] = 0;
691+
end
692+
685693
//
686694
// sh->cl Address Write Channel
687695
//
@@ -732,7 +740,11 @@ module sh_bfm #(
732740
if (debug) begin
733741
$display("[%t] : DEBUG popping wr data fifo - %d", $realtime, sh_cl_wr_data.size());
734742
end
735-
h2c_dma_done[sh_cl_wr_data[0].id] = 1'b1;
743+
744+
if (sh_cl_dma_pcis_wlast)
745+
h2c_dma_wr_cmd_cnt[sh_cl_wr_data[0].id]--;
746+
747+
h2c_dma_done[sh_cl_wr_data[0].id] = (h2c_dma_wr_cmd_cnt[sh_cl_wr_data[0].id] == 0);
736748
sh_cl_wr_data.pop_front();
737749
end
738750

@@ -1918,7 +1930,8 @@ module sh_bfm #(
19181930
axi_cmd.id = chan;
19191931
axi_cmd.size = 6;
19201932
sh_cl_wr_cmds.push_back(axi_cmd);
1921-
1933+
h2c_dma_wr_cmd_cnt[chan]++;
1934+
19221935
// loop to do multiple data beats
19231936
for(int j = 0; j <= axi_cmd.len; j++) begin
19241937
axi_data.data = 0;
@@ -1978,9 +1991,13 @@ module sh_bfm #(
19781991
end
19791992
byte_cnt[chan]++;
19801993
end
1981-
c2h_dma_done[chan] = 1'b1;
1994+
c2h_dma_done[chan] = (c2h_data_dma_list[chan].size() == 0);
1995+
1996+
if ((cl_sh_rd_data[0].last == 1) && (byte_cnt[chan] >= dop.len)) // end of current DMA op, reset byte count
1997+
byte_cnt[chan] = 0;
1998+
19821999
cl_sh_rd_data.pop_front();
1983-
end
2000+
end // if (chan == cl_sh_rd_data[0].id)
19842001
end
19852002
end
19862003
end

hdk/docs/describe_fpga_images.md

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
# AWS EC2 API describe-fpga-images
2+
3+
Use `aws ec2 describe-fpga-images` API to get information about all AFIs available to your AWS account. The set of AFIs returned by `describe-fpga-images` includes:
4+
5+
* AFIs owned by your AWS account.
6+
* AFIs owned by other AWS accounts for which you have been granted load permissions.
7+
* Public AFIs.
8+
9+
The API provides various filters to get information about specific AFIs. Invoke `aws ec2 describe-fpga-images help` to get an up-to-date list of available filters. See **Example usage** section in this document for common filters.
10+
11+
AFI information is accessible using `describe-fpga-images` immediately after `create-fpga-image` returns with a valid `afiId`. The information provided by `describe-fpga-images` includes AFI states to check the result of the bitstream generation process:
12+
13+
* `pending` AFI bitstream generation is in progress.
14+
* `available` AFI is available for use by F1 instances.
15+
* `failed` AFI bitstream generation failed. The `State.Message` field provides the specific error code as described in [create-fpga-image error codes](create_fpga_image_error_codes.md).
16+
* `unavailable` AFI is no longer available for use by F1 instances.
17+
18+
19+
## Example response
20+
21+
The following response shows the AFI information provided by `describe-fpga-images`. The AFIs shown in this case are the public AFIs generated from the example CLs in the HDK.
22+
23+
```
24+
{
25+
"FpgaImages": [
26+
{
27+
"OwnerAlias": "amazon",
28+
"UpdateTime": "2017-04-19T17:15:26.000Z",
29+
"Name": "cl_hellow_world_04151701",
30+
"PciId": {
31+
"SubsystemVendorId": "0xfedd",
32+
"VendorId": "0x1d0f",
33+
"DeviceId": "0xf000",
34+
"SubsystemId": "0x1d51"
35+
},
36+
"FpgaImageGlobalId": "agfi-0f0e045f919413242",
37+
"State": {
38+
"Code": "available"
39+
},
40+
"ShellVersion": "0x04151701",
41+
"OwnerId": "095707098027",
42+
"FpgaImageId": "afi-0f0927bc2649e6259",
43+
"CreateTime": "2017-04-19T17:15:25.000Z",
44+
"Description": "cl_hello_world for shell 0x04151701"
45+
},
46+
{
47+
"OwnerAlias": "amazon",
48+
"UpdateTime": "2017-04-17T15:58:54.000Z",
49+
"Name": "cl_dram_dma_0415",
50+
"PciId": {
51+
"SubsystemVendorId": "0xfedc",
52+
"VendorId": "0x1d0f",
53+
"DeviceId": "0xf001",
54+
"SubsystemId": "0x1d51"
55+
},
56+
"FpgaImageGlobalId": "agfi-0d873e8b409f8e806",
57+
"State": {
58+
"Code": "available"
59+
},
60+
"ShellVersion": "0x04151701",
61+
"OwnerId": "095707098027",
62+
"FpgaImageId": "afi-06d0ffc989feeea2a",
63+
"CreateTime": "2017-04-17T15:58:54.000Z",
64+
"Description": "cl_dram_dma_0415"
65+
}
66+
]
67+
}
68+
```
69+
70+
## Example usage
71+
72+
* Get all AFIs accessible to caller AWS account
73+
```
74+
$ aws ec2 describe-fpga-images
75+
```
76+
77+
* Get AFI using specific AFI ID. Information is provided only if caller has access to AFI.
78+
```
79+
$ aws ec2 describe-fpga-images --fpga-image-ids afi-06d0ffc989feeea2a
80+
```
81+
82+
* Get multiple AFIs by AFI IDs
83+
```
84+
$ aws ec2 describe-fpga-images --fpga-image-ids afi-06d0ffc989feeea2a afi-0f0927bc2649e6259
85+
```
86+
87+
* Get AFIs owned by caller AWS account. Exludes public AFIs and AFIs with load permissions.
88+
```
89+
$ aws ec2 describe-fpga-images --owners self
90+
```
91+
92+
* Get public AFIs owned by Amazon (this is the command use to retrive the example response)
93+
```
94+
$ aws ec2 describe-fpga-images --owners amazon
95+
```
96+
97+
* Get AFIs owned by AWS marketplace.
98+
```
99+
$ aws ec2 describe-fpga-images --owners aws-marketplace
100+
```
101+
102+
* Get AFIs using explicit AWS account ID.
103+
```
104+
$ aws ec2 describe-fpga-images --owners 095707098027
105+
```
106+
107+
### Use filters parameter
108+
109+
* Get AFIs using various filters
110+
```
111+
# Get AFI by name
112+
$ aws ec2 describe-fpga-images --filters "Name=name,Values=cl_dram_dma_0415"
113+
114+
# Get AFIs in 'available' state
115+
$ aws ec2 describe-fpga-images --filters "Name=state,Values=available"
116+
117+
# Get AFIs with shell version 0x04151701
118+
$ aws ec2 describe-fpga-images --filters "Name=shell-version,Values=0x04151701"
119+
120+
# Get AFI created at a specific time
121+
$ aws ec2 describe-fpga-images --filters "Name=create-time,Values=2017-04-17T15:58:54.000Z"
122+
```
123+
124+
* Get AFIs using wildcard filters (wildcards only usable in `filters` parameter)
125+
```
126+
# Get AFIs created on 2017-04-17
127+
$ aws ec2 describe-fpga-images --filters "Name=create-time,Values=2017-04-17*"
128+
129+
# Get AFIs if name starts with 'cl_'
130+
$ aws ec2 describe-fpga-images --filters "Name=name,Values=cl_*"
131+
132+
# Get AFIs with multiple wildcards
133+
$ aws ec2 describe-fpga-images --filters "Name=name,Values=*_world_*"
134+
```
135+
136+
137+
### Combine filters to find groups of AFIs
138+
139+
* Get all failed AFIs owned by caller AWS account
140+
```
141+
$ aws ec2 describe-fpga-images --owners self --filters "Name=state,Values=failed"
142+
```
143+
144+
* Multiple filter values are evaluated as `OR` conditions
145+
```
146+
# Get both example AFIs by name
147+
$ aws ec2 describe-fpga-images --filters "Name=name,Values=cl_dram_dma_0415,cl_hellow_world_04151701"
148+
149+
# Get AFIs created on 2017-04-17 or 2017-04-19
150+
$ aws ec2 describe-fpga-images --filters "Name=create-time,Values=2017-04-17*,2017-04-19*"
151+
```
152+
153+
* Multiple filters are evaluated as `AND` conditions
154+
```
155+
# Get AFIs by name AND created on 2017-04-17
156+
$ aws ec2 describe-fpga-images --filters "Name=name,Values=cl_dram_dma_0415,cl_hellow_world_04151701" "Name=create-time,Values=2017-04-17*"
157+
158+
# Same filter can be use multiple times, which can return an empty set
159+
$ aws ec2 describe-fpga-images --filters "Name=name,Values=cl_dram_dma_0415" "Name=name,Values=cl_hellow_world_04151701"
160+
```
161+
162+
## Common Error Messages
163+
164+
165+
* Invalid owner ID or filter alias
166+
```
167+
$ aws ec2 describe-fpga-images --owners 12345
168+
169+
An error occurred (InvalidUserID.Malformed) when calling the DescribeFpgaImages operation: User ID '12345' is invalid
170+
```
171+
172+
* Invalid AFI ID
173+
```
174+
$ aws ec2 describe-fpga-images --fpga-image-ids afi-06d0ffc989feeeXXX
175+
176+
An error occurred (InvalidFpgaImageID.Malformed) when calling the DescribeFpgaImages operation: Image ID 'afi-06d0ffc989feeeXXX' is invalid
177+
```
178+
179+
* AFI ID not found
180+
```
181+
$ aws ec2 describe-fpga-images --fpga-image-ids afi-03d027a3318440a77
182+
183+
An error occurred (InvalidFpgaImageID.NotFound) when calling the DescribeFpgaImages operation: Image ID 'afi-03d027a3318440a77' not found
184+
```
185+
186+
* Invalid filter name
187+
```
188+
$ aws ec2 describe-fpga-images --filters "Name=bad-filter,Values=value"
189+
190+
An error occurred (InvalidParameterValue) when calling the DescribeFpgaImages operation: The filter 'bad-filter' is invalid
191+
```

hdk/hdk_version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
HDK_VERSION=1.2.3
1+
HDK_VERSION=1.2.4

0 commit comments

Comments
 (0)