Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Cast natural to std_logic_vector (and the other way)

Thread Tools

Cast natural to std_logic_vector (and the other way)

badwolf500 badwolf500 is offline
Junior Member
Join Date: Aug 2006
Posts: 1

Is it possible to convert a variable of type natural to a std_logic_vector (and do the opposite). I am trying to do this and either I am not using the correct commands or the wrong library. Does anyone know how to do this?

I have used an integer instead but would like to know if it is possible.

Many Thanks
Reply With Quote

Thread Tools

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
STD_LOGIC_VECTOR >> NATURAL ? aleksa VHDL 9 01-22-2009 09:41 PM
inout std_logic_vector to array of std_logic_vector of generic length conversion... Thomas Rouam VHDL 6 11-09-2007 11:49 AM
Adding a NATURAL and a STD_LOGIC_VECTOR Sebastien Bourdeauducq VHDL 3 06-08-2007 02:05 PM
Constant conversion (natural to std_logic_vector) VHDL 10 04-13-2006 10:29 PM
error C2440: 'return' : cannot convert from 'const char *' to 'const unsigned short *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast Abhijit Bhadra C++ 2 12-01-2004 04:43 PM