Conversion from BIT -> STD_LOGIC ? 
Author Message
 Conversion from BIT -> STD_LOGIC ?

Hi.

I'm trying to read several objects of type BIT form a text file, and then
present them to STD_LOGIC inputs on my model.

I'm having problems doing the conversion. Anyone know a way to do this?

Thanks,

    Brendan



Sat, 01 Feb 2003 03:00:00 GMT  
 Conversion from BIT -> STD_LOGIC ?
Hi,

Quote:

> Hi.

> I'm trying to read several objects of type BIT form a text file, and then
> present them to STD_LOGIC inputs on my model.

> I'm having problems doing the conversion. Anyone know a way to do this?

In package ieee.std_logic_1164 you'll find a function

    FUNCTION To_StdULogic ( b : BIT ) RETURN std_ulogic;

which should do the trick. Note that type std_ulogic is "compatible"
with std_logic (i.e., you may assign the result of this function
to a std_logic object).

--
Edwin



Sat, 01 Feb 2003 03:00:00 GMT  
 Conversion from BIT -> STD_LOGIC ?

Quote:
>Hi,


>> Hi.

>> I'm trying to read several objects of type BIT form a text file, and then
>> present them to STD_LOGIC inputs on my model.

>> I'm having problems doing the conversion. Anyone know a way to do this?

>In package ieee.std_logic_1164 you'll find a function

>    FUNCTION To_StdULogic ( b : BIT ) RETURN std_ulogic;

>which should do the trick. Note that type std_ulogic is "compatible"
>with std_logic (i.e., you may assign the result of this function
>to a std_logic object).

Or you could use an additional std_logic_textio -library to read directly to
std_logic type from text file.

Jyke



Sun, 02 Feb 2003 13:34:16 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. std_logic <=> _vector conversion

2. std_logic(_vector) <==> integer, boolean conversion

3. std_logic and bit types paradox

4. Converting single bit std_logic to std_logic_vector and back

5. std_logic/bit

6. BIT and STD_LOGIC

7. 16 bit tiff to 12 bit conversion

8. 16 bit to 32 bit Assembly conversion

9. Conversion 16 bit to 32 bit?

10. Character >>> Binary conversion

11. std_ulogic <-> std_logic

12. C4 Legacy 16 bit --> 32 bit

 

 
Powered by phpBB® Forum Software