What does the sharp sign mean in VHDL?

B

bigyellow

for example, In the code

constant A : std_logic_vector(7 downto 0) :=
conv_std_logic_vector(16#12#, 8);

what does the 16#12# mean here?
 
T

Tricky

OT2: How many examples are there of digit-strings N, M
such that M /= N and N#M# = M#N# ???
--

off the top of my head:

10#2# = 2#10 = 2
10#3# = 3#10 = 3
etc, forever
(1#10# is not a legal representation)

also, any combination of 11-19, eg 11#19 = 19#11, 13#16#

After this, differences gradually diverge, eg
11#20# = 22, 20#11# = 21 diff = 1
11#21# = 23, 21#11# = 22 diff = 1
.....
12#20# = 24, 20#12# = 22 diff = 2
12#21# = 25, 21#12# = 23 diff = 2
......
etc


so assuming thats all of them, then 56 + (infinity: 10#N#, N#10# where
N /= 0, 1 or 10)

I really ought to get back to work.
 
D

diogratia

off the top of my head:

10#2# = 2#10 = 2
10#3# = 3#10 = 3
etc, forever
(1#10# is not a legal representation)

also, any combination of 11-19, eg 11#19 = 19#11, 13#16#

After this, differences gradually diverge, eg
11#20# = 22, 20#11# = 21 diff = 1
11#21# = 23, 21#11# = 22 diff = 1
....
12#20# = 24, 20#12# = 22 diff = 2
12#21# = 25, 21#12# = 23 diff = 2
.....
etc

so assuming thats all of them, then 56 + (infinity: 10#N#, N#10# where
N /= 0, 1 or 10)
Not in VHDL:

13.4.2 Based literals

A based literal is an abstract literal expressed in a form that
specifies the base explicitly. The base must be at least two and at
most sixteen.
 
D

diogratia

off the top of my head:

10#2# = 2#10 = 2
10#3# = 3#10 = 3
etc, forever
(1#10# is not a legal representation)

also, any combination of 11-19, eg 11#19 = 19#11, 13#16#

After this, differences gradually diverge, eg
11#20# = 22, 20#11# = 21 diff = 1
11#21# = 23, 21#11# = 22 diff = 1
....
12#20# = 24, 20#12# = 22 diff = 2
12#21# = 25, 21#12# = 23 diff = 2
.....
etc

so assuming thats all of them, then 56 + (infinity: 10#N#, N#10# where
N /= 0, 1 or 10)

I really ought to get back to work.

Not in VHDL:

13.4.2 Based literals

A based literal is an abstract literal expressed in a form that
specifies the base explicitly. The base must be at least two and at
most sixteen.
 
M

MikeWhy

diogratia said:
Not in VHDL:

13.4.2 Based literals

A based literal is an abstract literal expressed in a form that
specifies the base explicitly. The base must be at least two and at
most sixteen.

The muse posed stipulated M /= N.
 
D

diogratia

The muse posed stipulated M /= N.

With based literals comprised of base and based integers substituted
appropriately for N and M in the expression described by:

N#M# = M#N#
e.g.:
2#10# = 10#2#

M is limited by the right hand based literal and N is limited by the
left hand based literal by acceptable values of the base. The base in
the domain 'at least two and at most sixteen'.
 

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,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top