05.07.2013 Views

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

module shift (C, S, SI, SO);<br />

input C,SI,S;<br />

output SO;<br />

reg [7:0] tmp;<br />

always @(posedge C)<br />

begin<br />

if (S)<br />

tmp = 8'b11111111;<br />

else<br />

begin<br />

tmp = {tmp[6:0], SI};<br />

end<br />

end<br />

assign SO = tmp[7];<br />

endmodule<br />

8-bit Shift-Left Register with Positive-Edge Clock,<br />

Serial In, and Parallel Out<br />

Note For this example XST will infer SRL16.<br />

The following table shows pin definitions for an 8-bit shift-left<br />

register with a positive-edge clock, serial in, and Parallel out.<br />

IO Pins Description<br />

C Positive-Edge Clock<br />

SI Serial In<br />

PO[7:0] Parallel Output<br />

2-62 <strong>Xilinx</strong> Development System

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

Saved successfully!

Ooh no, something went wrong!