seveibar/f1c1990s-dev-board

This code manages the entire PCB assembly process for a computer hardware module, including component placement, schematic integration, automated routing, copper pouring, and design rule checks, focused on a four-layer carrier board with integrated support components and connectors.

Version
1.8.0
License
unset
Stars
0

modules/f1c100s/src/ProfilePreview.tsx

import { joinSavedPathExits } from "./saved-paths";
import { EXTERNAL_NETS } from "./pin-map";
import {
	F1C100SModule,
	F1C100SLcdSchematicBox,
	F1C100SStorageSchematicBox,
	F1C100SGpioSchematicBox,
	F1C100SAudioSchematicBox,
	F1C100SVideoTouchSchematicBox,
	F1C100SSystemSchematicBox,
	F1C100SPowerSchematicBox,
} from "./index";
import { MODULE_SIZE, type LayoutProfile } from "./profiles";

export function ProfilePreview({
	layoutProfile,
}: {
	layoutProfile: LayoutProfile;
}) {
	return (
		<board
            autorouter={{ local: true, algorithmFn: joinSavedPathExits }}
			width={MODULE_SIZE}
			height={MODULE_SIZE}
			layers={4}
			minTraceWidth={0.12}
			minViaPadDiameter={0.45}
			minViaHoleDiameter={0.2}
			schLayout={{ layoutMode: "relative" }}
		>
			{/* Pours belong to the carrier/preview board, around the stored routes. */}
			<net name="GND" />
			{(["top", "inner1", "inner2", "bottom"] as const).map((layer) => (
				<copperpour
					{...{ key: layer }}
					name={`GND_${layer}`}
					layer={layer}
					connectsTo="net.GND"
					clearance={0.15}
					boardEdgeMargin={0.3}
					useThermalReliefs
					coveredWithSolderMask
				/>
			))}
			<schematicsheet
				name="interfaces"
				displayName="F1C100S — interfaces"
				sheetSize="A4"
			>
				<schematicsection name="lcd" displayName="RGB666 LCD" />
				<schematicsection name="storage" displayName="SPI / SDMMC" />
				<schematicsection name="gpio" displayName="UART / I²C / GPIO" />
				<schematicsection name="audio" displayName="Audio" />
				<schematicsection name="video" displayName="Video / touch" />
				<schematicsection name="system" displayName="Clock / reset / USB" />
				<F1C100SLcdSchematicBox
					moduleName="SOC"
					schX={-10}
					schY={5}
					schSectionName="lcd"
				/>
				<F1C100SStorageSchematicBox
					moduleName="SOC"
					schX={-1}
					schY={5}
					schSectionName="storage"
				/>
				<F1C100SGpioSchematicBox
					moduleName="SOC"
					schX={8}
					schY={5}
					schSectionName="gpio"
				/>
				<F1C100SAudioSchematicBox
					moduleName="SOC"
					schX={-10}
					schY={-4}
					schSectionName="audio"
				/>
				<F1C100SVideoTouchSchematicBox
					moduleName="SOC"
					schX={-1}
					schY={-4}
					schSectionName="video"
				/>
				<F1C100SSystemSchematicBox
					moduleName="SOC"
					schX={8}
					schY={-4}
					schSectionName="system"
				/>
			</schematicsheet>
			<schematicsheet
				name="power"
				displayName="F1C100S — power and support"
				sheetSize="A4"
			>
				<F1C100SModule
					name="SOC"
					layoutProfile={layoutProfile}
					schematicLayout="custom"
					connections={Object.fromEntries(EXTERNAL_NETS.map(n => [n, `net.${n}`]))}
				/>
				<schematicsection name="power_pins" displayName="Power" />
				<F1C100SPowerSchematicBox
					moduleName="SOC"
					schX={-11}
					schY={6.5}
					schSectionName="power_pins"
				/>
			</schematicsheet>
		</board>
	);
}