Homework 1 (25 points)
1. Which of the following identifiers is not legal and state why? (A_A, A_, 9U, A%B, P8_3, e4, wait, in, OU_T).
2. Which of the following is not a legal integer literal and why? (12_000, 1E-0, 2#1101#, 5#44#, 3#3#, 16#F# E3).
3. Which of the following is not a legal floating point literal and why? (1_0.00, 100_.0, 1.1E-2, 2#10.1 1#, 16#F#E2, 1_0.0).
4. Which of the following is not a legal bit string literal and why? (2"110", B"1101", O"047", H"ABcd", 10"99", "0101").
5. What is the default value of an object of type integer if the default value is not specified in the object declaration?
6. For the following VHDL code, correct syntax errors and explain the reasons. Use a VHDL analyzer to verify your answers.
1 entity EXP is
2 end EXP;
3
4 architecture RTL of EXP is
5 signal A, B, C, D, E, F: bit;
6 signal X, Y, Z, S, T, R: bit;
7 begin
8 R <= A and B and C;
9 S <= B or C or D;
10 T <= A and B or D;
11 Y <= C nor E nor F;
12 X <= A and not B and not C;
13 Z <= F nand E nand B;
14 end RTL;