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 <atomic>
24#include <memory>
25#include <mutex>
26#include <string>
27#include <thread>
28
29#include "rogue/Logging.h"
30#include "rogue/Queue.h"
33
34namespace rogue {
35namespace hardware {
36namespace axi {
37
60 // AxiMemMap device file descriptor.
61 int32_t fd_;
62
63 // Logging
64 std::shared_ptr<rogue::Logging> log_;
65
67 protected:
68 std::unique_ptr<std::thread> thread_;
69 std::atomic<bool> threadEn_{false};
71
72 private:
73 // Background worker thread entry point.
74 void runThread();
75
76 // Queue
78
79 public:
94 static std::shared_ptr<rogue::hardware::axi::AxiMemMap> create(std::string path);
95
97 static void setup_python();
98
111 explicit AxiMemMap(std::string path);
112
114 ~AxiMemMap();
115
119 void stop();
120
126 void doTransaction(std::shared_ptr<rogue::interfaces::memory::Transaction> tran);
127};
128
130typedef std::shared_ptr<rogue::hardware::axi::AxiMemMap> AxiMemMapPtr;
131
132} // namespace axi
133} // namespace hardware
134}; // namespace rogue
135
136#endif
Thread-safe bounded queue with optional busy threshold.
Definition Queue.h:39
Memory-slave bridge for AXI register access via aes-stream-driver.
Definition AxiMemMap.h:59
void stop()
Stops worker thread and closes device handle.
Definition AxiMemMap.cpp:96
~AxiMemMap()
Destroys the AXI memory-map bridge instance.
Definition AxiMemMap.cpp:91
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.
Memory slave device.
Definition Slave.h:54
std::shared_ptr< rogue::hardware::axi::AxiMemMap > AxiMemMapPtr
Shared pointer alias for AxiMemMap.
Definition AxiMemMap.h:130