05.07.2013 Views

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Verilog<br />

Following is the Verilog code for a dual-port RAM with<br />

asynchronous read.<br />

module raminfr<br />

(clk, we, a, dpra, di, spo, dpo);<br />

input clk;<br />

input we;<br />

input [4:0] a;<br />

input [4:0] dpra;<br />

input [3:0] di;<br />

output [3:0] spo;<br />

output [3:0] dpo;<br />

reg [3:0] ram [31:0];<br />

always @(posedge clk) begin<br />

if (we)<br />

ram[a]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!