-
Notifications
You must be signed in to change notification settings - Fork 16
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
Sim breaks when _importpath is [] #176
Comments
Some more commentary to follow, but in short:
More generally: the Vlsir + Xyce combo hasn’t seen much action of late; I won’t be surprised if we find some trouble with other recent changes. |
... But yeah, even if those if getattr(mod, "_importpath", None) is not None:
return mod._importpath + [mod.name] # <= don't forget that! |
Related notes: The paths we export, which eventually (can) become import hdl21 as h
m = h.Module(name="MyName")
print(m._importpath)
pkg = h.to_proto(m)
ns = h.from_proto(pkg)
print(ns.__main__.MyName._importpath) Yields
The Re: @sim.sim
class Sky130MuxSim:
@h.module
class Tb: # required to be named 'Tb'? The Line 373 in cf31f94
It also has an alias Tb with the upper-case T.Line 395 in cf31f94
You can name your testbench Module whatever you like - just assign it to either class WhateverNameYouLike:
...
class MySim:
Tb = WhateverNameYouLike There are quite a few examples of how to set those testbench attributes on the readme page: If they're not clear, it'd be great to add to those docs. Re: class Tb:
# Seems to be a requirement of a 'Tb' to have a "single, scalar port".
VSS = h.Port() That fact, in contrast, looks like it could be more clear in the docs. In short:
|
Another thing that woulda helped is Vlsir/Vlsir#82 |
|
I import a Vlsir package to test it:
The generated netlist for Xyce is missing the subcircuit name for
sky130_mux
:I tracked the problem down to this if branch in
qualpath
. The problem seems to be that, on import,_importpath
is set to[]
(empty list). Seems this should instead be interepted and stored asNone
. Anyway then this ends up so that theSimInput
message contains aPackage
where the subcircuit has an empty name.Am I missing something? Fix seems pretty straightforward.
The text was updated successfully, but these errors were encountered: