Skip to content

Commit a4ddeda

Browse files
committed
Merge branch 'develop'
2 parents 7c4afc3 + 55930f2 commit a4ddeda

32 files changed

+2180
-80
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ CYNQ is pretty similar to PYNQ, let's have a look.
2828

2929
PYNQ:
3030

31-
```python
31+
~~~~~~~~~~~~~{.py}
3232
from pynq import allocate, Overlay
3333
3434
# Configure the FPGA
@@ -52,11 +52,11 @@ dma.recvchannel.wait()
5252
# Dispose the buffers
5353
del input_hw
5454
del output_hw
55-
```
55+
~~~~~~~~~~~~~
5656

5757
With CYNQ for Xilinx Ultrascale+:
5858

59-
```c++
59+
~~~~~~~~~~~~~{.cpp}
6060
#include <cynq/cynq.hpp>
6161
6262
using namespace cynq;
@@ -90,11 +90,11 @@ mover->Download(out_mem, outbuf->Size(), 0, ExecutionType::Sync);
9090
accel->Stop();
9191
9292
// Dispose? We use RAII
93-
```
93+
~~~~~~~~~~~~~
9494

9595
With CYNQ for Alveo
9696

97-
```c++
97+
~~~~~~~~~~~~~{.cpp}
9898
#include <cynq/cynq.hpp>
9999
100100
using namespace cynq;
@@ -126,7 +126,7 @@ accel->Start(StartMode::Once);
126126
mover->Download(out_mem, outbuf->Size(), 0, ExecutionType::Sync);
127127
128128
// Dispose? We use RAII
129-
```
129+
~~~~~~~~~~~~~
130130

131131
## Currently tested
132132

@@ -142,14 +142,14 @@ So far, we have tested CYNQ on:
142142

143143
Cite Us:
144144

145-
```
145+
~~~~~~~~~~~~~
146146
@misc{cynq,
147147
author = {{León-Vega, Luis G.
148148
AND Ávila-Torres, Diego
149149
AND Castro-Godínez, Jorge
150150
}},
151-
title = {{CYNQ (v0.2)}},
151+
title = {{CYNQ (v0.3)}},
152152
year = {2024},
153153
url = {https://github.com/ECASLab/cynq},
154154
}
155-
```
155+
~~~~~~~~~~~~~

docs/ClassDiagram.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,32 @@ interface IHardware {
55
+{abstract} Reset() -> Status
66
+{abstract} GetDataMover(address = 0) -> IDataMover *
77
+{abstract} GetAccelerator(address: uint64) -> IAccelerator *
8-
+{abstract} GetAccelerator(address: string) -> IAccelerator *
8+
+{virtual} GetExecutionStream(name: string, impl: IExecutionStreamType, config: ExecutionGraphParameters) -> IExecutionGraph *
9+
+{virtual} GetClocks() -> float[]
10+
+{virtual} SetClocks(clocks: float[]) -> Status
911
+{static} Create(hw: HardwareArchitecture, bitstream: string, xclbin: string) -> IHardware*
1012
+{static} Create(hw: HardwareArchitecture, config: string) -> IHardware*
1113
}
1214

15+
interface IExecutionGraph {
16+
+{abstract} Add(func: std::function<void()>, deps: NodeID[] = {}) -> NodeID
17+
+{abstract} Sync(node: NodeID = last) -> Status
18+
+{abstract} GetLastError() -> Status
19+
+{static} Create(impl: IExecutionStreamType, config: ExecutionGraphParameters) -> IExecutionStream*
20+
}
21+
22+
struct IExecutionGraph::Node {
23+
id: NodeID,
24+
func: std::function<void()>
25+
deps: NodeID[]
26+
parents: pointer []
27+
children: pointer []
28+
}
29+
30+
struct ExecutionGraphParameters {
31+
name: Stream
32+
}
33+
1334
interface IMemory {
1435
{abstract} #GetHostAddress() -> uint8_t *
1536
{abstract} #GetDeviceAddress() -> uint8_t *
@@ -115,6 +136,8 @@ class UltraScale {
115136
+Reset() -> Status
116137
+GetDataMover(address, type : DataMoverType) -> DMADataMover *
117138
+GetAccelerator(address: uint64) -> MMIOAccelerator *
139+
+{virtual} GetClocks() -> float[]
140+
+{virtual} SetClocks(clocks: float[]) -> Status
118141
+UltraScale(hw, bitsteam, xclbin)
119142
}
120143

@@ -172,6 +195,13 @@ class XRTDataMover {
172195
XrtDataMover(mem_bank)
173196
}
174197

198+
class ExecutionStream {
199+
+Add(func: std::function<void()>, deps: NodeID[] = {}) -> NodeID
200+
+Sync(node: NodeID = last) -> Status
201+
+GetLastError() -> Status
202+
}
203+
204+
ExecutionStream ..> IExecutionGraph
175205
UltraScale ..> IHardware
176206
Alveo ..> IHardware
177207
XRTMemory ..> IMemory

docs/Foundations.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ This first release is a huge advance towards simplicity and we expect that many
3333

3434
## How does CYNQ work?
3535

36-
An application is mounted on top of an abstract interface to make the API feel agnostic. In this case, CYNQ is composed of four major components:
36+
An application is mounted on top of an abstract interface to make the API feel agnostic. In this case, CYNQ is composed of five major components:
3737

3838
* Hardware class
3939
* Accelerator class
4040
* Data Mover class
4141
* Memory class
42+
* Execution Graph class
4243

4344
Depending on the hardware, these classes are implemented in different manners by using class extension. Thus, users won't feel any change when migrating their applications from one hardware to another. We can link these classes with the following equivalences:
4445

@@ -48,6 +49,7 @@ Depending on the hardware, these classes are implemented in different manners by
4849
| IAccelerator | Default IP |
4950
| IDataMover | DMA IP |
5051
| IMemory | Buffer |
52+
| IExecutionGraph | N.A |
5153

5254
As it is possible to see, there is an equivalence at the functional level.
5355

0 commit comments

Comments
 (0)