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

Reply

VHDL - Problem using Unsigned in Modelsim

 
Thread Tools Search this Thread
Old 05-17-2009, 02:25 PM   #1
Default Problem using Unsigned in Modelsim


Hey guys,

I'm currently learning to code in VHDL and are having a problem implementing unsigned vectors. I'm using ISE 9.2i and ModelSim PE 6.5a. I wrote the code using Standard Logic Vector and it executes no problem, but when I try implement it using unsigned vectors I get an error (among others) that "Identifier "unsigned" is not directly visible."

Unfortunately the task does not allow modification of the entity declaration, so I have to use the unsigned vector. Here's code as it stands:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;

entity CountQ1 is
port(clk,Ld8,Enable: in STD_LOGIC;
Q: out UNSIGNED(3 downto 0));
end CountQ1;

architecture Behavioral of CountQ1 is
signal Count: UNSIGNED(3 downto 0);
begin
process(clk)
begin
if (clk='1' and clk'event) then
if (Ld8 = '1' or Count = "0011") then
Count <= "1000";
elsif Enable = '1' then
end if;
Count <= Count-"0001";
end if;
end if;
end process;
Q <= Count;
end Behavioral;



the library declaration given includes only STD_LOGIC_1164 and NUMERIC_BIT, but I didn't see how the latter was relevant since I dont use numeric_bit vectors and so removed it and replaced with NUMERIC_STD.

Any hints or tips would be greatly appreciated
Cheers


ElecB
ElecB 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
Error: expected constructor, destructor or type conversion before '(' token suse Software 0 03-09-2009 03:25 AM
Dial Up Problem smackedass A+ Certification 3 02-02-2007 11:59 PM
Re: Virus Problem ** Help!** David BlandIII A+ Certification 1 03-02-2004 06:00 PM
Re: Serious Computer Problem hootnholler A+ Certification 1 11-24-2003 12:18 PM
Re: Serious Computer Problem Bret A+ Certification 0 11-19-2003 12:51 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