Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
VILLASframework
VILLASfpga
VILLASfpga
Commits
b7683f49
Commit
b7683f49
authored
Jun 04, 2018
by
Daniel Krebs
Browse files
ips/rtds2gpu: use new connect interface
parent
d40b3eaa
Pipeline
#52943
failed with stages
in 1 minute and 6 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
include/villas/fpga/ips/gpu2rtds.hpp
View file @
b7683f49
...
...
@@ -24,12 +24,16 @@ public:
size_t
getMaxFrameSize
();
// void dumpDoorbell(uint32_t doorbellRegister) const;
const
StreamVertex
&
getDefaultMasterPort
()
const
{
return
getMasterPort
(
rtdsOutputStreamPort
);
}
private:
bool
updateStatus
();
private:
static
constexpr
const
char
*
rtdsOutputStreamPort
=
"rtds_output"
;
struct
StatusControlRegister
{
uint32_t
status_ap_vld
:
1
,
_res
:
31
;
...
...
include/villas/fpga/ips/rtds2gpu.hpp
View file @
b7683f49
...
...
@@ -32,12 +32,16 @@ public:
{
return
{
registerMemory
};
}
const
StreamVertex
&
getDefaultSlavePort
()
const
{
return
getSlavePort
(
rtdsInputStreamPort
);
}
private:
bool
updateStatus
();
private:
static
constexpr
const
char
*
axiInterface
=
"m_axi_axi_mm"
;
static
constexpr
const
char
*
streamInterface
=
"rtds_input"
;
static
constexpr
const
char
*
rtdsInputStreamPort
=
"rtds_input"
;
XRtds2gpu
xInstance
;
...
...
tests/rtds2gpu.cpp
View file @
b7683f49
...
...
@@ -117,9 +117,8 @@ Test(fpga, rtds2gpu, .description = "Rtds2Gpu")
dumpMem
(
dataDst2
,
dmaMemDst2
.
getMemoryBlock
().
getSize
());
// connect DMA to Rtds2Gpu IP
// TODO: this should be done automatically
cr_assert
(
axiSwitch
->
connect
(
6
,
7
));
// connect AXI Stream from DMA to Rtds2Gpu IP
cr_assert
(
dma
->
connect
(
rtds2gpu
));
cr_assert
(
rtds2gpu
.
startOnce
(
dmaMemDst
.
getMemoryBlock
(),
SAMPLE_COUNT
,
DATA_OFFSET
*
4
,
DOORBELL_OFFSET
*
4
),
"Preparing Rtds2Gpu IP failed"
);
...
...
@@ -130,7 +129,6 @@ Test(fpga, rtds2gpu, .description = "Rtds2Gpu")
cr_assert
(
dma
->
writeComplete
(),
"DMA failed"
);
while
(
not
rtds2gpu
.
isFinished
());
const
uint32_t
*
doorbellDst
=
&
dmaMemDst
[
DOORBELL_OFFSET
];
...
...
@@ -139,13 +137,14 @@ Test(fpga, rtds2gpu, .description = "Rtds2Gpu")
cr_assert
(
memcmp
(
dataSrc
,
dataDst
,
FRAME_SIZE
)
==
0
,
"Memory not equal"
);
(
void
)
dmaMemDst2
;
(
void
)
dataDst2
;
for
(
size_t
i
=
0
;
i
<
SAMPLE_COUNT
;
i
++
)
{
gpu2rtds
->
registerFrames
[
i
]
=
dmaMemDst
[
i
];
}
cr_assert
(
axiSwitch
->
connect
(
7
,
6
));
// connect AXI Stream from Gpu2Rtds IP to DMA
cr_assert
(
gpu2rtds
->
connect
(
*
dma
));
cr_assert
(
dma
->
read
(
dmaMemDst2
.
getMemoryBlock
(),
FRAME_SIZE
),
"Starting DMA S2MM transfer failed"
);
...
...
@@ -156,7 +155,7 @@ Test(fpga, rtds2gpu, .description = "Rtds2Gpu")
cr_assert
(
dma
->
readComplete
(),
"DMA failed"
);
while
(
not
rtds2gpu
.
isFinished
());
while
(
not
gpu2rtds
->
isFinished
());
cr_assert
(
memcmp
(
dataSrc
,
dataDst2
,
FRAME_SIZE
)
==
0
,
"Memory not equal"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment