Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > std_logic_vector'("0011100001111111") ??

Reply
Thread Tools

std_logic_vector'("0011100001111111") ??

 
 
guylewis guylewis is offline
Junior Member
Join Date: Nov 2008
Posts: 3
 
      11-14-2008
What does the aspostrophe mean between vector'(

period_h_register <= std_logic_vector'("0000000000000001")


Thanks for any help

lewis
 

Last edited by guylewis; 11-14-2008 at 11:31 PM..
Reply With Quote
 
 
 
 
jeppe jeppe is offline
Senior Member
Join Date: Mar 2008
Location: Denmark
Posts: 348
 
      11-15-2008
You will find the same structure with for instance

if Clk'event and Clk='1' then .....

if Rising_Edge(Clk) then .... -- alternative version

I believe its same kind of type conversion between std_logic and std_ulogic but I never used it.

Jeppe
 
Reply With Quote
 
 
 
 
guylewis guylewis is offline
Junior Member
Join Date: Nov 2008
Posts: 3
 
      11-15-2008
Quote:
Originally Posted by jeppe
You will find the same structure with for instance

if Clk'event and Clk='1' then .....

if Rising_Edge(Clk) then .... -- alternative version

I believe its same kind of type conversion between std_logic and std_ulogic but I never used it.

Jeppe
Thanks Jeppe

Someone from another forum sent me this answer.

"Qualified expressions" may be used to explicitly identify the type, and possibly the subtype, of an expression. Such qualification is a "hint" to the compiler, informing it as to the desired interpretation of the expression being qualified. Hence, such qualification is legal only if the expression can be legally interpreted as a value of the qualifying type. In contrast to type conversion, no information loss can occur.

The syntax of a qualified expression is similar to the syntax of a type conversion. The difference is that a "tick" (the ''' character) is inserted between the type name and the parentheses surrounding the expression, as shown in the next example:

-- note, both enumeration type declarations have some common
-- enumeration items
type color1 is (violet, blue, green, yellow, red);
type color2 is (black, blue, green, red);

-- this array type has an index type "color1". Without
-- using type qualification this example will not compile
-- because the compiler cannot determine the type
-- of "blue" (might be "color1" or "color2").
type a1 is array(color1'(blue) to color1'(red));

-- this array type has an index type "color2". Without
-- using type qualification this example will not compile
type a2 is array(color2'(blue) to color2'(red));
 
Reply With Quote
 
jeppe jeppe is offline
Senior Member
Join Date: Mar 2008
Location: Denmark
Posts: 348
 
      11-16-2008
Thanks for question and answer - I learnt something new
 
Reply With Quote
 
 
 
Reply

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




Advertisments