gokul/usb3-sd-hub
Engineering draft: four-layer, computer-powered USB 3 hub with one USB-C host socket, two USB-C and two USB-A accessory sockets, and a full-size SD slot. Board and three schematic previews are available. Routing and production checks are incomplete; not fabrication ready.
- Version
- 0.1.4
- License
- unset
- Stars
- 0
components/HighSpeedRouting.tsx
import { Fragment } from "react";
const pairedPorts = [
["U_HUB.UP_TXP", "U_HUB.UP_TXN"],
["U_UP_MUX.TXp", "U_UP_MUX.TXn"],
["U_HUB.UP_RXP", "U_HUB.UP_RXN"],
["U_HUB.D1_TXP", "U_HUB.D1_TXN"],
["U_C1_MUX.TXp", "U_C1_MUX.TXn"],
["U_HUB.D1_RXP", "U_HUB.D1_RXN"],
["U_HUB.D2_TXP", "U_HUB.D2_TXN"],
["U_HUB.D3_TXP", "U_HUB.D3_TXN"],
["U_HUB.D4_TXP", "U_HUB.D4_TXN"],
["U_C4_MUX.TXp", "U_C4_MUX.TXn"],
["U_HUB.D4_RXP", "U_HUB.D4_RXN"],
];
export const HighSpeedRouting = () => (
<>
{pairedPorts.map((pair, phaseIndex) =>
pair.map((port) => {
const [component, pin] = port.split(".");
const prefix =
component === "U_UP_MUX"
? "UP"
: component === "U_C1_MUX"
? "D1"
: "D4";
const netName =
component === "U_HUB"
? pin
: `${prefix}_${pin === "TXp" ? "TXP" : "TXN"}_AC`;
return (
<Fragment key={netName}>
<net
name={netName}
routingPhaseIndex={phaseIndex}
nominalTraceWidth={0.136}
/>
</Fragment>
);
}),
)}
{pairedPorts.map(([positive, negative]) => (
<Fragment key={positive}>
<differentialpair
name={`${positive.replaceAll(".", "_")}_PAIR`}
positiveConnection={positive}
negativeConnection={negative}
pcbTraceGap={0.15}
maxLengthSkew={0.15}
maxUncoupledLength={2}
targetDifferentialImpedance="90±10ohm"
pcbSpacingToOtherSignals="3w"
/>
</Fragment>
))}
{pairedPorts.map((pair, phaseIndex) => (
<Fragment key={pair[0]}>
<autoroutingphase
name={`Coupled pair ${pair[0]}`}
phaseIndex={phaseIndex}
autorouter="auto-local"
connections={pair}
/>
</Fragment>
))}
</>
);