Critical Link MityCam SoC Firmware  1.0
Critical Link MityCam SoC Firmware
tcTestPatternGenerator Class Reference

User Space Control Class for the MityCAM test_pattern_gen FPGA block. More...

#include <TestPatternGenerator.h>

Collaboration diagram for tcTestPatternGenerator:

Public Types

enum  teTestPatternMode {
  eeGradientX = 0, eeGradientY = 1, eeStaticCountUp = 2, eeFrameNumberCountUp = 3,
  eeStaticVal = 4, eeDEAD = 7
}
 

Public Member Functions

 tcTestPatternGenerator (uint32_t anControlAddress)
 Construct a new tc Test Pattern Generator::tc Test Pattern Generator object. More...
 
virtual ~tcTestPatternGenerator ()
 Destroy the tc Test Pattern Generator::tc Test Pattern Generator object. More...
 
bool initialized ()
 check and ensure the core has been properly inialized More...
 
int32_t reset (bool abOn)
 
int setPassThru (bool abPassThru)
 
int startTestPattern (bool abStart)
 
int setPatternTiming (uint16_t anWidth, uint16_t anHeight, int anPixelsPerClock, float anClockRateMHz, const std::chrono::microseconds &anTargetFrameInterval, unsigned int anVertBlankLines=2)
 
int setPatternMode (teTestPatternMode aeMode)
 
teTestPatternMode getPatternMode (void)
 
int setStaticVal (uint32_t val)
 
uint32_t getStaticVal (void)
 
void dumpState (void)
 Dump state of CORE to INFO status text. More...
 

Detailed Description

User Space Control Class for the MityCAM test_pattern_gen FPGA block.

Member Enumeration Documentation

◆ teTestPatternMode

Types of available test patterns the core can generate.

Enumerator
eeGradientX 

horizontal gradient

eeGradientY 

vertical gradient

eeStaticCountUp 

incrementing count for each new pixel in raster order. Count starts at static pixel value

eeFrameNumberCountUp 

incrementing count for each new pixel in raster order. Count starts at frames count

eeStaticVal 

constant pixel value

eeDEAD 

0x0000DEAD

Constructor & Destructor Documentation

◆ tcTestPatternGenerator()

tcTestPatternGenerator::tcTestPatternGenerator ( uint32_t  anControlAddress)

Construct a new tc Test Pattern Generator::tc Test Pattern Generator object.

Parameters
anControlAddress32 bit physical address the core is mapped to

◆ ~tcTestPatternGenerator()

tcTestPatternGenerator::~tcTestPatternGenerator ( )
virtual

Destroy the tc Test Pattern Generator::tc Test Pattern Generator object.

Member Function Documentation

◆ dumpState()

void tcTestPatternGenerator::dumpState ( void  )

Dump state of CORE to INFO status text.

◆ getPatternMode()

tcTestPatternGenerator::teTestPatternMode tcTestPatternGenerator::getPatternMode ( void  )
Returns
the current set test pattenr mode.

◆ getStaticVal()

uint32_t tcTestPatternGenerator::getStaticVal ( void  )
Returns
the programmed static value for test pattern generation logic.

◆ initialized()

bool tcTestPatternGenerator::initialized ( )

check and ensure the core has been properly inialized

Returns
true when memory map access has been established to the core
false when memory map access to the core was not established

◆ reset()

int32_t tcTestPatternGenerator::reset ( bool  abOn)

Enable / Disable core reset.

Note
the reset bit does not halt the test pattern data generation engine, it only disables the output frame creation from running (header_create block). In a similar way, asserting reset will also not stop frames from flowing if the passthru mode is enabled. You should probably make the appropriate calls to setPassThru() and startTestPattern() when using this routine.
Parameters
abOnwhen true, reset the core.
Returns
non-zero on error.

◆ setPassThru()

int tcTestPatternGenerator::setPassThru ( bool  abPassThru)

Enables passthru mode. This will override testpattern mode if it is enabled and could create a break in the stream data if the core is running test pattern data and not in reset.

Parameters
abPassThruwhen true, enable pass through mode.
Returns
non-zero on error.

◆ setPatternMode()

int tcTestPatternGenerator::setPatternMode ( teTestPatternMode  aeMode)

Set the test pattern type.

Parameters
aeModethe mode to drive
Returns
non-zero on error.

◆ setPatternTiming()

int tcTestPatternGenerator::setPatternTiming ( uint16_t  anWidth,
uint16_t  anHeight,
int  anPixelsPerClock,
float  anClockRateMHz,
const std::chrono::microseconds &  anTargetFrameInterval,
unsigned int  anVertBlankLines = 2 
)

Configure the width, height, horizontal (backside) and vertical (frontside) porch timing for test pattern generation based on the provided parameters.

Parameters
anWidthwidth of output in pixels
anHeightheight of output in pixels
anPixelsPerClocknumber of pixels per clock in the pipeline (must be known)
anClockRateMHzthe clock rate of the pipeline
anTargetFrameIntervalthe desired frame interval time, in microseconds
anVertBlankLinesthe desired number of blanking rows (default of 2)
Returns
non-zero on error.

◆ setStaticVal()

int tcTestPatternGenerator::setStaticVal ( uint32_t  val)

Sets the static value for the test pattern generation logic.

Parameters
valthe value
Returns
non-zero on error.

◆ startTestPattern()

int tcTestPatternGenerator::startTestPattern ( bool  abStart)

Start Test Pattern Engine. Start the test pattern engine internal data generation. This will have no effect if pass through is enabled. If reset is enabled, the output will not be generated until reset is released.

Parameters
abStartwhen true start test pattern generator data.
Returns
non-zero on error.

The documentation for this class was generated from the following files: