summaryrefslogtreecommitdiffstats
path: root/usrp1/sdr_lib/ram.v
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-01-22 11:58:32 -0800
committerJosh Blum <josh@joshknows.com>2010-01-22 11:58:32 -0800
commitda57b53f803af2598a06fa89e6da2797e5e65155 (patch)
treebfc0772d0cb7d880d1f91ed936baa02d8ac8d155 /usrp1/sdr_lib/ram.v
parent7bf8a6df381a667134b55701993c6770d32bc76b (diff)
parenta170b9b42345794429486dd4f3316e84ea2cc871 (diff)
downloaduhd-da57b53f803af2598a06fa89e6da2797e5e65155.tar.gz
uhd-da57b53f803af2598a06fa89e6da2797e5e65155.tar.bz2
uhd-da57b53f803af2598a06fa89e6da2797e5e65155.zip
Merge branch 'usrp1' into usrp2
Conflicts: .gitignore
Diffstat (limited to 'usrp1/sdr_lib/ram.v')
-rw-r--r--usrp1/sdr_lib/ram.v16
1 files changed, 16 insertions, 0 deletions
diff --git a/usrp1/sdr_lib/ram.v b/usrp1/sdr_lib/ram.v
new file mode 100644
index 000000000..fb64cdeae
--- /dev/null
+++ b/usrp1/sdr_lib/ram.v
@@ -0,0 +1,16 @@
+
+
+module ram (input clock, input write,
+ input [4:0] wr_addr, input [15:0] wr_data,
+ input [4:0] rd_addr, output reg [15:0] rd_data);
+
+ reg [15:0] ram_array [0:31];
+
+ always @(posedge clock)
+ rd_data <= #1 ram_array[rd_addr];
+
+ always @(posedge clock)
+ if(write)
+ ram_array[wr_addr] <= #1 wr_data;
+
+endmodule // ram