Scalar Array Logic
Problem Description
Implement a module that uses a scalar array (1-bit elements) to store and retrieve values based on a selector.
Module Interface
- Inputs:
clk
: Clock signalreset
: Reset signal (active high)sel
: 2-bit selector
- Output:
out
: 1-bit output
Expected Behavior
- On reset: Initialize array with pattern [0, 1, 0, 1]
- On each clock edge: Output the value at array[sel]
No Waveform Data
Submit your Verilog code using Cmd+Enter to see the simulation results and waveform visualization.