Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Problem using Unsigned in Modelsim

Thread Tools

Problem using Unsigned in Modelsim

ElecB ElecB is offline
Junior Member
Join Date: May 2009
Posts: 1
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;

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);
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
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
(int) -> (unsigned) -> (int) or (unsigned) -> (int) -> (unsigned):I'll loose something? pozz C Programming 12 03-20-2011 11:32 PM
unsigned long to unsigned char Python 1 06-01-2005 07:00 PM
comparing unsigned long and unsigned int sridhar C Programming 6 11-03-2004 03:52 AM
unsigned int const does not match const unsigned int Timo Freiberger C++ 3 10-30-2004 07:02 PM
Assigning unsigned long to unsigned long long George Marsaglia C Programming 1 07-08-2003 05:16 PM