DPI: Fix imports from unit level
This commit is contained in:
parent
5a9309de78
commit
a3c1724d17
|
|
@ -87,6 +87,7 @@ private:
|
|||
// Don't iterate... Don't need temps for RANGES under the Var.
|
||||
rename(nodep, (!m_modp->isTop()
|
||||
&& !nodep->isSigPublic()
|
||||
&& !nodep->isFuncLocal() // Isn't exposed, and would mess up dpi import wrappers
|
||||
&& !nodep->isTemp())); // Don't bother to rename internal signals
|
||||
}
|
||||
virtual void visit(AstCFunc* nodep, AstNUser*) {
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@
|
|||
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||
// Version 2.0.
|
||||
|
||||
module t ();
|
||||
// Global is the most likely usage scenario
|
||||
import "DPI-C" dpii_sys_task = function void \$dpii_sys (integer i);
|
||||
import "DPI-C" dpii_sys_func = function int \$dpii_func (integer i);
|
||||
|
||||
import "DPI-C" dpii_sys_task = function void \$dpii_sys (integer i);
|
||||
import "DPI-C" dpii_sys_func = function int \$dpii_func (integer i);
|
||||
module t ();
|
||||
|
||||
`ifndef verilator
|
||||
`error "Only Verilator supports PLI-ish DPI calls."
|
||||
|
|
|
|||
Loading…
Reference in New Issue