Firmware selects the format in PIXEL_TYPE and writes the matching CoaXPress pixel format code
into the image header registers. The code is {layout, bit depth on the link}:
| Layout | 8-bit | 10-bit | 12-bit | 14-bit | 16-bit | Components, LSB first | Built by |
|---|---|---|---|---|---|---|---|
| Mono / Bayer / Raw | 0x08 | 0x09 | 0x0A | 0x0B | 0x0C | the sample | VID_EN_MONO |
| RGB | 0x18 | 0x19 | 0x1A | 0x1B | 0x1C | G, B, R | VID_EN_RGB |
| YCbCr 4:4:4 | 0x28 | 0x29 | 0x2A | 0x2B | 0x2C | Y, Cb, Cr | VID_EN_YCBCR444 |
| YCbCr 4:2:2 | 0x38 | 0x39 | 0x3A | 0x3B | 0x3C | Y, C (Cb even pixels, Cr odd) | VID_EN_YCBCR422 |
| YCbCr 4:2:0 | 0x48 | 0x49 | 0x4A | 0x4B | 0x4C | Y, C (C on even lines only) | VID_EN_YCBCR420 |
- Built by switch. Each layout has a switch in the IP GUI and Bit depths on the link picks the depths. Mono / Bayer at every depth is the default. With everything on, one build carries 25 formats.
VIDEO_CAPreports what was built, andPIXEL_TYPE.NOT_BUILTflags a code the bitstream has no path for. - Run-time selection. A write to
PIXEL_TYPErestarts the pixel packers with the new format. Write it with the acquisition stopped. - YCbCr 4:2:0. CoaXPress has no packed 4:2:0 format. The core takes UG934 4:2:0 on
video_in, keeps the chroma of each even line in a line store and sends it again with the odd line, so the link carries a normal YCbCr 4:2:2 picture that any Host shows. The store is sized by Widest YCbCr 4:2:0 line, 1,024 to 16,384 pixels: two BRAM36 at the default 4,096.
2.4.1Lines and frames
- A line is a multiple of 4 pixels; for YCbCr 4:2:2 and 4:2:0 a multiple of
VID_PPCis enough. - Every line starts in a new link word, and the last word of a line is zero-padded as CoaXPress 2.1 requires.
- Everything before the first
tuseris discarded, so the first frame sent is a whole frame. Atuserinside a line starts a new frame and is flagged. - Line and frame size are checked against
CXP_IMG_XSIZEandCXP_IMG_YSIZE; a mismatch sets an error flag inCXP_ERRORS_HS.
2.4.2Throughput
| Format | 2 pixels per beat | 4 pixels per beat | Mpx/s at CXP-12 |
|---|---|---|---|
| Mono / Bayer 8-bit | 50 % | 100 % | 1220 |
| Mono / Bayer 10-bit | 62 % | 100 % | 976 |
| Mono / Bayer 12-bit | 75 % | 100 % | 813 |
| Mono / Bayer 14-bit | 87 % | 100 % | 697 |
| Mono / Bayer 16-bit | 100 % | 100 % | 610 |
| YCbCr 4:2:2 8 / 10 / 12-bit | 100 % | 100 % | 610 / 488 / 407 |
| RGB or YCbCr 4:4:4 8 / 10 / 12-bit | 100 % | 100 % | 407 / 325 / 271 |
The video clock must carry the pixel rate: video_in_clk ≥ pixels per second /
VID_PPC. When the link is slower than the source, video_in_tready pushes back;
size the source’s own buffering for the frame rate the link carries.