<!– SPDX-FileCopyrightText: 2026 Ahmed Imamović SPDX-FileCopyrightText: 2026 Tarik Hamedović SPDX-License-Identifier: CC-BY-SA-4.0 –>

csr_snapshot_fifo

This module implements atomic control snapshots from the sys domain into the uc domain.

class uberclock_soc.csr_snapshot_fifo.CsrConfigSnapshotFIFO(*args: Any, **kwargs: Any)[source]

Bases: LiteXModule

Atomic CSR config transfer from SYS -> UC.

Software writes any number of CSRs, then strobes commit to enqueue one packed config frame. UC pops frames from an AsyncFIFO and updates shadow registers atomically (all fields change on the same UC cycle).

For each field name “foo”, this module exports a UC-domain shadow register:

self.cfg_foo_uc

FIFO_FLAG_READABLE_BIT = 0
FIFO_FLAG_WRITABLE_BIT = 1
FIFO_FLAG_RESERVED_BITS = 6