Use of libraries

N

NigelE

I looked a little bit for a command line way to do it without luck so if you
do find such a command post it back up here.

KJ

The "Compile Out Of Date" relies on you using the ModelSim project
capability and requires a <project>.mpf file which references the
source files, libraries and compile & simulation commands.
Projects are most usually/easily managed via the GUI but the 'project'
command includes the compileoutofdate option.

cheers

- Nigel

This funct
 
M

Mike Treseler

NigelE said:
vcom -just p *.vhd
vcom -just b *.vhd
vcom -just e *.vhd
vcom -just a *.vhd
vcom -just c *.vhd

is a generic compile script that should compile your files in the
correct order, independent of how you've organised your design units.


That is a good first try, if I lack a makefile,
but overlapping/duplicate declarations can make this fail.

-- Mike Treseler
 
M

Mike Treseler

Martin said:
I shall have to consider that, although getting my Emacs fingers out
of the habit of prodding C-sC-cC-k then ALT-TAB, up-arrow ENTER to
compile and sim will be hard :)

Or, maybe stick with vhdl-make.
It can be worth the wait.

If I forget about some package edit
I made at the beginning of my session,
'Compile out of date' may lead me
on a long debug session.

Also, the GUI project manager has
its own annoyances and is a weak
substitute for vhdl-mode projects.

I have found it impossible to keep
both modelsim.ini and .mpf managers
in synch. So one or the other
is probably better than both.

-- Mike Treseler
 
K

KJ

Or, maybe stick with vhdl-make.
It can be worth the wait.
Hey....I thought earlier in the thread you implied (at least to me)
that this was lightning quick ;)
If I forget about some package edit
I made at the beginning of my session,
'Compile out of date' may lead me
on a long debug session.
For what it's worth, I haven't found that to be the case. If
something changes inside a package/entity that will require a re-
compile of some dependent file that was not changed (and therefore not
caught by 'Compile out of date' then it gets flagged as soon as you
vsim. The message is pretty clear, telling you which design unit
needs to be recompiled because package 'xyz' has been changed.

The amount of lost time would be the time spent loading the design up
to the point of the failure (which I'm guessing for most would be less
than 1 minute), not any debug time (since you can't get that far). In
any case, you would recompile the dependent files and get back to
siming.

This is all on the assumption that the file dependencies have all been
worked out correctly to begin with....and if they haven't....well, the
GUI (and I'm guessing the command line too based on NigelE's earlier
post) does have a 'generate compile order' option as well. Whether
that is better or worse than what people use to generate file
dependency orders to feed into make is something for each to decide.

Kevin Jennings
 
M

Mike Treseler

KJ wrote:

Hey....I thought earlier in the thread you implied (at least to me)
that this was lightning quick ;)

Yes. I guess Martin's mileage varied :)
The amount of lost time would be the time spent loading the design up
to the point of the failure

.... and probably much less time than I've
spent piffling about it on usenet.

Thanks for the comments.
Back to the salt mines.

-- Mike Treseler
 
P

Paul Uiterlinden

Mike said:
That is a good first try, if I lack a makefile,
but overlapping/duplicate declarations can make this fail.

As do use clauses of packages in packages.
 
J

jtw

Mike Treseler said:
I was advocating compiling everything into work
and Peter wanted separate libraries, but that's right.
If I did compile into 'mikes_stack_lib' then I either
have to map that name to 'work' -- if that is possible --

It is, indeed, possible, at least with Modelsim. Synplicity's project
files depend a little less on library names.

JTW
 
M

Martin Thompson

Mike Treseler said:
KJ wrote:



Yes. I guess Martin's mileage varied :)

:) But I now have the best of both worlds!

Reading the Modelsim docs ("engineer in 'reads documentation'
shock!"), it appears the command line vcom is clever enough to only
update the bits of the library that need it, so if you only change the
architecture in a file, it only compiles the architecture. So you can
put all your stuff in one file and use the Emacs Compile-File with
impunity. On the occasions you need to compile lots of stuff,
the makefile is still there as well. Yay - I like finding new stuff
out!

From the docs:

"vcom determines whether or not the compilation results have
changed. For example, if you keep an entity and its architectures in
the same source file and you modify only an architecture and recompile
the source file, the entity compilation results will remain unchanged
and you will not have to recompile design units that depend on the
entity."

Which probably says it better than I did :)

Cheers,
Martin
 
M

Martin Thompson

Paul Uiterlinden said:
As do use clauses of packages in packages.

I have a script which iterates over all my files compiling packages
until there are no errors, then I do the entities, and then I do all
the rest. Then I can use vmake to make a Makefile. I've given up on
VHDL-mode's makefile creator - I'm a heavy user of folding-mode, and
having lots of buffers open at once. VHDL-mode doesn't see inside any
closed folds of open files, so when I regenerate a makefile I have to
close all my buffers first :-(

Cheers,
Martin
 
M

Martin Thompson

KJ said:
I looked a little bit for a command line way to do it without luck so if you
do find such a command post it back up here.

See upthread, if you haven't already, vcom does it by magic already!

Cheers,
Martin
 
M

Mike Treseler

Martin said:
I have a script which iterates over all my files compiling packages
until there are no errors, then I do the entities, and then I do all
the rest. Then I can use vmake to make a Makefile. I've given up on
VHDL-mode's makefile creator - I'm a heavy user of folding-mode, and
having lots of buffers open at once. VHDL-mode doesn't see inside any
closed folds of open files, so when I regenerate a makefile I have to
close all my buffers first :-(

Check out rescan-project on the speedbar.
Then generate-makefile.

-- Mike Treseler
 
M

Martin Thompson

Mike Treseler said:
Check out rescan-project on the speedbar.
Then generate-makefile.

I have never had much success with rescanning unless I go through all
the open buffers making sure they have their folds unfolded, otherwise
rescan misses dependencies.

As an aside - I also never found out out to do a rescan from the
keyboard.. I hate the pointy-clicky thing :)

Cheers,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top