Skip to content
GitLab
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
db9562c8
Commit
db9562c8
authored
Sep 08, 2020
by
Steffen Vogel
🎅🏼
Browse files
wip
parent
ade27d87
Changes
5
Hide whitespace changes
Inline
Side-by-side
include/villas/fpga/ips/aurora-4p.hpp
0 → 100644
View file @
db9562c8
/** Driver for wrapper around Quad Port Aurora (acs.eonerc.rwth-aachen.de:user:aurora_4p_axis)
*
* @file
* @author Steffen Vogel <svogel2@eoenrc.rwth-aachen.de>
* @copyright 2017-2020, Institute for Automation of Complex Power Systems, EONERC
* @license GNU General Public License (version 3)
*
* VILLASfpga
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************************/
/** @addtogroup fpga VILLASfpga
* @{
*/
#pragma once
#include
<villas/fpga/node.hpp>
namespace
villas
{
namespace
fpga
{
namespace
ip
{
class
Aurora4P
:
public
Node
{
public:
void
dump
();
std
::
list
<
std
::
string
>
getMemoryBlocks
()
const
{
return
{
registerMemory
};
}
const
StreamVertex
&
getDefaultSlavePort
()
const
{
return
getSlavePort
(
"s_axis0"
);
}
const
StreamVertex
&
getDefaultMasterPort
()
const
{
return
getMasterPort
(
"m_axis0"
);
}
void
setLoopback
(
int
index
,
bool
state
);
void
resetFrameCounters
();
private:
static
constexpr
const
char
registerMemory
[]
=
"reg0"
;
std
::
vector
<
Aurora
*>
ports
;
};
class
AuroraFactory
:
public
NodeFactory
{
public:
Core
*
create
()
{
auto
*
a
=
new
Aurora4P
;
for
(
int
i
=
0
;
i
<
4
;
i
++
)
a
->
ports
.
push_back
(
new
Aurora
);
return
a
;
}
virtual
std
::
string
getName
()
const
{
return
"Aurora 4P"
;
}
virtual
std
::
string
getDescription
()
const
{
return
"Aurora 8B/10B and additional support modules, like an AXI4-Lite register interface."
;
}
virtual
Vlnv
getCompatibleVlnv
()
const
{
return
{
"acs.eonerc.rwth-aachen.de:user:aurora_4p_axis:"
};
}
};
}
/* namespace ip */
}
/* namespace fpga */
}
/* namespace villas */
/** @} */
include/villas/fpga/ips/aurora.hpp
View file @
db9562c8
/** Driver for wrapper around Aurora (acs.eonerc.rwth-aachen.de:user:aurora)
/** Driver for wrapper around Aurora (acs.eonerc.rwth-aachen.de:user:aurora
_axis
)
*
* @file
* @author Hatim Kanchwala <hatim@hatimak.me>
...
...
lib/CMakeLists.txt
View file @
db9562c8
...
...
@@ -36,6 +36,7 @@ set(SOURCES
ips/bram.cpp
ips/rtds.cpp
ips/aurora.cpp
ips/aurora-4p.cpp
ips/gpio.cpp
ips/rtds2gpu/rtds2gpu.cpp
...
...
lib/ips/aurora-4p.cpp
0 → 100644
View file @
db9562c8
/** Driver for wrapper around Aurora (acs.eonerc.rwth-aachen.de:user:aurora_4p_axis)
*
* @author Steffen Vogel <svogel2@eoenrc.rwth-aachen.de>
* @copyright 2017-2020, Institute for Automation of Complex Power Systems, EONERC
* @license GNU General Public License (version 3)
*
* VILLASfpga
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************************/
#include
<cstdint>
#include
<villas/utils.hpp>
#include
<villas/fpga/card.hpp>
#include
<villas/fpga/ips/aurora-4p.hpp>
using
namespace
villas
::
fpga
::
ip
;
static
AuroraFactory
aurora4pFactoryInstance
;
void
Aurora4P
::
dump
()
{
for
(
auto
&
p
:
ports
)
p
.
dump
();
}
void
Aurora
::
setLoopback
(
int
index
,
bool
state
)
{
ports
[
index
].
setLoopback
(
state
)
}
void
Aurora
::
resetFrameCounters
()
{
for
(
auto
&
p
:
ports
)
p
.
resetFrameCounters
();
}
lib/ips/aurora.cpp
View file @
db9562c8
/** Driver for wrapper around Aurora (acs.eonerc.rwth-aachen.de:user:aurora)
/** Driver for wrapper around Aurora (acs.eonerc.rwth-aachen.de:user:aurora
_axis
)
*
* @author Hatim Kanchwala <hatim@hatimak.me>
* @copyright 2020, Hatim Kanchwala
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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