New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
`uselib error with Verilator #1634
Comments
Original Redmine Comment `uselib not only is not supported, it isn't part of the language, and I don't know what it is and don't see much from googling it. If roughly two big simulators support it, and we can determine what the definition of it is, I would consider a patch to implement it. |
Original Redmine Comment `uselib is a work around for a Verilog problem. It is supported by both Mentor and Cadence simulators. Verilog does not have a "formal" concept of library as opposed to VHDL. No consider what happen when you have 2 modules with the same name (My_module) in 2 different projects (FPGA1 and FPGA2). The problem arise when you try to simulate FPGA1 and FPGA2 interacting together. FPGA1 is compiled in a library called FPGA1_lib and contain a module called "My_module" When the simulator loads the design it searches for a module called "My_module" but now it finds 2 of them (one in FPGA1_lib and one in FPGA2_lib) witch one is the right one for that instance? `uselib (although not standard) is there to tell the simulator "listen I know there are 2 "My_module" but for this piece of code use the one in that particular library. I'm not sure if Verilator needs to support that feature but it would be good to at least not flag it as an error. Regards Frederic |
Original Redmine Comment Ok, seems reasonable to ignore this then, can you look at patching this?
|
Original Redmine Comment I'm afraid this if beyond my coding skills. The valid syntax for `uselib is: `uselib <library_reference>... where <library_reference> can be one or more of the following: |
Original Redmine Comment Fixed in git to ignore until end-of-line. |
Author Name: Frederic Antonin
Original Redmine Issue: 1634 from https://www.veripool.org
I have some code that use the following construct before a module instantiation.
I need to add the uselib for inter FPGA simulations because unfortunately I have the same module name with different code/library in each FPGA.
With Verilator I get the following error:
Define or directive not defined: '`uselib'
Is this an unsupported feature?
Is there a work around?
The text was updated successfully, but these errors were encountered: