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

Reply

VHDL - vector to integer

 
Thread Tools Search this Thread
Old 06-04-2008, 09:40 AM   #1
Default vector to integer


How to...?

Quote:
dac: out std_logic;

signal dac_count: std_logic_vector (5 downto 0);

if dac_count>24 then
dac<= dac_data(dac_count); ???????? Error!
dac_cs<='0';
else
dac<='0';
dac_cs<='1';
end if;


thx.


sonaj
sonaj is offline   Reply With Quote
Old 06-04-2008, 08:49 PM   #2
jeppe
Senior Member
 
Join Date: Mar 2008
Location: Denmark
Posts: 245
Default
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

....

dac: out std_logic;

signal dac_count: std_logic_vector (5 downto 0);

if dac_count>conv_std_logic_vector(24,6) then
dac<= dac_data(conv_integer(dac_count)); -- May be OK
dac_cs<='0';
else
dac<='0';
dac_cs<='1';
end if;


jeppe
jeppe is offline   Reply With Quote
Old 06-08-2008, 10:39 AM   #3
sonaj
Junior Member
 
Join Date: Jun 2008
Posts: 3
Default FPGA Equations list (like cpld)
Not found abel style equations list FPGA project, only CPLD project.
Xilinx ISE 10.1
I am beginer, and that list helps very much for me.


sonaj
sonaj is offline   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
How to convert string contain Hex data into integer asifjavaid Software 0 09-09-2008 08:50 AM
Fast Integer Division In Vhdl Vitrion Hardware 0 11-01-2007 07:33 AM
VHDL help needed TomboT Hardware 2 11-21-2006 05:01 PM
getting integer values from electronic weigh scale through serial port dotnet_smart Software 2 09-17-2006 05:24 AM
getting integer values from electrolnic weigh scale through serial port dotnet_smart Hardware 0 07-28-2006 11:54 AM




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