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.

Include Files<br />

Verilog Language Support<br />

Verilog allows separating source code into more than one file. To use<br />

the code contained in another file, the current file has the following<br />

syntax:<br />

`include "path/file-name-to-be-included"<br />

Note The path can be relative or absolute.<br />

Multiple `include statements are allowed in a single Verilog file. This<br />

is a great feature to make code modular and manageable in a team<br />

design environment where different files describe different modules<br />

of the design.<br />

If files are referenced by an `include statement, they must not be<br />

manually added to the project. For example, at the top of a Verilog file<br />

you might see this:<br />

`timescale 1ns/1ps<br />

`include "modules.v"<br />

...<br />

If the specified file (in this case, modules.v) has been added to an ISE<br />

project and is specified with an `include, conflicts will occur and an<br />

error message displays:<br />

ERROR:Xst:1068 - fifo.v, line 2. Duplicate<br />

declarations of module'RAMB4_S8_S8'<br />

Comments<br />

There are three forms of comments in Verilog similar to the two<br />

forms found in a language like C++.<br />

• // Allows definition of a one-line comment.<br />

• /* You can define a multi-line comment by enclosing it as<br />

illustrated by this sentence*/<br />

• (*In Verilog 2001you can define a multi-line comment by<br />

enclosing it as illustrated in this sentence*)<br />

XST <strong>User</strong> <strong>Guide</strong> 7-27

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

Saved successfully!

Ooh no, something went wrong!