Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > constant integer to unsigned casting

Reply
Thread Tools

constant integer to unsigned casting

 
 
Limor Limor is offline
Junior Member
Join Date: Mar 2011
Posts: 1
 
      03-22-2011
Hi
I'm running a benchmark between Modelsim and active HDL.
I have the following code compiled on Active HDL:

addr := unsigned(x"1");

When I run it on Modelsim, it requires a ' sign after the unsigned , in order to compile. So in Modelsim it looks like this:

addr := unsigned'(x"1");

This expression also compiles on Active HDL.

Can any body explain why do I need this ' sign?

Thanks
Limor
 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
casting constant value from float to unsigned short - compiler bugs? news.aon.at C Programming 36 01-26-2012 05:14 PM
(int) -> (unsigned) -> (int) or (unsigned) -> (int) -> (unsigned):I'll loose something? pozz C Programming 12 03-20-2011 11:32 PM
Casting from const pair<const unsigned char*, size_t>* to constpair<unsigned char*, size_t>* Alex Vinokur C++ 9 10-13-2008 05:05 PM
conversion of signed integer to unsigned integer junky_fellow@yahoo.co.in C Programming 14 06-18-2005 02:29 PM
Another question about inheritance (up-casting and down-casting) kevin Java 11 01-08-2005 07:11 PM



Advertisments
 



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 47 48 49 50 51 52 53 54 55 56 57