concatenation problem + difference between mod and rem

M

Mohammed khader

Hi all,

1) Why it is not possible to concatenate two bits to make a vector in
the following example.

signal s1,s2 :bit;

case (s1 & s2 ) is
WHEN "00" => ...


end case;

2) What is the advantage in having two operators(mod and rem ) which
seems almost similar.Is there any good reason(application) where they
have specific meaning.

Thanks in advance.

Regards,
Mohammed A.khader.
 
A

Alan Fitch

Mohammed khader said:
Hi all,

1) Why it is not possible to concatenate two bits to make a vector in
the following example.

signal s1,s2 :bit;

case (s1 & s2 ) is
WHEN "00" => ...


end case;

Because the data type is not determinable by the compiler.
2) What is the advantage in having two operators(mod and rem ) which
seems almost similar.Is there any good reason(application) where they
have specific meaning.

They differ in behaviour for signed values.

Alan


--
Alan Fitch
Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * Perl * Tcl/Tk * Verification * Project
Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24
1AW, UK
Tel: +44 (0)1425 471223 mail:
(e-mail address removed)
Fax: +44 (0)1425 471573 Web:
http://www.doulos.com

The contents of this message may contain personal views which are not
the
views of Doulos Ltd., unless specifically stated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top