This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DS90UB954-Q1: Pattern generator settings to produce RAW12

Part Number: DS90UB954-Q1

Hi,

I try to program the DS90UB954 pattern generator to generate RAW12 bars. Since RAW12 has 12 bit per pixel I assumed that I have to program the PG with 3 byte blocks (12b+12b=24b=3B) but the PG seems to output only 8 bit of my programmed 12 bit per pixel.

In detail:

I program the PG with the following register settings:

Reg:IND+0x02 Value: 0x33 // PGEN_CFG : 8 color Bars; Blocksize=3 bytes (2*12bit=3Byte)
Reg:IND+0x03 Value: 0x2C // PGEN_CSI_DI : virtual channel=0; CSI-Header dataType=RAW12 (0x2C)

Reg:IND+0x04 Value: 0x0B // PGEN_LINE_SIZE1 : MSB of NumBytesPerLine[byte]
Reg:IND+0x05 Value: 0x4C // PGEN_LINE_SIZE0 : LSB of NumBytesPerLine[byte] : 1928Px*1.5=2892 Byte/Line = 0xB4c

Reg:IND+0x06 Value: 0x01 // PGEN_BAR_SIZE1 : MSB of ColorBar[byte]
Reg:IND+0x07 Value: 0x68 // PGEN_BAR_SIZE0 : LSB of ColorBar[byte] : 120*3 Byte = 360 = 0x168

Reg:IND+0x08 Value: 0x04 // PGEN_ACT_LPF1 : MSB of ActiveLinesPerFrame
Reg:IND+0x09 Value: 0xB8 // PGEN_ACT_LPF0 : LSB of ActiveLinesPerFrame : 1208 Lines = 0x4B8

Reg:IND+0x0A Value: 0x04 // PGEN_TOT_LPF1 : MSB of TotalNumberLinesPerFrame
Reg:IND+0x0B Value: 0xBC // PGEN_TOT_LPF0 : LSB of TotalNumberLinesPerFrame: 1 + 1208 + 1 + 2 Lines = 1212 = 0x4BC

Reg:IND+0x0C Value: 0x08 // PGEN_LINE_PD1 : MSB of LinePeriod[10ns]
Reg:IND+0x0D Value: 0x7B // PGEN_LINE_PD0 : LSB of LinePeriod[10ns] : 100M/Fps/totalLines = 100M/38/1212=2171 = 0x87B

Reg:IND+0x0E Value: 0x01 // PGEN_VBP : VerticalFrontPorch[Lines] : 1 Line
Reg:IND+0x0F Value: 0x01 // PGEN_VFP : VerticalBackPorch[Lines] : 1 Line

Reg:IND+0x10 Value: 0xFF // StreamByte0 Px0H
Reg:IND+0x11 Value: 0x00 // StreamByte1 PX1H
Reg:IND+0x12 Value: 0x0F // StreamByte2 Px1L+Px0L
Reg:IND+0x13 Value: 0xAA // StreamByte3 Px2H
Reg:IND+0x14 Value: 0x55 // StreamByte4 PX3H
Reg:IND+0x15 Value: 0x5A // StreamByte5 Px3L+Px2L
Reg:IND+0x16 Value: 0x00 // StreamByte6 Px4H
Reg:IND+0x17 Value: 0x00 // StreamByte7 PX5H
Reg:IND+0x18 Value: 0x1F // StreamByte8 Px5L+Px4L
Reg:IND+0x19 Value: 0x00 // StreamByte9 Px6H
Reg:IND+0x1A Value: 0x00 // StreamByteA PX7H
Reg:IND+0x1B Value: 0x2E // StreamByteB Px7L+Px6L
Reg:IND+0x1C Value: 0x00 // StreamByte9 Px6H
Reg:IND+0x1D Value: 0x00 // StreamByteA PX7H
Reg:IND+0x1E Value: 0x3D // StreamByteB Px7L+Px6L

Reg:IND+0x01 Value: 0x01, // PGEN_CTL : enable pattern generator

With these settings I'd expected (and intended) the pattern generator to output the following sequence:

0xFF,0x00,0xF0, 0xFF,0x00,0xF0, 0xFF,0x00,0xF0, .. 0xAA,0x55,0x5A,0xAA,0x55,0x5A,0xAA,0x55,0x5A,..

which would mean those pixels to be sent:

0xFFF, 0x000, 0xFFF, 0x000, 0xFFF, 0x000,.. 0xAAA, 0x555, 0xAAA, 0x555, 0xAAA, 0x555, 0xAAA, 0x555, , ...

But what I see is this:

0xFF,0xFF,0xFF, .. 0x00, 0x00, 0x00, .. 0x0F, 0x0F, 0x0F, ..

which would mean those pixels to be sent:

0xFFF, 0xFFF, 0xFFF, 0xFFF, ... , 0x000, 0x000, 0x000, 0x000, ... 0xF0F, 0xF00, 0xF0F, 0xF00,...

Is my setting wrong?

How can I output pixels with values larger than a byte?

Best regards,

Juergen

  • Hello Juergen,

    The pattern generator has two modes.

    In reference mode, the pattern generator produces bars of low, middle, and high frequency signals. This is the mode that you are in. The default values are 0xAA, 0x33, 0x0F (high, low and middle frequency), but you have overwritten them in the color registers and are generating solid bars of color, each according to the value programmed in its register. (In other words, COLOR0 address 0x10 determines the color for bar 0. COLOR1 address 0x11 produces the color for bar 1). This is why you are seeing 0xFF 0xFF … and then 0x00  0x00… The changes in values you see are the shifts between different bars.

    In fixed mode, you can choose to alternate between pixels. Therefore, by programming a block size of 15, you are repeating a pattern of 15 bytes and can alternate between 10 different pixels. With your color register configuration, in 8 bar fixed pattern mode, the output be a repeated stream of these bytes:

    0xFF, 0x00, 0x0F, 0xAA, 0x55, 0x5A, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x2E, 0x00, 0x00, 0x3D which would be pixels 0xFFF 0x000 0xAAA and so on.

    Set bit 7 of the PGEN_CONFIG register to enable fixed pattern.

    Unfortunately, the pattern generator cannot be configured in reference mode to read more than one byte per bar.

    In fixed mode, more control is given over the pixel values, andthe pattern alternates between the all the registers included in that block size.

    Regards,

    Carrie

  • Hello Carrie,

    thank you for your answer. It works now.

    Great explanation. You should write the manuals...

    Regards,