??? 06/19/08 21:27 Read: times |
#156050 - type conversion is a pain Responding to: ???'s previous message |
Richard said:
Actually, I've spent quite a lot of time doing what I needed to do with VHDL, and this business with type conversion has often been a pain. As I've said, VHDL is a strongly-typed language, unlike Verilog, which is an unmitigated disaster when it comes to dealing with numbers. But you still haven't answered my question. What is the decimal equivalent to the binary vector "10010110"? The answer makes it obvious why VHDL handles numbers as it does. I should further note that you can code your numbers however you want, and your simulator (I use ModelSim) can display a vector in any numeric base you wish. (It can even do a simple D-to-A conversion and show it as a waveform!) -a |