Skip to content

Commit f4a90d0

Browse files
committed
Address Paul's comments
1 parent eecaf91 commit f4a90d0

File tree

1 file changed

+14
-10
lines changed
  • DirectProgramming/C++SYCL_FPGA/Tutorials/Features/lsu_control

1 file changed

+14
-10
lines changed

DirectProgramming/C++SYCL_FPGA/Tutorials/Features/lsu_control/README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This sample is an FPGA tutorial that demonstrates how to configure the load-stor
1010

1111
## Purpose
1212

13-
The compiler creates load-store units (LSU) to access off-chip data. The compiler has many options to choose from when configuring each LSU. The SYCL*-compliant LSU controls extension allows you to override the compiler's internal heuristics and control the architecture of each LSU. An introduction to the extension in this tutorial will explain the available options, extension defaults, appropriate use cases, and area trade-offs.
13+
The compiler creates load-store units (LSU) to access memories, both on-chip and off-chip. The compiler has many options to choose from when configuring each LSU. The SYCL*-compliant LSU controls extension allows you to override the compiler's internal heuristics and control the architecture of individual LSUs that are used to access variable-latency off-chip memory. An introduction to the extension in this tutorial will explain the available options, extension defaults, appropriate use cases, and area trade-offs.
1414

1515
## Prerequisites
1616

@@ -63,7 +63,7 @@ The sample illustrates the following important concepts.
6363

6464
### LSUs and LSU Styles
6565

66-
An LSU is a block that handles loading and storing data to and from memory. Off-chip memory can have variable latency. To mitigate this, different LSU implementations, referred to as styles, are available.
66+
An LSU is a block that handles loading and storing data to and from memory. Off-chip memory can have variable latency. To mitigate this, different LSU styles are available.
6767

6868
The two LSU styles used in this tutorial are listed below:
6969

@@ -77,11 +77,15 @@ The best LSU style depends on the memory access pattern in your design. There ar
7777

7878
In addition to these two styles, there are also LSU modifiers. LSU modifiers are add-ons that can be combined with LSU styles, such as caching, which can be combined with the burst-coalesced LSU style.
7979

80-
For more details on LSU modifiers and LSU styles, refer to the Memory Accesses section in the [FPGA Optimization Guide for Intel® oneAPI Toolkits Developer Guide](https://software.intel.com/content/www/us/en/develop/documentation/oneapi-fpga-optimization-guide).
80+
For more details on LSU modifiers and LSU styles, refer to the *Memory Accesses* section in the [FPGA Optimization Guide for Intel® oneAPI Toolkits Developer Guide](https://www.intel.com/content/www/us/en/docs/oneapi-fpga-add-on/optimization-guide/current/memory-accesses.html).
8181

8282
### Introduction to the LSU Control Extension
8383

84-
The class: ```ext::intel::lsu``` enables you to control the architecture of the LSU. The class has two member functions, `load()` and `store()`, which allow loading from and storing to a global pointer.
84+
The class: ```ext::intel::lsu``` enables you to control the architecture of the LSU. The class has two member functions, `load()` and `store()`, which allow loading from and storing to a global pointer (via `sycl::multi_ptr` rather than raw pointer).
85+
86+
There are two steps to use the LSU control extension to optimize LSU behaviour:
87+
1. Get a `sycl::multi_ptr` representation of the memory you wish to access using the `get_multi_ptr<>()` function.
88+
2. Access this `sycl::multi_ptr` using one of the LSU control functions.
8589

8690
The table below summarizes the LSU control extension parameters. The parameters will be respected to the extent possible.
8791

@@ -97,17 +101,17 @@ If the default options are used, a pipelined LSU is implemented.
97101
#### Example: Controlling the `prefetch` and `statically_coalesce` Parameters
98102

99103
```c++
100-
//Creating typedefs using the LSU controls class
101-
//for each combination of LSU options desired.
104+
// Creating typedefs using the LSU controls class
105+
// for each combination of LSU options desired.
102106
using PrefetchingLSU = ext::intel::lsu<ext::intel::prefetch<true>,
103-
ext::intel::statically_coalesce<false>>;
107+
ext::intel::statically_coalesce<false>>;
104108
// ...
105109
q.submit([&](handler &h) {
106110
h.single_task<Kernel>([=] {
107-
//Pointer to external memory
111+
// Pointer to external memory
108112
auto input_ptr = input_accessor.template get_multi_ptr<access::decorated::no>();
109113

110-
//Compiler will use a Prefetch LSU for this load
114+
// Compiler will use a Prefetch LSU for this load
111115
int in_data = PrefetchingLSU::load(input_ptr);
112116

113117
//...
@@ -116,7 +120,7 @@ q.submit([&](handler &h) {
116120
```
117121

118122
Currently, not every combination of parameters is valid in the compiler.
119-
For more details on the descriptions of LSU controls, styles, and modifiers refer to the *FPGA LSU Controls* section in the [FPGA Optimization Guide for Intel® oneAPI Toolkits Developer Guide](https://software.intel.com/content/www/us/en/develop/documentation/oneapi-fpga-optimization-guide).
123+
For more details on the descriptions of LSU controls, styles, and modifiers refer to the *Load-Store Unit Controls* section in the [FPGA Optimization Guide for Intel® oneAPI Toolkits Developer Guide](https://www.intel.com/content/www/us/en/docs/oneapi-fpga-add-on/optimization-guide/current/load-store-unit-controls.html).
120124

121125
### Tutorial Overview
122126

0 commit comments

Comments
 (0)