29 lines
487 B
C++
29 lines
487 B
C++
#pragma once
|
|
|
|
#include <cinttypes>
|
|
#include <deque>
|
|
|
|
class DataChannelSimulation {
|
|
public:
|
|
DataChannelSimulation();
|
|
~DataChannelSimulation();
|
|
|
|
uint32_t read( uint32_t offset );
|
|
void write( uint32_t offset, uint32_t value );
|
|
|
|
private:
|
|
uint32_t read();
|
|
void write( uint32_t value );
|
|
|
|
uint32_t isEmpty() const;
|
|
uint32_t isFull() const;
|
|
|
|
void clear();
|
|
|
|
std::deque< uint32_t > fifo;
|
|
uint32_t config;
|
|
|
|
static const uint32_t MAX_SIZE = 1024;
|
|
};
|
|
|