|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- `timescale 1ns / 1ps
- //////////////////////////////////////////////////////////////////////////////////
- // Company:
- // Engineer:
- //
- // Create Date: 11.02.2021 11:17:22
- // Design Name:
- // Module Name: Regstr_space
- // Project Name:
- // Target Devices:
- // Tool Versions:
- // Description:
- //
- // Dependencies:
- //
- // Revision:
- // Revision 0.01 - File Created
- // Additional Comments:
- //
- //////////////////////////////////////////////////////////////////////////////////
-
-
- module Regstr_space(clk, we, en, addr, di, dout);
- input clk;
- input we;
- input en;
- input [17:0] addr;
- input [7:0] di;
- output [7:0] dout;
-
- reg [7:0] RAM [43:0];
- reg [7:0] dout;
-
- always @(posedge clk)
- begin
- if (en)
- begin
- $display("====================================== REGISTER SPACE ========================================");
- if (we)
- RAM[addr] <= di;
- else
- dout <= RAM[addr];
- $display("ADDR = %h\t DATA = %h",addr,di);
- end
- end
- endmodule
|