Skip to content

Commit 2a09118

Browse files
[SYCL][DOC] Update FPGA pipe properties spec (#11330)
Update to pipe properties spec to include axi streaming as a protocol choice. Existing properties like bits_per_symbol have been explicitly declared as Avalon-only. Although AXI will require many similar controls, the intention will be to add separate AXI-only properties for those. They will be added in the future as we add support for them. Part of this update includes items 3-8 of this [cleanup case](https://github.com/intel/llvm/issues/9465l) from @GarveyJoe. Of particular note, uses_ready has been extracted from the protocol property into its own property. --------- Co-authored-by: Steffen Larsen <[email protected]>
1 parent 0913045 commit 2a09118

File tree

1 file changed

+76
-38
lines changed

1 file changed

+76
-38
lines changed

sycl/doc/extensions/experimental/sycl_ext_intel_data_flow_pipes_properties.asciidoc

Lines changed: 76 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,19 @@ value to determine which of the extension's APIs the implementation supports.
103103
Below is a list of compile-time-constant properties which `pipe` supports.
104104

105105
```c++
106-
namespace sycl::ext::intel::experimental {
106+
namespace sycl {
107+
namespace ext {
108+
namespace intel {
109+
namespace experimental {
107110

108111
struct ready_latency_key {
109-
template <int Latency>
112+
template <uint32_t Latency>
110113
using value_t = oneapi::experimental::property_value<
111114
ready_latency_key, std::integral_constant<int, Latency>>;
112115
};
113116

114117
struct bits_per_symbol_key {
115-
template <int Bits>
118+
template <uint32_t Bits>
116119
using value_t =
117120
oneapi::experimental::property_value<bits_per_symbol_key,
118121
std::integral_constant<int, Bits>>;
@@ -123,8 +126,15 @@ struct uses_valid_key {
123126
using value_t =
124127
oneapi::experimental::property_value<uses_valid_key,
125128
std::bool_constant<Valid>>;
126-
};
127-
129+
};
130+
131+
struct uses_ready_key {
132+
template <bool Valid>
133+
using value_t =
134+
oneapi::experimental::property_value<uses_ready_key,
135+
std::bool_constant<Valid>>;
136+
};
137+
128138
struct first_symbol_in_high_order_bits_key {
129139
template <bool HighOrder>
130140
using value_t =
@@ -134,9 +144,8 @@ struct first_symbol_in_high_order_bits_key {
134144

135145
enum class protocol_name : /* unspecified */ {
136146
avalon_streaming = 0,
137-
avalon_streaming_uses_ready = 1,
138-
avalon_mm = 2,
139-
avalon_mm_uses_ready = 3
147+
avalon_mm = 1,
148+
axi_streaming = 2
140149
};
141150

142151
struct protocol_key {
@@ -145,23 +154,43 @@ struct protocol_key {
145154
protocol_key, std::integral_constant<protocol_name, Protocol>>;
146155
};
147156

148-
template <int Latency>
157+
template <uint32_t Latency>
149158
inline constexpr ready_latency_key::value_t<Latency> ready_latency;
150159

151-
template <int Bits>
160+
template <uint32_t Bits>
152161
inline constexpr bits_per_symbol_key::value_t<Bits> bits_per_symbol;
153162

154163
template <bool Valid>
155164
inline constexpr uses_valid_key::value_t<Valid> uses_valid;
156165

166+
template <bool Ready>
167+
inline constexpr uses_ready_key::value_t<Ready> uses_ready;
168+
157169
template <bool HighOrder>
158170
inline constexpr first_symbol_in_high_order_bits_key::value_t<HighOrder>
159171
first_symbol_in_high_order_bits;
160172

161173
template <protocol_name Protocol>
162174
inline constexpr protocol_key::value_t<Protocol> protocol;
163175

164-
} // namespace sycl::ext::intel::experimental
176+
namespace avalon-st {
177+
using sycl::ext::intel::experimental::bits_per_symbol;
178+
using sycl::ext::intel::experimental::bits_per_symbol_key;
179+
using sycl::ext::intel::experimental::first_symbol_in_high_order_bits;
180+
using sycl::ext::intel::experimental::first_symbol_in_high_order_bits_key;
181+
using sycl::ext::intel::experimental::ready_latency;
182+
using sycl::ext::intel::experimental::ready_latency_key;
183+
using sycl::ext::intel::experimental::uses_ready;
184+
using sycl::ext::intel::experimental::uses_ready_key;
185+
using sycl::ext::intel::experimental::uses_valid;
186+
using sycl::ext::intel::experimental::uses_valid_key;
187+
} // namespace avalon-st
188+
189+
} // namespace experimental
190+
} // namespace intel
191+
} // namespace ext
192+
} // namespace sycl
193+
165194
```
166195

167196
--
@@ -177,11 +206,12 @@ Default value: 0
177206
The number of cycles between when the ready signal is deasserted and when the
178207
pipe can no longer accept new inputs.
179208

180-
This property is not guaranteed to be respected if the pipe is an inter-kernel
181-
pipe. The compiler is allowed to optimize the pipe if both sides are visible.
209+
This property only applies to the externally visible end of the pipe.
210+
211+
This property is only valid when the `protocol` property is *avalon_streaming*.
182212

183213
|`bits_per_symbol`
184-
| Valid values: A positive integer value that evenly divides by the data type size.
214+
| Valid values: A positive integer value that evenly divides the data type size.
185215

186216
Default value: 8
187217

@@ -190,8 +220,9 @@ Describes how the data is broken into symbols on the data bus.
190220
Data is broken down according to how you set the `first_symbol_in_high_order_bits`
191221
property. By default, data is broken down in little endian order.
192222

193-
This property is not guaranteed to be respected if the pipe is an inter-kernel
194-
pipe. The compiler is allowed to optimize the pipe if both sides are visible.
223+
This property only applies to the externally visible end of the pipe.
224+
225+
This property is only valid when the `protocol` property is *avalon_streaming*.
195226

196227
|`uses_valid`
197228
| Valid values: `true` or `false`
@@ -204,11 +235,27 @@ upstream source must provide valid data on every cycle that ready is asserted.
204235
This is equivalent to changing the pipe read calls to a non-blocking call and assuming that
205236
success is always true.
206237

207-
If set to `false`, the `min_capacity` pipe class template parameter and `ready_latency`
208-
property must be 0.
238+
This property only applies to the externally visible end of the pipe, and only valid when
239+
the valid signal is driven externally from the kernel, i.e., on a host-to-kernel or IO-to-kernel pipe.
240+
241+
This property is only valid when the `protocol` property is *avalon_streaming*
242+
or *avalon_mm*.
243+
244+
|`uses_ready`
245+
| Ready values: `true` or `false`
246+
247+
Default value: `true`
248+
249+
Controls whether a ready signal is present on the pipe interface. If `false`, the
250+
downstream sink cannot backpressure the pipe.
251+
252+
This is equivalent to changing the pipe write calls to a non-blocking call and assuming that
253+
success is always true.
254+
255+
This property only applies to the externally visible end of the pipe, and only valid when
256+
the ready signal is driven externally from the kernel, i.e., on a kernel-to-host or IO-to-host pipe.
209257

210-
This property is not guaranteed to be respected if the pipe is an inter-kernel
211-
pipe. The compiler is allowed to optimize the pipe if both sides are visible.
258+
This property is only valid when the `protocol` property is *avalon_streaming*.
212259

213260
|`first_symbol_in_high_order_bits`
214261
| Valid values: true or false
@@ -218,38 +265,28 @@ Default value: false
218265
Specifies whether the data symbols in the pipe are in big-endian
219266
order.
220267

221-
This property is not guaranteed to be respected if the pipe is an inter-kernel
222-
pipe. The compiler is allowed to optimize the pipe if both sides are visible.
268+
This property only applies to the externally visible end of the pipe.
269+
270+
This property is only valid when the `protocol` property is *avalon_streaming*
271+
or *avalon_mm*.
223272

224273
|`protocol`
225274
| Specifies the protocol for the pipe interface. Currently, the protocols supported
226-
are: *avalon_streaming*, *avalon_streaming_uses_ready*, *avalon_mm*, and *avalon_mm_uses_ready*.
275+
are: *avalon_streaming*, *avalon_mm*, and *axi_streaming*.
227276

228277
*avalon_streaming*
229278

230279
Provide an Avalon streaming interface as described in https://www.intel.com/content/www/us/en/docs/programmable/683091/22-3/introduction-to-the-interface-specifications.html[Intel® Avalon Interface Specifications].
231280

232-
With this choice of protocol, no ready signal is exposed by the host pipe, and the sink cannot backpressure.
233-
234-
*avalon_streaming_uses_ready*
235-
236-
Provide an Avalon streaming interface as described in https://www.intel.com/content/www/us/en/docs/programmable/683091/22-3/introduction-to-the-interface-specifications.html[Intel® Avalon Interface Specifications].
237-
238-
This protocol allows the sink to backpressure by deasserting the ready signal asserted. The sink signifies that it is ready to consume data by asserting the ready signal.
239-
240281
*avalon_mm*
241282

242283
Provide an Avalon memory mapped interface as described in https://www.intel.com/content/www/us/en/docs/programmable/683091/22-3/introduction-to-the-interface-specifications.html[Intel® Avalon Interface Specifications].
243284

244-
With this protocol, an implicit ready signal is held high, and the sink cannot backpressure.
245-
246-
*avalon_mm_uses_ready*
247-
248-
Provide an Avalon memory mapped interface as described in https://www.intel.com/content/www/us/en/docs/programmable/683091/22-3/introduction-to-the-interface-specifications.html[Intel® Avalon Interface Specifications].
285+
*axi_streaming*
249286

250-
With this protocol, an additional memory mapped location is created to hold the ready signal. You must set the `uses_valid` property to `true`.
287+
Provide an AXI4-Stream interface as described in https://documentation-service.arm.com/static/642583d7314e245d086bc8c9[AMBA 4 AXI4-Stream Protocol Specification].
251288

252-
The default protocol is *avalon_streaming_uses_ready*
289+
The default protocol is *avalon_streaming*
253290
|====
254291
--
255292

@@ -262,6 +299,7 @@ The default protocol is *avalon_streaming_uses_ready*
262299
|Rev|Date|Author|Changes
263300
|1|2022-03-18|Peter Colberg|*Initial public working draft*
264301
|2|2023-04-06|Robert Ho|Removal of unused properties, update protocols
302+
|3|2023-08-30|Robert Ho|Add axi_streaming protocol
265303
|========================================
266304

267305
//************************************************************************

0 commit comments

Comments
 (0)