Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Re: TYPE CONVERSION

 
Thread Tools Search this Thread
Old 08-06-2003, 07:12 PM   #1
Default Re: TYPE CONVERSION


I copied these lines from some other postings. Search this group for
" Type conversion with characters "

int_x <= CHARACTER'POS(char_a);
char_a <= CHARACTER'VAL(int_x);


use ieee.numeric_std.all;
....
slv_vec <= STD_LOGIC_VECTOR(TO_UNSIGNED(CHARACTER'POS(char_a) , Nbits));

where Nbits is the number of bits slv_vec'LENGTH.

Good luck,
Troy


Sunday wrote:
>
> Hi all,
>
> I've some problems with type conversion :
>
> How convert a character into a std_logic_vector (7 downto 0) ? (I've
> tried std_logic_vector(value) and to_stdlogicvector(value) but these are
> not clodely related types and it's don't work ...)
>
> And ... how to do the inverse, a std_logic_vector (7 downto 0) into a
> character ?
>
>
> Thanks for your help.
>
> Stéphane. ()
>




Yahoo
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: expected constructor, destructor or type conversion before '(' token suse Software 0 03-09-2009 03:25 AM
Eclipse - Axis2 - Java Webservices Error amanjsingh Software 1 10-09-2007 09:03 AM
Need help on Modelsim VHDL syntax? ASAP:) kaji General Help Related Topics 0 03-14-2007 10:43 PM
Need help on a Modelsim VHDL Syntax? ASAP:) kaji Software 0 03-14-2007 10:43 PM
Need Help on a Modelsim VHDL Syntax....ASAP:) kaji Hardware 0 03-14-2007 10:41 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46