this is tricky
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2023-03-23 15:43:14 +01:00
parent dda8261fc3
commit 493f89e0cb
9 changed files with 70 additions and 44 deletions

View File

@ -51,16 +51,21 @@ class PapbVcInterface : public VirtualChannelIF {
/**
* Configuration bits:
* bit[1:0]: Size of data (1,2,3 or 4 bytes). 1 Byte <=> b00
* bit[2]: Set this bit to 1 to abort a transfered packet
* bit[2]: Set this bit to 1 to abort a transferred packet
* bit[3]: Signals to VcInterface the start of a new telemetry packet
*/
static const uint32_t CONFIG_START = 0x8;
static constexpr uint32_t CONFIG_START = 0b00001000;
/**
* Abort a transferred packet.
*/
static constexpr uint32_t CONFIG_ABORT = 0b00000100;
/**
* Writing this word to the VcInterface base address signals to the virtual channel interface
* that a complete tm packet has been transferred.
*/
static const uint32_t CONFIG_END = 0x0;
static constexpr uint32_t CONFIG_END = 0x0;
/**
* Writing to this offset within the memory space of a virtual channel will insert data for
@ -79,7 +84,7 @@ class PapbVcInterface : public VirtualChannelIF {
std::string uioFile;
int mapNum = 0;
uint32_t* vcBaseReg = nullptr;
volatile uint32_t* vcBaseReg = nullptr;
uint32_t vcOffset = 0;
@ -89,11 +94,13 @@ class PapbVcInterface : public VirtualChannelIF {
*/
void startPacketTransfer();
void abortPacketTransfer();
/**
* @brief This function sends the config byte to the virtual channel interface of the PTME
* IP Core to signal the end of a packet transfer.
*/
void endPacketTransfer();
void completePacketTransfer();
/**
* @brief This function reads the papb busy signal indicating whether the virtual channel