Download Control/Finite State Machine/sequence_detector/design_description.txt from chipagents/RTLLM-verified: direct link, hf CLI and curl.
- Browser
- Download file 1.44 kB
-
https://huggingface.co/datasets/chipagents/RTLLM-verified/resolve/main/Control/Finite%20State%20Machine/sequence_detector/design_description.txt
- Command line
-
hf download 'hf://datasets/chipagents/RTLLM-verified/Control/Finite State Machine/sequence_detector/design_description.txt'
-
curl -L -o design_description.txt https://huggingface.co/datasets/chipagents/RTLLM-verified/resolve/main/Control/Finite%20State%20Machine/sequence_detector/design_description.txt
1.44 kB
| Please act as a professional Verilog designer. | |
| Implement a module of a sequence detector to detect a specific 4-bit binary sequence 1001. | |
| Module name: | |
| sequence_detector | |
| Input ports: | |
| clk: Clock signal to synchronize the detector. | |
| rst_n: Active-low reset signal to initialize the state machine. | |
| data_in: 1-bit binary input signal to feed the bitstream for sequence detection. | |
| Output ports: | |
| sequence_detected: 1-bit output signal that is set high when the specific sequence is detected. | |
| Internal logic: | |
| State Machine: The sequence detector uses a finite state machine (FSM) with the following states: | |
| IDLE: Waiting for the start of the sequence. | |
| S1: The first bit of the desired sequence is detected. | |
| S2: The second bit of the desired sequence is detected. | |
| S3: The third bit of the desired sequence is detected. | |
| S4: The fourth and final bit of the desired sequence is detected, and the output sequence_detected is set high. | |
| Implementation: | |
| -FSM Design: The FSM transitions through states based on the bitstream data_in. On each clock cycle, the detector checks for a match of the specific sequence. | |
| -Sequence Detection: The module checks the input data_in and transitions between states. Once the complete sequence is detected, sequence_detected is asserted. | |
| -Reset Behavior: When rst_n is low, the state machine returns to the IDLE state, resetting the detection process. |