24.03.2013 Views

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

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.

Default binding<br />

Simulating VHDL designs UM-79<br />

By default <strong>ModelSim</strong> performs default binding when you load the design with vsim (CR-<br />

373). The advantage of performing default binding at load time is that it provides more<br />

flexibility for compile order. Namely, entities don't necessarily have to be compiled before<br />

other entities/architectures which instantiate them.<br />

However, you can force <strong>ModelSim</strong> to perform default binding at compile time. This may<br />

allow you to catch design errors (e.g., entities with incorrect port lists) earlier in the flow.<br />

Use one of these two methods to change when default binding occurs:<br />

Specify the -bindAtCompile argument to vcom (CR-311)<br />

Set the BindAtCompile (UM-527) variable in the modelsim.ini to 1 (true)<br />

Default binding rules<br />

When looking for an entity to bind with, <strong>ModelSim</strong> searches the currently visible libraries<br />

for an entity with the same name as the component. <strong>ModelSim</strong> does this because IEEE<br />

1076-1987 contained a flaw that made it almost impossible for an entity to be directly<br />

visible if it had the same name as the component. In short, if a component was declared in<br />

an architecture, any like-named entity above that declaration would be hidden because<br />

component/entity names cannot be overloaded. As a result we implemented the following<br />

rules for determining default binding:<br />

If performing default binding at load time, search the libraries specified with the -Lf<br />

argument to vsim.<br />

If a directly visible entity has the same name as the component, use it.<br />

If an entity would be directly visible in the absence of the component declaration, use it.<br />

If the component is declared in a package, search the library that contained the package<br />

for an entity with the same name.<br />

If none of these methods is successful, <strong>ModelSim</strong> will also do the following:<br />

Search the work library.<br />

Search all other libraries that ar e currently visible by means of the library clause.<br />

If performing default binding at load tim e, search the libraries specified with the -L<br />

argument to vsim.<br />

Note that these last three searches are an extension to the 1076 st<strong>and</strong>ard.<br />

Disabling default binding<br />

If you want default binding to occur only via configurations, you can disable <strong>ModelSim</strong>’s<br />

normal default binding methods by setting the RequireConfigForAllDefaultBinding (UM-<br />

527) variable in the modelsim.ini to 1 (true).<br />

<strong>ModelSim</strong> <strong>SE</strong> User’s <strong>Manual</strong>

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

Saved successfully!

Ooh no, something went wrong!