1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00
Commit graph

69 commits

Author SHA1 Message Date
Niklas Eiling
1a0c4a5ef0 fpga: fix includes and various comments
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2024-04-18 14:32:52 +02:00
Niklas Eiling
55070cd235 fpga: improve comments for fastRead and fastWrite
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2024-04-18 10:35:12 +02:00
Niklas Eiling
d08a79b49c fpga: expose methods for finer control over DMA data path
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2024-04-18 10:35:12 +02:00
Niklas Eiling
a2b7050fd1 fpga: improve dma latency
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2024-04-18 10:35:11 +02:00
Niklas Eiling
fdfa98359d fpga: turn off all interrupts when using polling
this improves the latency by at least 4 us in my setup.

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2024-04-18 10:34:17 +02:00
Niklas Eiling
25c021ee75 fpga: optimize sg descriptor rings
we are now using only one memory block for both sg rings. This is
required so that the SG interface can benefit from a read cache

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2024-04-18 10:34:17 +02:00
Niklas Eiling
c644c8f630 fpga: DMA: poll BD instead of hardware register
polling HW is slow (>1us). Polling RAM is faster. This is a first implementation which only polls the first BD that is active. This is why this commit also removes the second read in nodes/fpga. This is not really useful anyways.

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2024-03-14 16:07:45 +01:00
Niklas Eiling
a3209aa344 use polling instead of interrupt
but keep interrupts for i2c

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2024-02-26 11:50:44 +01:00
Niklas Eiling
1bb6c221f6 ips/dma: fix memory leak in libxil code by explicitly calling free on
CyclicBd

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2024-02-14 14:20:33 +01:00
Niklas Eiling
e505bfb5d9 ips/dma: reformat and make more robust
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2024-02-07 18:21:45 +01:00
Niklas Eiling
7c6d350eb0 format and increase robustness of interuppt handling
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2024-02-07 18:21:45 +01:00
Niklas Eiling
d34ab182e4 fix unmapped ring buffers in dma.cpp leading to segfault
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2024-01-09 17:14:05 +01:00
Niklas Eiling
654ee84e9e make FPGA device interface agnostic
remove explicit mentioning of PCIe in the use of Device as a preparation
for integrating platform devices. auto formatted some files.

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2023-12-12 14:08:34 +01:00
Steffen Vogel
157d5b21d7 Make REUSE copyright notice the same as in other VILLASframework projects and fix comments (#82)
This edits the headers in every file so the copyright notice mentions RWTH Aachen University. We also update some copyright years and fix various comments so the header is the same across all of VILLASframework.

* Harmonize comment and code-style

Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>

* Harmonize comment and code-style

Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>

---------

Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>
2023-09-08 11:35:18 +02:00
Niklas Eiling
7847658548 fix output formatting not being able to print numbers larger than 9
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2023-03-20 15:35:38 +01:00
Niklas Eiling
e6f035cd31 add basic thread-safety to ips/dma
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2023-01-30 16:12:16 +01:00
Niklas Eiling
590cef10d0 add check for missed interrupts when handling reads
introduce new struct Completion that is returned by Dma::readCompletion
and Dma::writeCompletion

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2023-01-30 16:12:16 +01:00
Niklas Eiling
498af9fd1c ips/dma: make read correctly wait on interrupts
Modify villas-fpga-ctrl to fit the new behavior of Dma.
Makes reading from DMA work even when we are too slow and
only receive partial batches of BDs.

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2023-01-30 16:12:15 +01:00
Niklas Eiling
14f924b6c5 rework MemoryBlock use to make use of shared_ptr so the lifetime of the objects is properly tracked
this fixes that the wrong order of allocating and PciCard destruction
causes an undefined state.

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2023-01-30 16:09:09 +01:00
9b27c31b9c fixup copyright texts
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2023-01-07 17:32:48 +01:00
f776cba693 relicense project to Apache 2.0
The project is now also REUSE compliant: https://reuse.software/
Previous copyright holders have provided their
acknowledgement to transition to the new license in the
following GitHub PR: https://github.com/VILLASframework/fpga/pull/66

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2023-01-07 17:20:15 +01:00
53ddbe4e10 refactor registration of IP core drivers to be aligned with registration of VILLASnode formats and node-types
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2023-01-05 14:21:20 +01:00
Niklas Eiling
80af655ac5 make DMA ip unmap memory owned by itself
unmapping of the scatter gather attribute memory was done
after the DMA destructor was called, leading to Card trying to
unmap memory that was already freed.
This lead to crashing during cleaning up.

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2023-01-04 17:17:21 +01:00
Niklas Eiling
f5b0762b1a make memory manager destroy IP objects and improve DMA logging
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2023-01-04 11:04:48 +01:00
Pascal Bauer
082dd40edb added class name before virtual method
Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
2022-12-19 15:47:36 +01:00
Niklas Eiling
03f8d0782e Revert "core: move configuration of polling mode to parse()"
The changes lead to crashing because intc will not be configured
properly. Also revert removing configDone in ips/dma

This reverts commit 3b8949afe9.

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2022-12-05 10:36:45 +01:00
3b8949afe9 core: move configuration of polling mode to parse()
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2022-12-05 09:35:32 +01:00
09af6d9e88 refactor Core::configure() to Core::parse()
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2022-12-05 09:35:32 +01:00
14c7e57a8a fix parsing of IP parameters
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2022-12-05 09:35:32 +01:00
Niklas Eiling
905d28d1e4 ips/dma: use destructor to reset DMA controller
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
2022-12-02 13:52:31 +01:00
Niklas Eiling
0d0aae090d add villas-fpga-xbar-select; improve DMA parameters in ips/dma 2022-11-29 14:51:54 +01:00
Niklas Eiling
f105b08144 clean up and comment ips/dma.cpp 2022-11-29 14:51:53 +01:00
Niklas Eiling
0c6c30dda3 ips/dma: comment debug outputs to improve villas-fpga-cat performance
fix rebase artifacts
2022-11-29 14:51:53 +01:00
ba16653820 minor code-style fixes 2022-11-11 05:03:43 -05:00
Niklas Eiling
e4a469f99f ips/dma: fix hasScatterGather using wrong member variable; Throw error used on unconfigured Dma 2022-11-11 04:53:58 -05:00
Niklas Eiling
49db359851 ips: fix some formatting issues 2022-11-11 04:53:58 -05:00
Niklas Eiling
dfb2a967d8 ips/dma: use NodeFactory's configureJson to setup memory graph 2022-11-11 04:53:58 -05:00
Niklas Eiling
7b4176a710 ips/dma: use json_unpack 2022-11-11 04:53:58 -05:00
Niklas Eiling
bac0b7309a add card config option "polling" to configure polling mode in IP cores; add json parsing of hwdef to dma IP core to replace hardcoded DMA settings. 2022-11-11 04:53:58 -05:00
Niklas Eiling
7b2f0f3d96 ip/dma: fix spelling 2022-11-11 04:53:58 -05:00
Niklas Eiling
5acf4f96e9 ips/dma: acknowledge interrupts in DMA controller and correctly set coalescing parameter. 2022-11-11 04:53:58 -05:00
Niklas Eiling
da483d8d3a make dma.cpp use interrupts instead of polling 2022-11-11 04:53:58 -05:00
3f8a38adce dma: first successful test with scatter gather
(Aurora IPs still broken?)
2022-10-28 11:32:01 -04:00
0dfffb94c4 dma: added second version of scatter-gather support 2022-10-28 08:18:24 -04:00
7e0848b7d5 dma: throw exception in makeAccesibleFromVA instead of returning bool 2022-10-28 08:16:58 -04:00
0e0197a3be fix coding style 2022-10-28 08:03:57 -04:00
72cfade589 dma: start implementing scatter-gather support 2022-10-27 06:02:45 -04:00
0a93da7bad adjust DMA IP core to new DMA parameters of Niklas' bitstream 2022-09-13 03:25:17 -04:00
d6c7e69866 add missing parentheses 2022-08-30 12:22:40 -04:00
9ef01d068e update year in copyright notices 2022-08-30 12:22:40 -04:00