Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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,070
Helped
2,149
Reputation
4,304
Reaction score
2,089
Trophy points
1,393
Location
villingen (Germany) / Bangalore
Activity points
30,097
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,055
Helped
2,075
Reputation
4,167
Reaction score
2,028
Trophy points
1,393
Activity points
39,017
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,070
Helped
2,149
Reputation
4,304
Reaction score
2,089
Trophy points
1,393
Location
villingen (Germany) / Bangalore
Activity points
30,097
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top