Re: [myhdl-list] Beginners question
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2006-09-27 09:17:21
|
Thomas Heller wrote: > If I have two or more events in an always decorator: > > @always(a.negedge, b.negedge, delay(10)) > def func(): > ... > > how can I determine inside func which event is currently handled? Currently there is no direct way. For edges and signals, it may be possible to support this by making sure that certain attributes (e.g. 'negedge') can be checked in code. But that is not possible currently (that is, it won't work as expected). For other things, such as delays, it's not clear how to do it. However, do we actually need this? For synthesizable code, the classic synthesis templates are such that the relevant checks are done implicitly by the top-level if-then-else structure. For non-synthesizable code, you have the option of using separate always blocks, each triggered by the relevant condition. Jan -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Losbergenlaan 16, B-3010 Leuven, Belgium From Python to silicon: http://myhdl.jandecaluwe.com |