Electronic – Switch PCIe connections

connectorinterconnectpciestandardswitches

I'm trying to implement a PCI express switch; one lane from SoC and, two for mini PCIe ports. Something like the picture below.

enter image description here

But I'm confused with the Tx and Rx connections, the transmitter should be connected with the receiver in every connection, right?

enter image description here

But, the doubt occurs when in the reference schematics that I have for the switch, the connection in a male connector is Tx(of switch)-Rx(of port); like the picture above, and in a female connector is Tx(of switch)-Tx(of port); like the picture below.

enter image description here

Exists a sort of convention (standard or similar) for this kind of connection?

Best Answer

The signals are named from the point of view of the root complex, so anyone implementing a device that has an upstream facing port needs to be aware that they need to switch lanes.

I think it is a good idea to think independent from connectors here -- if you use PCIe internally on a single board, you have to swap, even if you don't have a male connector, and if you're building a riser card, you have a male connector but should not swap.