Forum Discussion
Altera_Forum
Honored Contributor
18 years ago --- Quote Start --- I am very junior to use VHDL please simplify the solutions for me! --- Quote End --- I like Frank's solution, but if you want to stick with the shift operator you might be able to find some type conversion help in a VHDL book. I don't do that in VHDL often enough to remember how without experimenting or looking it up each time. Sometimes you can do a direct type conversion (for example, "integer(3.6)" converts the real number to an integer). Because you are using std_logic_vector, however, you might have to find a function that does the conversion. I never remember what conversion functions are available and have to search for an example when I need them.