OpenFC Architecture
Start:
[[OpenFC - an Open FPGA Cluster framework]]
* System overview [#u714fb67]
#ref(overview.png,around,right);
OpenFC provides:
- PCIe DMA (host-FPGA communication)
- Serial transceivers (FPGA-FPGA communication)
- ICAP (internal configuration access port: to loading/un...
- and Router to combine everything above with user-design...
Users of OpenFC can design and load their own Stream PE a...
On the host, simple APIs are provided to enable user prog...
#clear
* Routing basics [#h178ccc1]
#ref(routing.png,around,right);
To communicate with Stream PEs, host program transmits on...
A data frame is a stream of 64-bit words, composed of the...
+ Routing header: Values of 64'h0100_0000_xxxx_xxxx, wher...
-- On arrival to router, the first word of routing header...
-- Basically, host program prepares routing header to the...
+ Length: Number of 64-bit words follows as the payload. ...
+ The payload.
** Simple send/receive example [#sf2a3208]
This host C code will generate a data frame to Stream PE....
#geshi(c,number){{
// Buffer allocation
uint64_t* out = (uint64_t*)buf_alloc(vec_len*8);
uint64_t* in = (uint64_t*)buf_alloc(vec_len*8);
// Header
uint64_t header[HEADER_MAX];
header[0] = ROUTING_HEADAER | 1; // Stream PE
header[1] = ROUTING_HEADER | 6; // PCIe
header[2] = vec_len;
buf_set_header((uint64_t*)out, header, 3);
// Generate Payload
for(int i=0; i<vec_len; i++) out[i] = i;
// Send & Receive
buf_send_async(handles.fd_o1, (uint64_t*)out, vec_len*8);
buf_recv(handles.fd_i, (uint64_t*)in, vec_len*8);
}}
** Simple 64-bit integer vector accumulate example with V...
The following Vivado HLS C++ code gives a Stream PE to ca...
For details about hls::stream or #pragma HLS in this code...
#geshi(c,number){{
void vec_accum(hls::stream<uint64_t>& in, hls::stream<uin...
#pragma HLS INTERFACE axis register both port=in
#pragma HLS INTERFACE axis register both port=out
uint64_t len, sum=0;
len = in.read();
for(uint64_t i=0; i<len; i++) sum += in.read();
out.write(1); // output length is always 1
out.write(sum);
}
}}
End:
[[OpenFC - an Open FPGA Cluster framework]]
* System overview [#u714fb67]
#ref(overview.png,around,right);
OpenFC provides:
- PCIe DMA (host-FPGA communication)
- Serial transceivers (FPGA-FPGA communication)
- ICAP (internal configuration access port: to loading/un...
- and Router to combine everything above with user-design...
Users of OpenFC can design and load their own Stream PE a...
On the host, simple APIs are provided to enable user prog...
#clear
* Routing basics [#h178ccc1]
#ref(routing.png,around,right);
To communicate with Stream PEs, host program transmits on...
A data frame is a stream of 64-bit words, composed of the...
+ Routing header: Values of 64'h0100_0000_xxxx_xxxx, wher...
-- On arrival to router, the first word of routing header...
-- Basically, host program prepares routing header to the...
+ Length: Number of 64-bit words follows as the payload. ...
+ The payload.
** Simple send/receive example [#sf2a3208]
This host C code will generate a data frame to Stream PE....
#geshi(c,number){{
// Buffer allocation
uint64_t* out = (uint64_t*)buf_alloc(vec_len*8);
uint64_t* in = (uint64_t*)buf_alloc(vec_len*8);
// Header
uint64_t header[HEADER_MAX];
header[0] = ROUTING_HEADAER | 1; // Stream PE
header[1] = ROUTING_HEADER | 6; // PCIe
header[2] = vec_len;
buf_set_header((uint64_t*)out, header, 3);
// Generate Payload
for(int i=0; i<vec_len; i++) out[i] = i;
// Send & Receive
buf_send_async(handles.fd_o1, (uint64_t*)out, vec_len*8);
buf_recv(handles.fd_i, (uint64_t*)in, vec_len*8);
}}
** Simple 64-bit integer vector accumulate example with V...
The following Vivado HLS C++ code gives a Stream PE to ca...
For details about hls::stream or #pragma HLS in this code...
#geshi(c,number){{
void vec_accum(hls::stream<uint64_t>& in, hls::stream<uin...
#pragma HLS INTERFACE axis register both port=in
#pragma HLS INTERFACE axis register both port=out
uint64_t len, sum=0;
len = in.read();
for(uint64_t i=0; i<len; i++) sum += in.read();
out.write(1); // output length is always 1
out.write(sum);
}
}}
Page: