thanks for the explanation. If I make the .tcl script the TestCaseName, it will be sourced and the RAM is successfully initialized during the simulation. But I think it is sourced as <TestCaseName>.tcl but not <LibraryUnit>.tcl. Because with any other name it will not be sourced, at least in my project. I have tried testbench name, package name and so on. They don’t work.