Critical Link MityCam SoC Firmware  1.0
Critical Link MityCam SoC Firmware
tcU3VFX3Core.h
Go to the documentation of this file.
1 /*
2  * tcU3VFX3Core.h
3  *
4  * Created on: Oct 13, 2017
5  * Author: mitydsp
6  */
7 
8 #ifndef TCU3VFX3CORE_H_
9 #define TCU3VFX3CORE_H_
10 
11 #include <cstdint>
12 
13 #include <libfpga/fpgaregister.h>
14 
15 class tcU3VFX3Core {
16 public:
17  tcU3VFX3Core(uint32_t anAddress);
18  virtual ~tcU3VFX3Core();
19 
20  uint32_t version();
21 
22  void reset(bool abReset);
23  void enable(bool abEnable);
24 
28  bool transferError();
29 
30  void latchTimestamp();
31  uint64_t timestamp();
32 
33  void setFrameSize(uint16_t anX, uint16_t anY);
34  void setFrameOffsets(uint16_t anX, uint16_t anY);
35 
36  void setPixelFormat(uint32_t anPixelFormat);
37  void setSIRMTransferSize(uint32_t anTransferSize);
38  void setSIRMTransferCount(uint32_t anTransferCount);
39  void setSIRMFT1(uint32_t anFT1);
40  void setSIRMFT2(uint32_t anFT2);
41 
42  uint32_t SIRMBytes();
43  void setOverrun(bool abSet);
44 
45  void setBytesPerFrame(uint32_t anNumBytes);
46 
47  // Requests that the currently running transactions stall.
48  void stall(bool abStall);
49  bool isStalled();
50 
51  // Sets a stall between N number of packets for Y number of 100MHz clock cycles.
52  void setInterPacketStall(int anNumberOfPackets, int anNumClockCycles);
53 
54 private:
55  void setBit(bool abSet, uint32_t anOffset, uint32_t anBit);
56 
57  tcFPGARegister<uint32_t> mhRegister;
58 
59  uint32_t mnSirmCount, mnSirmTs, mnSirmFt1, mnSirmFt2;
60 };
61 
62 #endif /* TCU3VFX3CORE_H_ */
tcU3VFX3Core::enable
void enable(bool abEnable)
Definition: tcU3VFX3Core.cpp:59
tcU3VFX3Core::setInterPacketStall
void setInterPacketStall(int anNumberOfPackets, int anNumClockCycles)
Definition: tcU3VFX3Core.cpp:131
tcU3VFX3Core::setBytesPerFrame
void setBytesPerFrame(uint32_t anNumBytes)
Definition: tcU3VFX3Core.cpp:116
tcU3VFX3Core::setOverrun
void setOverrun(bool abSet)
Definition: tcU3VFX3Core.cpp:157
tcU3VFX3Core::setFrameOffsets
void setFrameOffsets(uint16_t anX, uint16_t anY)
Definition: tcU3VFX3Core.cpp:147
tcU3VFX3Core::version
uint32_t version()
Definition: tcU3VFX3Core.cpp:49
tcU3VFX3Core::setFrameSize
void setFrameSize(uint16_t anX, uint16_t anY)
Definition: tcU3VFX3Core.cpp:142
tcU3VFX3Core::latchTimestamp
void latchTimestamp()
Definition: tcU3VFX3Core.cpp:76
tcU3VFX3Core::setSIRMTransferSize
void setSIRMTransferSize(uint32_t anTransferSize)
Definition: tcU3VFX3Core.cpp:92
tcU3VFX3Core::~tcU3VFX3Core
virtual ~tcU3VFX3Core()
Definition: tcU3VFX3Core.cpp:45
tcU3VFX3Core::transferError
bool transferError()
Definition: tcU3VFX3Core.cpp:64
tcU3VFX3Core
Definition: tcU3VFX3Core.h:15
tcU3VFX3Core::stall
void stall(bool abStall)
Definition: tcU3VFX3Core.cpp:121
tcU3VFX3Core::setPixelFormat
void setPixelFormat(uint32_t anPixelFormat)
Definition: tcU3VFX3Core.cpp:137
tcU3VFX3Core::timestamp
uint64_t timestamp()
Definition: tcU3VFX3Core.cpp:81
tcU3VFX3Core::setSIRMFT2
void setSIRMFT2(uint32_t anFT2)
Definition: tcU3VFX3Core.cpp:110
tcU3VFX3Core::setSIRMFT1
void setSIRMFT1(uint32_t anFT1)
Definition: tcU3VFX3Core.cpp:104
tcU3VFX3Core::setSIRMTransferCount
void setSIRMTransferCount(uint32_t anTransferCount)
Definition: tcU3VFX3Core.cpp:98
tcU3VFX3Core::isStalled
bool isStalled()
Definition: tcU3VFX3Core.cpp:126
tcU3VFX3Core::SIRMBytes
uint32_t SIRMBytes()
Definition: tcU3VFX3Core.cpp:152
tcU3VFX3Core::tcU3VFX3Core
tcU3VFX3Core(uint32_t anAddress)
Definition: tcU3VFX3Core.cpp:36
tcU3VFX3Core::reset
void reset(bool abReset)
Definition: tcU3VFX3Core.cpp:54