manolis kaliorakis
Guest
Sat Dec 17, 2011 3:56 pm
Hello to all,
I am a beginner in using vhdl. I want to convert a signal boolean to
std_logic. How could I achieve this?
I am using these libraries:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
Thanks in advance
KJ
Guest
Sat Dec 17, 2011 5:56 pm
On Dec 17, 8:56 am, manolis kaliorakis <kaliorakis.d...@gmail.com>
wrote:
Quote:
Hello to all,
I am a beginner in using vhdl. I want to convert a signal boolean to
std_logic. How could I achieve this?
I am using these libraries:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
KJ note: Do not use the following libraries, use ieee.numeric_std
instead
Quote:
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
You have to create your own function...here it is
function To_Std_Logic(L: BOOLEAN) return std_ulogic is
begin
if L then
return('1');
else
return('0');
end if;
end function To_Std_Logic;
Kevin Jennings
manolis kaliorakis
Guest
Sat Dec 17, 2011 7:58 pm
On Dec 17, 5:56 pm, KJ <kkjenni...@sbcglobal.net> wrote:
Quote:
On Dec 17, 8:56 am, manolis kaliorakis <kaliorakis.d...@gmail.com
wrote:
Hello to all,
I am a beginner in using vhdl. I want to convert a signal boolean to
std_logic. How could I achieve this?
I am using these libraries:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
KJ note: Do not use the following libraries, use ieee.numeric_std
instead
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
k
You have to create your own function...here it is
function To_Std_Logic(L: BOOLEAN) return std_ulogic is
begin
if L then
return('1');
else
return('0');
end if;
end function To_Std_Logic;
Kevin Jennings
Thanks for your response.It was very helpfull