mirror of
https://github.com/myhdl/myhdl.git
synced 2025-01-24 21:52:56 +08:00
name assoc test
This commit is contained in:
parent
bfe2b8fa9d
commit
e844c1429a
@ -94,6 +94,17 @@ def HecCalculatorTask(hec, header):
|
||||
yield header
|
||||
calculateHecTask(h, header)
|
||||
hec.next = h
|
||||
|
||||
def HecCalculatorTask2(hec, header):
|
||||
""" Hec calculation module.
|
||||
|
||||
Version with task call.
|
||||
"""
|
||||
h = intbv(0)[8:]
|
||||
while 1:
|
||||
yield header
|
||||
calculateHecTask(header=header, hec=h)
|
||||
hec.next = h
|
||||
|
||||
|
||||
|
||||
@ -151,6 +162,10 @@ class TestHec(unittest.TestCase):
|
||||
sim = self.bench(HecCalculatorTask)
|
||||
Simulation(sim).run()
|
||||
|
||||
def testTask2(self):
|
||||
sim = self.bench(HecCalculatorTask2)
|
||||
Simulation(sim).run()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
Loading…
x
Reference in New Issue
Block a user