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.

Dynamic Shift Register<br />

module shift (C, SI, LEFT_RIGHT, PO);<br />

input C,SI,LEFT_RIGHT;<br />

output PO;<br />

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

always @(posedge C)<br />

begin<br />

if (LEFT_RIGHT==1'b0)<br />

begin<br />

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

end<br />

else<br />

begin<br />

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

end<br />

end<br />

assign PO = tmp;<br />

endmodule<br />

HDL Coding Techniques<br />

XST can infer Dynamic shift registers. Once a dynamic shift register<br />

has been identified, its characteristics are handed to the XST macro<br />

generator for optimal implementation using SRL16x primitives<br />

available in Virtex or SRL16Cx in Virtex-II and Virtex-II Pro.<br />

16-bit Dynamic Shift Register with Positive-Edge<br />

Clock, Serial In and Serial Out<br />

The following table shows pin definitions for a dynamic register. The<br />

register can be either serial or parallel; be left, right or parallel; have a<br />

synchronous or asynchronous clear; and have a width up to 16 bits.<br />

IO Pins Description<br />

Clk Positive-Edge Clock<br />

SI Serial In<br />

AClr Asynchronous Clear (optional)<br />

SClr Synchronous Clear (optional)<br />

SLoad Synchronous Parallel Load (optional)<br />

XST <strong>User</strong> <strong>Guide</strong> 2-69

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

Saved successfully!

Ooh no, something went wrong!