Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

vhdl syntax '#' maens??

Status
Not open for further replies.

rourabpaul

Member level 3
Joined
Aug 14, 2010
Messages
67
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
kolkata
Activity points
1,747
what does in mean in VHDL
constant MAX_EXP : INTEGER := 2#11111111#;
i dont know what '#' means
 

ckshivaram

Advanced Member level 5
Joined
Apr 21, 2008
Messages
5,060
Helped
2,149
Reputation
4,304
Reaction score
2,088
Trophy points
1,393
Location
villingen (Germany) / Bangalore
Activity points
30,086
these are based integers
these are literals of VHDL
e.g. Decimal integers: 1 42 153_1203
Based integers: 2#1_0010# 16#F001D#
Characters: ’0’ ’1’ ’X’
Strings: "101011" "XXXXXX"
Bit string literals: B"1001_0101" X"95"
mean "10010101"
Underscores added for readability are ignored
 

TrickyDicky

Advanced Member level 5
Joined
Jun 7, 2010
Messages
7,102
Helped
2,079
Reputation
4,177
Reaction score
2,042
Trophy points
1,393
Activity points
39,684
the # means based integer - so the number inside the ## is in the base specified outside

so 2#1111# is 15 in base 2
16#F# is 15 in base 16

So the MAX_EXP constant is 255 in binary.
 

ckshivaram

Advanced Member level 5
Joined
Apr 21, 2008
Messages
5,060
Helped
2,149
Reputation
4,304
Reaction score
2,088
Trophy points
1,393
Location
villingen (Germany) / Bangalore
Activity points
30,086
read this as reference
**broken link removed**
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top