CHAPTER 03
3. PIPE, PCS, PMA와 controller의 책임을 나눈다
PIPE는 MAC/Controller와 PHY 사이의 논리 인터페이스입니다. board의 PCIe lane 신호와 동일하지 않으며, PIPE에서 보이는 상태가 analog lane에서 실제로 일어난 사건을 요약한 결과일 수 있습니다. 어떤 PIPE architecture를 썼는지 먼저 확인해야 debug signal의 주인을 올바르게 찾을 수 있습니다.
Tx path
Controller/Data Link/Transaction 계층에서 만들어진 데이터가 PCS encoding과 scrambling, lane distribution을 거쳐 PMA serializer와 transmitter를 통과합니다.
Rx path
PMA의 receiver, CDR와 deserializer를 지난 데이터가 PCS block alignment/decoding을 거쳐 controller의 LTSSM과 Data Link 계층으로 전달됩니다.
Traditional PIPE
PHY가 더 많은 PCS 기능을 포함하고 PIPE가 protocol-specific parallel data와 control을 전달하는 구성이 일반적입니다.
SerDes architecture
PIPE 5.x의 SerDes architecture는 protocol-specific PCS 기능 일부를 controller 쪽으로 이동시켜 PHY를 범용 SerDes에 가깝게 구성할 수 있습니다. 따라서 encoding 관련 error counter가 어느 bank에 있는지 달라집니다.
Rate change
Controller가 target rate와 power state 변경을 요청하고 PHY가 PLL/CDR/rate 전환을 완료한 뒤 status를 돌려줍니다. directed speed change가 멈추면 request와 acknowledgment 양쪽을 함께 봅니다.
Receiver detect
Controller가 detect 동작을 요청하고 PHY가 termination 감지 결과를 반환합니다. PLL lock만으로 receiver detect 성공을 대신할 수 없습니다.
계층별 실제 책임
| 계층 | Tx에서 하는 일 | Rx에서 하는 일 | 대표 관찰값 | 흔한 오판 |
|---|---|---|---|---|
| Transaction | Memory/Config/Message TLP 생성 | TLP routing과 completion 처리 | AER, requester/completer ID | TLP 오류를 PHY 오류로 부름 |
| Data Link | sequence/LCRC, replay, credit | ACK/NAK, duplicate/replay 처리 | replay/credit/DLL active | L0를 곧 forward progress로 봄 |
| LTSSM/Controller PCS | TS1/TS2, ordered set, 상태 제어 | training sequence 해석 | LTSSM state/history | controller state를 PHY state로 부름 |
| PHY PCS | encoding/scramble/gearbox 일부 | block align/deskew/elastic buffer 일부 | block lock, disparity/decoder error | PIPE architecture 차이를 무시 |
| PHY PMA | serializer, swing, preset 적용 | receiver, CDR, deserializer | PLL/CDR lock, Rx detect | lock 하나로 link-up 판정 |
| Channel/board | package/trace/connector 전송 | loss, crosstalk, reflection 영향 | eye/BER/TDR | software 재시도로 SI를 가림 |
PIPE에서 확인할 사건과 양쪽 증거
| 사건 | Controller 요청 | PHY 응답/상태 | 다음 LTSSM 변화 | 불일치 해석 |
|---|---|---|---|---|
| Receiver detect | detect request | lane별 detect result | Detect.Active→Polling | termination/PHY path 확인 |
| Power state | P0/P1/P2/P3 요청 | power state 완료 | L0/L0s/L1/L2 전환 | clock/power gate latency |
| Rate change | Gen target/rate request | PLL/rate complete | Recovery.Speed 진행 | PHY PLL profile와 timeout |
| Electrical idle | TxElecIdle | RxElecIdle 판단 | Polling/Recovery/power state | threshold와 lane 상태 |
| Rx status | 수신 데이터 해석 요청 | decode/elastic status | TS/ordered set 처리 | PCS 위치와 error source |
| Equalization control | preset/coefficient 요청 | 적용/FOM/status | Recovery.Equalization phase | controller와 PHY mailbox 경계 |
실제 검증 절차
| 순서 | 실행 | 남길 증거 | 판정 목적 |
|---|---|---|---|
| 1 | integration 문서에서 PIPE version, data width, clock mode와 SerDes architecture 여부를 적습니다. | 합성 report와 RTL wrapper port가 일치 | debug signal 위치를 확정 |
| 2 | LTSSM state와 PHY status를 동일 timestamp로 sampling합니다. | state transition 직전/직후 요청·응답 쌍 | 처음 어긋난 PIPE handshake 식별 |
| 3 | lane별 receiver detect, block lock, error counter를 분리합니다. | 모든 연결 lane가 같은 단계까지 진행 | x4→x1 축소의 물리 lane 식별 |
| 4 | Gen1 고정과 목표 generation을 비교합니다. | Gen1은 안정적이고 상위 Gen만 실패하는지 | 기본 연결과 equalization/SI를 분리 |
주의PIPE debug bus 이름과 bit 배치는 integration마다 다를 수 있습니다. 공개 Linux register offset을 PIPE signal offset처럼 쓰지 않습니다.
공개적으로 다시 확인할 수 있는 자료
공개되지 않은 vendor register나 integration별 offset을 추측해서 채우지 않았습니다. 아래 제조사 자료, architecture 문서와 Linux v6.18.37 원본에서 다시 확인할 수 있는 범위만 사용했습니다.
Synopsys PCIe 5.0 complete solution
Controller, PHY, verification IP가 별도 구성요소이며 PIPE 5.x와 SerDes architecture를 지원한다는 공개 제품 범위
Synopsys PCIe 5.0 PHY
PHY가 담당하는 SerDes, equalization, lane margining과 진단 기능의 공개 범위
Synopsys PIPE 5.1 SerDes architecture
기존 PIPE와 SerDes architecture에서 PCS 책임이 이동하는 이유
Linux v6.18.37 DWC header
DWC Port Logic, link debug, iATU와 eDMA 공개 register offset
Linux DWC Devicetree binding
clock, reset, PHY, lane, speed와 DWC resource description