rogue
Loading...
Searching...
No Matches
AxiMemMap.h
Go to the documentation of this file.
1
17#ifndef __ROGUE_HARDWARE_AXI_MEM_MAP_H__
18#define __ROGUE_HARDWARE_AXI_MEM_MAP_H__
19#include "rogue/Directives.h"
20
21#include <stdint.h>
22
23#include <memory>
24#include <mutex>
25#include <string>
26#include <thread>
27
28#include "rogue/Logging.h"
29#include "rogue/Queue.h"
32
33namespace rogue {
34namespace hardware {
35namespace axi {
36
59 // AxiMemMap device file descriptor.
60 int32_t fd_;
61
62 // Logging
63 std::shared_ptr<rogue::Logging> log_;
64
65 std::thread* thread_;
66 bool threadEn_;
67
68 // Background worker thread entry point.
69 void runThread();
70
71 // Queue
73
74 public:
89 static std::shared_ptr<rogue::hardware::axi::AxiMemMap> create(std::string path);
90
92 static void setup_python();
93
106 explicit AxiMemMap(std::string path);
107
109 ~AxiMemMap();
110
114 void stop();
115
121 void doTransaction(std::shared_ptr<rogue::interfaces::memory::Transaction> tran);
122};
123
125typedef std::shared_ptr<rogue::hardware::axi::AxiMemMap> AxiMemMapPtr;
126
127} // namespace axi
128} // namespace hardware
129}; // namespace rogue
130
131#endif
Thread-safe bounded queue with optional busy threshold.
Definition Queue.h:38
Memory-slave bridge for AXI register access via aes-stream-driver.
Definition AxiMemMap.h:58
void stop()
Stops worker thread and closes device handle.
Definition AxiMemMap.cpp:87
~AxiMemMap()
Destroys the AXI memory-map bridge instance.
Definition AxiMemMap.cpp:82
static void setup_python()
Registers Python bindings for this class.
static std::shared_ptr< rogue::hardware::axi::AxiMemMap > create(std::string path)
Creates an AXI memory-map bridge instance.
Definition AxiMemMap.cpp:50
void doTransaction(std::shared_ptr< rogue::interfaces::memory::Transaction > tran)
Queues a memory transaction for asynchronous register execution.
Definition AxiMemMap.cpp:98
Memory slave device.
Definition Slave.h:54
std::shared_ptr< rogue::hardware::axi::AxiMemMap > AxiMemMapPtr
Shared pointer alias for AxiMemMap.
Definition AxiMemMap.h:125