Last active
August 29, 2015 14:15
-
-
Save hgomersall/9b061b2b92ddc0775789 to your computer and use it in GitHub Desktop.
A trivial case showing multiple created processes from an identical source.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from myhdl import * | |
def TrivialTest(sig_out, sig_in, reset, clock): | |
@always_seq(clock.posedge, reset=reset) | |
def _trivial_test(): | |
sig_out.next = sig_in | |
return _trivial_test | |
def TestWrapper(sig_out, sig_out2, sig_in, reset, clock): | |
test_list = [] | |
test_list.append(TrivialTest(sig_out, sig_in, reset, clock)) | |
test_list.append(TrivialTest(sig_out2, sig_in, reset, clock)) | |
return test_list | |
def FullTest(sig_out, sig_out2, sig_in, reset, clock): | |
test_wrapper = TestWrapper(sig_out, sig_out2, sig_in, reset, clock) | |
return test_wrapper | |
clock = Signal(bool(0)) | |
sig_in = Signal(intbv(0)[5:]) | |
sig_out = Signal(intbv(0)[5:]) | |
sig_out2 = Signal(intbv(0)[5:]) | |
reset = ResetSignal(0, active=1, async=True) | |
inc_inst = toVHDL(FullTest, sig_out, sig_out2, sig_in, reset, clock) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment