[myhdl-list] Proposal: SignalType symbol
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2010-06-09 19:02:45
|
In the development branch 'Signal' has become a factory function instead of a class. I had complaints about this before, in particular from Chris Felton. To test whether something is a Signal instance, it currently means you have to check whether it is a 'myhdl._Signal' (a "hidden" symbol) instead of a 'Signal' as previously. Not really nice, a user should never have to refer to hidden symbols. In a project, as a user, I now have a need for this myself, so ... :-) I want to keep the factory function Signal, but I propose to define a visible symbol 'SignalType' for the type. This is in line with Python conventions for type naming. Then you could do: from myhdl import * ... if isinstance(a, SignalType): ... Any remarks? Jan -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com Analog design automation: http://www.mephisto-da.com World-class digital design: http://www.easics.com |