Skip to content

Instantly share code, notes, and snippets.

@ravijain056
Last active May 31, 2016 10:53
Show Gist options
  • Save ravijain056/fcfe36e11e047650cf6fbefc281959c3 to your computer and use it in GitHub Desktop.
Save ravijain056/fcfe36e11e047650cf6fbefc281959c3 to your computer and use it in GitHub Desktop.
from myhdl import Signal, instances
class A_Interface:
def __init__(self):
a = Signal(bool(0))
class B_Interface:
def __init__(self):
b = Signal(bool(0))
class nested_Interface:
def __init__(self):
c = A_Interface()
d = B_Interface()
@block
def top(nested_Interface1):
sub1Inst = sub1(nested_Interface1.c)
sub2Inst = sub2(nested_Interface1.d)
return instances()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment