What differences are for type qualifier and type casting?

F

fl

Guest
Hi,

I see the following on a tutorial, but it is not clear about the differences
between type qualifier and type casting.

How do I use either one from "1010" and B_slv?

Thanks,


● VHDL type qualifier (type_name') is a mechanism that specifies the type
of an operand or return value of a subprogram (or operator).
Z_sv <= A_sv + signed'("1010") ;

● Without ', it is type casting. Use type casting for:
Z_sv <= A_sv + signed(B_slv) ;
 
On Monday, September 28, 2015 at 9:41:21 AM UTC-4, fl wrote:
Hi,

I see the following on a tutorial, but it is not clear about the differences
between type qualifier and type casting.

How do I use either one from "1010" and B_slv?

Thanks,


● VHDL type qualifier (type_name') is a mechanism that specifies the type
of an operand or return value of a subprogram (or operator).
Z_sv <= A_sv + signed'("1010") ;

● Without ', it is type casting. Use type casting for:
Z_sv <= A_sv + signed(B_slv) ;

After read previous posts of KJ and Rick, I am clear about my question now. Types are now and then confusing.
 
On 9/28/2015 12:24 PM, fl wrote:
On Monday, September 28, 2015 at 9:41:21 AM UTC-4, fl wrote:
Hi,

I see the following on a tutorial, but it is not clear about the differences
between type qualifier and type casting.

How do I use either one from "1010" and B_slv?

Thanks,


● VHDL type qualifier (type_name') is a mechanism that specifies the type
of an operand or return value of a subprogram (or operator).
Z_sv <= A_sv + signed'("1010") ;

● Without ', it is type casting. Use type casting for:
Z_sv <= A_sv + signed(B_slv) ;

After read previous posts of KJ and Rick, I am clear about my question now. Types are now and then confusing.

Lol! That is like saying Godzilla was a rather large lizard!

--

Rick
 

Welcome to EDABoard.com

Sponsor

Back
Top