2 # vim: set fileencoding=utf8
12 def __init__(self
, name
, direction
, type, length
= 0):
14 assert direction
in [IN
, OUT
, INOUT
], \
15 "Port direction %s is invalid" % (direction
,)
17 self
.direction
= direction
23 return "<Port: %s, %s, %s, %s>" % (self
.name
, self
.direction
, self
.type, self
.length
)
25 if __name__
== "__main__":
26 a
= Port("a", IN
, None)
27 b
= Port("b", IN
, None)
28 c
= Port("c", OUT
, None)