Replies: 2 comments 1 reply
-
|
I managed to save the |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@subcircuit
def circuit_a(vi, vo, gnd):
# this section would be part of the subcircuit class and happen in the background, not explicitly declared in each function
for i in locals():
if not isinstance(x, net):
if not isinstance(x, bus):
raise TypeError('x must be a net or bus') |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
While I was working on the circuitsascode repository, I discovered some problems with SKiDL
Interfaces(finding these errors is one of the reasons I created circuitsascode).While fixing the
Interfaceproblem, I broke the@packagedecorator (including the underlyingPackageandProtoNetobjects). I've spent the past few days trying to patch it together so it will work. All I've succeeded in doing is convince myself that fixing the problems with@packagewill take a considerable amount of re-thinking and work. And this wouldn't benefit me since I can replace everything thatPackagesdo by usingInterfacesinstead (see discussion below).So the only reason to keep
Packagesis if others are using them in their code. If enough of you are, I'll try to save this feature. Otherwise, I'll removePackagesandProtoNetsand simplify the SKiDL code. I'll leave this question open until next weekend in order for people to have a chance to reply.Packages versus Interfaces
Here is a three-terminal voltage regulator and a couple of filter capacitors described using
@package:Here is the same regulator circuit using
Interfaces:The main differences in the two approaches is that the
Interfacemethod requires the input nets/buses to be explicitly defined and anInterfaceobject has to be explicitly returned, whereas the@packagemethod tries to extract this information implicitly (which is what causes some of the problems).Regardless of whether the circuit module is defined using
PackagesorInterfaces, it is used the same way:Beta Was this translation helpful? Give feedback.
All reactions