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.

XST <strong>User</strong> <strong>Guide</strong><br />

Verilog Code<br />

Multiplexers<br />

Following is the VHDL code for a 16-bit dynamic shift register.<br />

module dynamic_srl (Q,CE,CLK,D,A);<br />

input CLK, D, CE;<br />

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

output Q;<br />

reg [15:0] data;<br />

assign Q = data[A];<br />

always @(posedge CLK)<br />

begin<br />

if (CE == 1'b1)<br />

{data[15:0]}

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

Saved successfully!

Ooh no, something went wrong!