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
-
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
Interface
problem, I broke the@package
decorator (including the underlyingPackage
andProtoNet
objects). 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@package
will take a considerable amount of re-thinking and work. And this wouldn't benefit me since I can replace everything thatPackages
do by usingInterfaces
instead (see discussion below).So the only reason to keep
Packages
is if others are using them in their code. If enough of you are, I'll try to save this feature. Otherwise, I'll removePackages
andProtoNets
and 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
Interface
method requires the input nets/buses to be explicitly defined and anInterface
object has to be explicitly returned, whereas the@package
method tries to extract this information implicitly (which is what causes some of the problems).Regardless of whether the circuit module is defined using
Packages
orInterfaces
, it is used the same way:Beta Was this translation helpful? Give feedback.
All reactions