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

Reply

VHDL - problem with sll

 
Thread Tools Search this Thread
Old 02-02-2007, 08:17 AM   #1
Default problem with sll


Hello,

I wrote a small code, but Quartus doesnt compile it. The error message is:
Error (10327): VHDL error at ADR_DEC.vhd(27): can't determine definition of
operator ""sll"" -- found 0 possible definitions

The code:
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.STD_LOGIC_ARITH.all;
use IEEE.STD_LOGIC_UNSIGNED.all;
use IEEE.NUMERIC_STD.all;

entity ADR_DEC is
port(ADR : in STD_LOGIC_VECTOR(2 downto 0);
nCS_FPGA: in STD_LOGIC;
nCS : out STD_LOGIC_VECTOR(7 downto 0));
end ADR_DEC;

architecture BEHAVIOR of ADR_DEC is

begin
--
DECODER: process(nCS_FPGA)
begin
if (nCS_FPGA'EVENT and nCS_FPGA= '0') then
nCS <= "00000001" sll CONV_INTEGER(ADR);
else
nCS <= "00000000";
end if;
end process DECODER;


end BEHAVIOR;

Can anybody help me?
Thanks
Volker




Volker
  Reply With Quote
Old 02-02-2007, 03:31 PM   #2
Mike Treseler
 
Posts: n/a
Default Re: problem with sll
Volker wrote:

> I wrote a small code, but Quartus doesnt compile it. The error message is:
> Error (10327): VHDL error at ADR_DEC.vhd(27): can't determine definition of
> operator ""sll"" -- found 0 possible definitions


Nothing will compile it.
let's look up numeric_std.sll:

-- Id: S.9
function "sll" (ARG : UNSIGNED; COUNT: INTEGER) return UNSIGNED;
-- Result subtype: UNSIGNED(ARG'LENGTH-1 downto 0)
-- Result: SHIFT_LEFT(ARG, COUNT)
-- Id: S.10
function "sll" (ARG : SIGNED; COUNT: INTEGER) return SIGNED;
-- Result subtype: SIGNED(ARG'LENGTH-1 downto 0)
-- Result: SHIFT_LEFT(ARG, COUNT)

Note it's only defined for signed or unsigned.

Here's my cut at fixing up your code.
There were a few other problems.

http://home.comcast.net/~mike_treseler/adr_dec.vhd
http://home.comcast.net/~mike_treseler/adr_dec.pdf

-- Mike Treseler


Mike Treseler
  Reply With Quote
Old 02-02-2007, 04:39 PM   #3
Jim Lewis
 
Posts: n/a
Default Re: problem with sll
Hi,
Summary: SLL, SRL, SLA, SRA are not defined for std_logic_vector

In the Accellera VHDL-2006 revision, SLL and SRL are defined for
std_logic_vector. This is an Accellera approved standard, so
ask your vendor to implement it.

Cheers,
Jim

> Volker wrote:
>
>> I wrote a small code, but Quartus doesnt compile it. The error message is:
>> Error (10327): VHDL error at ADR_DEC.vhd(27): can't determine definition of
>> operator ""sll"" -- found 0 possible definitions

>
> Nothing will compile it.
> let's look up numeric_std.sll:
>
> -- Id: S.9
> function "sll" (ARG : UNSIGNED; COUNT: INTEGER) return UNSIGNED;
> -- Result subtype: UNSIGNED(ARG'LENGTH-1 downto 0)
> -- Result: SHIFT_LEFT(ARG, COUNT)
> -- Id: S.10
> function "sll" (ARG : SIGNED; COUNT: INTEGER) return SIGNED;
> -- Result subtype: SIGNED(ARG'LENGTH-1 downto 0)
> -- Result: SHIFT_LEFT(ARG, COUNT)
>
> Note it's only defined for signed or unsigned.
>
> Here's my cut at fixing up your code.
> There were a few other problems.
>
> http://home.comcast.net/~mike_treseler/adr_dec.vhd
> http://home.comcast.net/~mike_treseler/adr_dec.pdf
>
> -- Mike Treseler



Jim Lewis
  Reply With Quote
Old 02-02-2007, 06:53 PM   #4
Andy Peters
 
Posts: n/a
Default Re: problem with sll
On Feb 2, 1:17 am, "Volker" <j...@gmx.de> wrote:
> Hello,
>
> I wrote a small code, but Quartus doesnt compile it. The error message is:
> Error (10327): VHDL error at ADR_DEC.vhd(27): can't determine definition of
> operator ""sll"" -- found 0 possible definitions
>
> The code:
> library IEEE;
> use IEEE.STD_LOGIC_1164.all;
> use IEEE.STD_LOGIC_ARITH.all;
> use IEEE.STD_LOGIC_UNSIGNED.all;
> use IEEE.NUMERIC_STD.all;


Why are you including both std_logic_arith/unsigned and numeric_std?

-a



Andy Peters
  Reply With Quote
Old 03-10-2007, 07:08 PM   #5
VHDL_HELP
 
Posts: n/a
Default Re: problem with sll
On 2 fév, 19:53, "Andy Peters" <goo...@latke.net> wrote:
> On Feb 2, 1:17 am, "Volker" <j...@gmx.de> wrote:
>
> > Hello,

>
> > I wrote a small code, but Quartus doesnt compile it. The error message is:
> > Error (10327): VHDL error at ADR_DEC.vhd(27): can't determine definition of
> > operator ""sll"" -- found 0 possible definitions

>
> > The code:
> > library IEEE;
> > use IEEE.STD_LOGIC_1164.all;
> > use IEEE.STD_LOGIC_ARITH.all;
> > use IEEE.STD_LOGIC_UNSIGNED.all;
> > use IEEE.NUMERIC_STD.all;

>
> Why are you including both std_logic_arith/unsigned and numeric_std?
>
> -a


salut,
d'après que j'ai vu j'avais le même problème : en fait sll fonctinne
avec des bit_vector et non std_logic_vector
j'espere que je vous servi



VHDL_HELP
  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
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
Pioneer DVR3100S problem with Satellite receiver Samsung DCR 9500 Fredrik Bengtsson DVD Video 0 12-12-2003 02:32 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