  We outline the development of the readout software for the Prime-Cam and
Mod-Cam instruments on the CCAT Fred Young Submillimeter Telescope (FYST),
primecam_readout. The instruments feature lumped-element kinetic inductance
detector (LEKID) arrays driven by Xilinx ZCU111 RFSoC boards. In the current
configuration, each board can drive up to 4000 KIDs, and Prime-Cam is
implementing approximately 25 boards. The software runs on a centralized
control computer connected to the boards via dedicated ethernet, and
facilitates such tasks as frequency-multiplexed tone comb driving, comb
calibration and optimization, and detector timestream establishment. The
control computer utilizes dynamically generated control channels for each
board, allowing for simultaneous parallel control over all, while uniquely
tracking diagnostics for each. This work demonstrates a scalable RFSoC readout
architecture where computational demands increase linearly with the number of
detectors, enabling control of tens-of-thousands of KIDs with modest hardware,
and opening the door to the next generation of KID arrays housing millions of
detectors.
