commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r5801 - gnuradio/branches/developers/matt/u2f/control_


From: matt
Subject: [Commit-gnuradio] r5801 - gnuradio/branches/developers/matt/u2f/control_lib
Date: Tue, 19 Jun 2007 19:45:21 -0600 (MDT)

Author: matt
Date: 2007-06-19 19:45:21 -0600 (Tue, 19 Jun 2007)
New Revision: 5801

Added:
   gnuradio/branches/developers/matt/u2f/control_lib/ram_2port.v
Removed:
   gnuradio/branches/developers/matt/u2f/control_lib/ram_512by32_2p.v
Log:
renamed again, now more generic


Copied: gnuradio/branches/developers/matt/u2f/control_lib/ram_2port.v (from rev 
5800, gnuradio/branches/developers/matt/u2f/control_lib/ram_512by32_2p.v)
===================================================================
--- gnuradio/branches/developers/matt/u2f/control_lib/ram_2port.v               
                (rev 0)
+++ gnuradio/branches/developers/matt/u2f/control_lib/ram_2port.v       
2007-06-20 01:45:21 UTC (rev 5801)
@@ -0,0 +1,38 @@
+
+
+module ram_2port
+  #(parameter DWIDTH=32,
+    parameter AWIDTH=9)
+    (input clka,
+     input ena,
+     input wea,
+     input [AWIDTH-1:0] addra,
+     input [DWIDTH-1:0] dia,
+     output reg [DWIDTH-1:0] doa,
+     
+     input clkb,
+     input enb,
+     input web,
+     input [AWIDTH-1:0] addrb,
+     input [DWIDTH-1:0] dib,
+     output reg [DWIDTH-1:0] dob);
+   
+   reg [DWIDTH-1:0] ram [(1<<AWIDTH)-1:0];
+   
+   always @(posedge clka) begin
+      if (ena)
+        begin
+           if (wea)
+             ram[addra] <= dia;
+           doa <= ram[addra];
+        end
+   end
+   always @(posedge clkb) begin
+      if (enb)
+        begin
+           if (web)
+             ram[addrb] <= dib;
+           dob <= ram[addrb];
+        end
+   end
+endmodule // ram_2port

Deleted: gnuradio/branches/developers/matt/u2f/control_lib/ram_512by32_2p.v





reply via email to

[Prev in Thread] Current Thread [Next in Thread]