str to stdvec of converted values

Joined
Jun 13, 2007
Messages
1
Reaction score
0
Hello there,
I'm somewhat new to vhdl programming and am betting on there being more knowledgeable/smart people in this forum who could help. I’m trying to something similar to the thread below, whereby I’m having an input string fed in to be converted to a std_logic_vector of the converted values. I would be very appreciative and humbled if anybody could please help me out.
Thanks,
Jeff

http://www.velocityreviews.com/forums/t153348-character-to-stdlogic-value.html

function str_to_stdvec(inp: string) return std_logic_vector is
variable temp: std_logic_vector((BLOCK_LENGTH+1)-1 downto 0) := (others => 'X');
begin
for i in inp'range loop
temp(i)<=std_logic'value(string(i) & NUL);
end loop;
return temp;
end;


Errors encountered:
# ** Error: TB_rev_A.vhd(53): Illegal type conversion from integer to string (numeric to array).
# ** Error: TB_rev_A.vhd(53): Target of signal assignment is not a signal.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,170
Messages
2,570,927
Members
47,469
Latest member
benny001

Latest Threads

Top