blob: f366f41adf5c439eef23d98b69073e9bd3872965 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// expect-wr-ports 1
// expect-rd-ports 1
// expect-rd-clk \clk
module top(input clk, we, rae, input [7:0] addr, wd, output [7:0] rd);
reg [7:0] mem[0:255];
reg [7:0] rra;
always @(posedge clk) begin
if (we)
mem[addr] <= wd;
if (rae)
rra <= addr;
end
assign rd = mem[rra];
endmodule
|