Verilog Single Port RAM
Verilog Single Port RAM
Verilog Single Port RAM
Show
local info
on a map
Improve your
map-based
search tools
information
from Google
Maps
Verilog Posts
Introduction
Data Types
Building Blocks
Behavioral modeling
Gate/Switch modeling
Simulation
Code Examples
Counters
Misc
D i
Design
1 module single_port_sync_ram
2 # (parameter ADDR_WIDTH = 4,
4 parameter DEPTH = 16
5 )
7 ( input clk,
10 input cs,
11 input we,
12 input oe
13 );
14
17
21 end
22
26 end
27
29 endmodule
(/images/verilog/schematic/single_port_ram_ar_aw.png)
T tb h
Testbench
1 module tb;
2 parameter ADDR_WIDTH = 4;
6 reg clk;
7 reg cs;
8 reg we;
9 reg oe;
13
14 single_port_sync_ram #(.DATA_WIDTH(DATA_WIDTH))
15 ( .clk(clk),
16 .addr(addr),
17 .data(data),
18 .cs(cs),
19 .we(we),
20 .oe(oe)
21 );
22
23
26
27 initial begin
29
31
35
39
40 #20 $finish;
41 end
42 endmodule
Show
local info
on a map
Improve your
map-based
search tools
information
from Google
Maps