[myhdl-list] Characterstringhandling
Brought to you by:
jandecaluwe
|
From: Thomas T. <tho...@de...> - 2008-06-20 10:38:58
|
Here comes an explanation of my bug report about improper character string handling. The following does not work: a = Signal(intbv()[8:]) a.next = "y" if a == "n": ... IMO should myhdl at least character strings with length of one like an integer ( ord(character) ). I use this charcter handling for a simple command parser. I have attached a demonstration code and the verilog output - as it should be, e.g. is on my installation. I also attached the diff of my installation - it is incomplete, but works for my current porposes, including conversion to Verilog. For strings with more than one character things are more difficult... BTW: This "//pass" lines in stringbugfunc.v are caused by another simple patch to avoid the print-with-more-than-one-argument warning. |