Expand description
Register addresses and per-register encoding and decoding for the SCDC register map (HDMI 2.1 §10.4), without I/O.
Scdc uses these to turn register bytes into culvert’s types and back;
culvert-async’s client uses the same functions, so the register map exists once. A
client only performs the reads and writes: which registers each operation touches is
given by the address constants here.
The constants cover every register culvert accesses, plus the CED checksum, which is
documented but not decoded yet. Update_1 (0x11), Test_Config_0 (0xC0) and the
manufacturer identification registers (0xD0 onwards) are described in
doc/roadmap.md.
Constants§
- CED_
REGISTERS - The registers
decode_cedtakes, in order: each lane’s low and high byte, skipping the checksum at 0x56. - CONFIG_
0 Config_0(§10.4.4).- CONFIG_
1 Config_1(§10.4.4).- ERR_
DET_ 0_ H ERR_DET_0_H(§10.4.5).- ERR_
DET_ 0_ L ERR_DET_0_L(§10.4.5).- ERR_
DET_ 1_ H ERR_DET_1_H(§10.4.5).- ERR_
DET_ 1_ L ERR_DET_1_L(§10.4.5).- ERR_
DET_ 2_ H ERR_DET_2_H(§10.4.5).- ERR_
DET_ 2_ L ERR_DET_2_L(§10.4.5).- ERR_
DET_ 3_ H ERR_DET_3_H(§10.4.5).- ERR_
DET_ 3_ L ERR_DET_3_L(§10.4.5).- ERR_
DET_ CHECKSUM - The checksum over the CED registers (§10.4.5); documented, not decoded yet.
- RS_
CORRECTION_ H RS_Correction_H: the Reed-Solomon correction count, high byte (FRL).- RS_
CORRECTION_ L RS_Correction_L: the Reed-Solomon correction count, low byte (FRL).- SCRAMBLER_
STATUS Scrambler_Status(§10.4.3).- SINK_
VERSION Sink_Version(§10.4.1).- SOURCE_
TEST_ CONFIG Source_Test_Configuration(§10.4.4).- SOURCE_
VERSION Source_Version(§10.4.1).- STATUS_
FLAGS_ 0 Status_Flags_0(§10.4.4).- STATUS_
FLAGS_ 1 Status_Flags_1(§10.4.4): link training requests for lanes 0–1.- STATUS_
FLAGS_ 2 Status_Flags_2(§10.4.4): link training requests for lanes 2–3.- TMDS_
CONFIG TMDS_Config(§10.4.3).- UPDATE_
0 Update_0(§10.4.2).Update_1(0x11) defines no fields in the HDMI 2.1 implementations this map is based on, so it is not accessed.
Functions§
- decode_
ced - Decodes the per-lane character error counts from the bytes of
CED_REGISTERS, in that order. Each high byte’s bit 7 is a validity flag; a lane whose flag is clear isNone. - decode_
ltp_ requests - Decodes the per-lane link training requests from
Status_Flags_1(lanes 0–1) andStatus_Flags_2(lanes 2–3), one nibble per lane, low nibble first. - decode_
rs_ correction - Decodes the Reed-Solomon correction count from
RS_Correction_L/H;Noneif the high byte’s validity bit (bit 7) is not set. - decode_
scrambler_ status - Decodes
Scrambler_Status: the sink confirms TMDS scrambling is active (bit 0). - decode_
source_ test_ config - Decodes
Source_Test_Configuration. Bits 0 and 4 are reserved. - decode_
status_ flags - Decodes
Status_Flags_0: clock detection, lane lock,FLT_Readyand DSC decode failure. - decode_
update_ flags - Decodes
Update_0. - encode_
clear_ update_ flags - Encodes the
Update_0write that clears the flags set inflags(write 1 to clear).RR_Test(bit 2) is never written:ClearableUpdateFlagshas no field for it. - encode_
config_ 0 - Encodes
Config_0:RR_Enable(bit 0) andFLT_No_Retrain(bit 1). - encode_
config_ 1 - Encodes
Config_1:FRL_Ratein bits[3:0] andFFE_Levelsin bits[7:4]. - encode_
tmds_ config - Encodes
TMDS_Config:Scrambling_Enable(bit 0) andTMDS_Bit_Clock_Ratio(bit 1).