SystemVerilog enumerated data type has one major shortcoming namely the inability to covert string to enum data type, whereas the reverse is possible. But there are many cases when one find the need to do so. Thankfully JL Gray of verilab has created a sample class template which can be used for the same purpose. The link to the blog entry is
http://www.verilab.com/blog/2007/10/casting-strings-to-enums-in-systemverilog/
Enjoy maadi !!
SV Tips/Tricks - Converting Strings to Enums
Posted by
Subash
at
Wednesday, July 29, 2009
0 comments:
Post a Comment