diff --git a/docs/chapter4/6sequentialelements.md b/docs/chapter4/6sequentialelements.md index f7ac8406..37f3a28f 100644 --- a/docs/chapter4/6sequentialelements.md +++ b/docs/chapter4/6sequentialelements.md @@ -20,6 +20,7 @@ CircuitVerse features the following circuit elements in this category: - [ROM](#rom) - [RAM](#ram) - [EEPROM](#eeprom) + - [FIFO Queue](#fifo-queue) ## D Flip Flop @@ -586,3 +587,86 @@ You can verify the behavior of the EEPROM circuit element in the live circuit em > {" "} + +## FIFO Queue + +The **FIFO Queue** circuit element simulates a hardware queue that follows the *First-In-First-Out* principle. It temporarily stores input data and allows retrieval in the same order it was received. Users can enqueue (`ENQ`) and dequeue (`DEQ`) data values, reset the entire queue (`RST`), and monitor its current state via `EMP` (Empty) and `FULL` indicators. + +> Properties that can be customized in the **PROPERTIES** panel include: **Direction, BitWidth, Depth** + +### Functionality +The queue operation is clock-driven and updates happen on the rising edge of the `CLK` input: + +- When `ENQ` is HIGH, the value on `D` is stored into the queue (if not full). +- When `DEQ` is HIGH, the next value is output from the queue (if not empty). +- If `RST` is HIGH during a clock edge, the queue is cleared. +- Output indicators reflect queue state (`EMP` = empty, `FULL` = full). + +--- + +### Table: Pin Description of FIFO Queue + +
| Pin | +Description | +
| D | +Input data to be enqueued into the queue | +
| ENQ | +Trigger to enqueue current input (rising edge CLK) | +
| DEQ | +Trigger to dequeue and output next value (rising edge CLK) | +
| RST | +Resets and clears the entire queue | +
| CLK | +Clock input; operations occur on rising edge | +
| Q | +Output data from the front of the queue | +
| EMP | +High (1) when the queue is empty | +
| FULL | +High (1) when the queue is full | +