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 />

• The assign / deassign statement must be performed in the same<br />

always block through an if /else statement. For example, the<br />

following design will be rejected:<br />

module dflop (RST, SET, STATE, CLOCK, DATA_IN);<br />

input RST;<br />

input SET;<br />

input CLOCK;<br />

input DATA_IN;<br />

output STATE;<br />

reg STATE;<br />

always @ (RST or SET) // block b1<br />

case ({RST,SET})<br />

2'b00: assign STATE = 1'b0;<br />

2'b01: assign STATE = 1'b0;<br />

2'b10: assign STATE = 1'b1;<br />

2'b11: deassign STATE;<br />

endcase<br />

always @ (posedge CLOCK) // block b2<br />

begin<br />

STATE = DATA_IN;<br />

end<br />

endmodule<br />

7-20 <strong>Xilinx</strong> Development System

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

Saved successfully!

Ooh no, something went wrong!