[Scons-users] Dealing with an odd dependency

Matthew Swabey mattaw at gmail.com
Mon Dec 8 19:52:42 EST 2014

Here is my attempt to make modelsim behave with SCons. - it doesn't work
properly yet but would you like to collaborate on improving it. The main
issues surround identifying systemverilog packages and how to manage
discovering them and automatically finding the dependencies or do I expect
the user to manage it.

Anyway this is from my site_scons and and example sconscript and sconstruct.

Let me know if you want to try to take things further - it would be great
to have a better solution to the horror that is modelsim (or I shall have
to use vcs!)


On 5 December 2014 at 15:55, Dirk Bächle <tshortik at gmx.de> wrote:

> On 05.12.2014 21:02, Brian Cody wrote:
>> Hey, no argument from me about SCons having a legitimate complaint.
>> The tool is modelsim. Modelsim relies on an INI file to tell it where
>> things exist in your file system, e.g. lib_a is c:\here\liba, lib_b is
>> c:\here\libb, etc. The library is the location of where compiled objects
>> have been replaced. A caveat to this is that if lib B depends on lib A,
>> then lib A must be compiled and in the ini file before lib B is compiled.
>> Then if there's a lib C with a similar dependency on lib B, things start to
>> chain together.
>> [...]
>> The library creation does not depend on the ini file. They all can (and
>> do) run simultaneously. It really just creates a directory with a text file
>> with some internal modelsim information.
>> Next vcom can run on any library that depends on no other library.
>> Next vmap should be run to place those libraries in the ini file (vmap
>> would definitely need to treat the ini as a side effect at least)
>> Next vcom can run on any library that depends on just the previously
>> created libraries.
>> etc.
>>  I googled around a bit and had a short look at what Modelsim does:
> http://www.tkt.cs.tut.fi/tools/public/tutorials/mentor/
> modelsim/getting_started/gsms.html
> I would keep the "init" step of creating libraries separate from compiling
> them. You could define an option like "INIT", and when it's given on the
> command-line you only include an "SConscript.init" with the required steps
> to setup your libs. In "normal" mode, you include the main "SConscript" for
> running the compiler on the libraries. (could also be solved using Aliases,
> I guess)
> About the vcom/vmap commands: you could try to define your Builder from a
> "list of actions", such that it always automatically runs "vmap" after your
> actual build command. Then you would probably have to define your *.ini
> file as both, SideEffect() and Precious().
> Regards,
> Dirk
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20141208/0293488a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SConstruct
Type: application/octet-stream
Size: 288 bytes
Desc: not available
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20141208/0293488a/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SConscript
Type: application/octet-stream
Size: 269 bytes
Desc: not available
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20141208/0293488a/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ModelSimHDL.py
Type: text/x-python
Size: 2470 bytes
Desc: not available
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20141208/0293488a/attachment-0001.py>

More information about the Scons-users mailing list