2D Matrix Array
Problem Description
Implement a 4x4 matrix memory module that supports both read and write operations. The matrix should store 8-bit values and allow access via row and column selectors.
Module Interface
- Inputs:
clk
: Clock signalreset
: Reset signal (active high)row_sel
: 2-bit row selectorcol_sel
: 2-bit column selectorwr_en
: Write enable signaldin
: 8-bit data input
- Output:
dout
: 8-bit data output
Expected Behavior
- On reset: All matrix elements initialized to 0
- When wr_en = 1: Write din to matrix[row_sel][col_sel]
- When wr_en = 0: Read matrix[row_sel][col_sel] to dout
No Waveform Data
Submit your Verilog code using Cmd+Enter to see the simulation results and waveform visualization.