Skip to content

How to unlink/unset libraries without deleting them? #46

Description

@KrzysztofZyla

I have a simple example that looks like this:

workdir/
├── Scripts
├── dir_a/
│ ├── dut.pro
│ └── dut.vhd
├── dir_b/
│ ├── dut.pro
│ └── dut.vhd
└── run.do

Both "dut.pro" files have the same content:

library DutLib
analyze ./dut.vhd
simulate e

Both "dut.vhd" only print "A" or "B".

Macro "run.do":

source ./Scripts/StartUp.tcl

SetLibraryDirectory ./dir_a
build ./dir_a/dut.pro

SetLibraryDirectory ./dir_b
build ./dir_b/dut.pro

My intention was to create library "DutLib" for A in dir_a and "DutLib" for B in dir_b.
I'm running Riviera-PRO from workdir.
Results are as expected but it seems that in both cases the same library is used:

library DutLib (...)/workdir/dir_a/VHDL_LIBS/tool_ver

I thought that "SetLibraryDirectory ./dir_b" will make the second "build" command create the library in dir_b,
but it seems that library names stored in variables like ::osvvm::LibraryList have priority over this.
I don't want to delete the library in dir_a so procedures like "RemoveAllLibraries" don't solve the problem.
My WA is to use below commands in "run.do":

if {[info exists ::osvvm::VhdlWorkingLibrary]} {
   unset ::osvvm::VhdlWorkingLibrary
}
if {[info exists ::osvvm::LibraryList]} {
   unset ::osvvm::LibraryList
}
if {[info exists ::osvvm::LibraryDirectoryList]} {
   unset ::osvvm::LibraryDirectoryList
}

Is there a simpler way/command to "unlink" libraries without deleting them?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions