It is responsible of receiving commands through UART receiver to do different system functions as register file reading/writing or doing some processing using ALU block and send result using up to 4 bytes frame through UART transmitter communication protocol
The Low Power Configurable Multi-Clock Digital System is a sophisticated digital design realized in Verilog HDL. It serves as a versatile platform, receiving commands through a UART (Universal Asynchronous Receiver-Transmitter) receiver. It executes a wide range of system functions, including register file operations and complex computations via the ALU (Arithmetic Logic Unit) block. Subsequently, the system transmits results using a 4-byte frame through UART communication.
The system receives a UART Frame from the UART RX block, the first frame determines the needed command, the system offers 4 different operations:
- Register File Write command
- Register File Read command
- ALU Operation command with operand
- ALU Operation command with No operand
The UART RX parallel data undergoes synchronization before being sent to the System Controller due to the discrepancy in clock domains. The System Controller operates on a 50 MHz REF CLK, while the UART RX functions on a 3.6864 MHz clock. Synchronizing the data is crucial in ensuring its integrity during transfer.
After synchronization, the data enters the System Controller, which determines the required operation and configures the necessary control signals. Here's how the System Controller manages different tasks:
-
Register File Write Operation (0xAA):
-It enables the
WrEn
signal of the Register File, indicating a write operation.-The desired
Address
for writing is specified. -
Register File Read Operation (0xBB):
-It enables the
RdEn
signal of the Register File, indicating a read operation.-The desired
Address
for reading is specified.-The data is retrieved from the Register File and sent to the UART TX.
However, the UART TX operates on a different clock frequency, specifically 115.2 KHz. To prevent data loss due to clock domain crossing (CDC), a
FIFO
(First-In-First-Out) buffer is strategically placed just before the UART TX. This buffer ensures the orderly transmission of data without loss or corruption.
-
ALU (Arithmetic Logic Unit) Operation (0xCC):
-It activates the
ALU_EN
signal of the ALU, signaling the start of an ALU operation.-The
CLK GATE
is enabled to activate theALU CLK
, synchronizing it with the ALU operation.-The operands required for the operation are obtained from the Register File at the predefined addresses.
-The desired function for the ALU operation is conveyed using the
ALU_FUN
signal.-The result of the ALU operation (
ALU_OUT
) is passed to the System Controller.-From there, it is sent to the FIFO for subsequent transmission to the UART TX and, ultimately, to the master.
-
ALU Operation without Operand Change (0xDD):
-This configuration allows the ALU to perform an operation without altering the operands previously defined in the Register File.
These well-defined steps ensure efficient data management and processing within the Low Power Configurable Multi-Clock Digital System, even when dealing with disparate clock frequencies and multiple operations.
To address the presence of multiple clock domains within the system, we have implemented synchronizers.
As mentioned earlier, a Data Synchronizer is introduced after the UART RX stage. This addition is essential to prevent the occurrence of metastability in the output byte from the UART RX when it interfaces with the SYS CTRL block.
Furthermore, to mitigate metastability issues during the de-assertion of the reset signal, we have incorporated two Reset Synchronizers. Each of these synchronizers is integrated into its respective clock domain group, ensuring that reset signals are effectively synchronized across the system.
To accommodate various configurations for UART sampling, we connect the highest required frequency to the i_uart_clk port. Subsequently, we utilize a clock divider to generate both the UART RX Clock and the UART TX Clock
This system consists of ten distinct blocks, each contributing to its overall functionality. Let's delve into these blocks:
The RegFile block serves as a data storage unit, facilitating efficient data storage and retrieval operations.
The ALU is the computational powerhouse of the system, capable of executing a variety of arithmetic and logic operations.
The Clock Gating block optimizes power consumption by controlling clock signals during idle periods, reducing dynamic power consumption.
SYS_CTRL acts as the central hub of the system. It receives external commands, orchestrates operations across different blocks, and communicates results.
UART_TX is responsible for transmitting data to an external device or master via UART communication.
UART_RX receives incoming data and commands from external sources, facilitating communication with the system.
PULSE_GEN generates pulse signals as needed within the system, contributing to various internal operations.
Clock Dividers are essential for generating clocks with different frequencies and ratios, enabling precise control over timing.
The RST Synchronizer ensures synchronous de-assertion of asynchronous reset signals, addressing timing challenges during system operation.
The Data Synchronizer employs a unique synchronization scheme to address Clock Domain Crossing challenges, ensuring reliable data transfer between different clock domains.
This system includes several reserved registers, each serving specific functions:
- REG0 (Address: 0x0) - ALU Operand A
- REG1 (Address: 0x1) - ALU Operand B
- REG2 (Address: 0x2) - UART Configuration
- Bit 0: Parity Enable (Default: 1)
- Bit 1: Parity Type (Default: 0)
- Bits 7-2: Prescale (Default: 32)
- REG3 (Address: 0x3) - Divisor Ratio
- Bits 7-0: Division ratio (Default: 32)
The system's operation is driven by commands received via UART_RX. It supports a wide range of operations, including ALU operations such as addition, subtraction, multiplication, division, logic operations, comparisons, and shifts. Additionally, it handles register file operations, including read and write commands.
- Register File Write Command (3 frames)
- Register File Read Command (2 frames)
- ALU Operation Command with Operand (4 frames)
- ALU Operation Command with No Operand (2 frames)
- Reference Clock (REF_CLK): 50 MHz
- UART Clock (UART_CLK): 3.6864 MHz
- Clock Divider: Always enabled (clock divider enable = 1)
This system represents a remarkable achievement in digital design, combining versatility, efficiency, and precise control over multi-clock domains. Its wide range of supported operations makes it a valuable asset in various applications.