NORTHEASTERN UNIVERSITY
Electrical and Computer Engineering Department
Digital Systems Design With VHDL, Test # 1
ECE 3401 / DS 765F
Summer Quarter 1997
Week of Lecture 14
Computer Account #___________________
First Name :_________________________
Last Name :__________________________
Number :_____________________________
Signature :__________________________
Grade:
Problem 1. ______/20
Problem 2. ______/20
Problem 3. ______/20
Problem 4. ______/20
Problem 5. ______/20
Total: ______/100
EXTRA SHEETS WILL NOT BE ACCEPTED
THIS IS A OPEN BOOK OPEN NOTE EXAM, NO LAPTOPS ARE ALLOWED
YOU HAVE EXACTLY TWO HOURS AND A HALF TO DO THIS TEST
YOU MUST SHOW COMPLETE WORK ON ALL PROBLEMS
ENTITY assign IS
PORT (enable : IN BIT; wave : OUT BIT);
END assign;
--
ARCHITECTURE one_process OF assign IS
BEGIN
PROCESS (enable)
BEGIN
wave <= '1', '0' AFTER 40 NS, '1' AFTER 80 NS;
END PROCESS;
END one_process;
--
ARCHITECTURE concurrent OF assign IS
SIGNAL rl : BIT; -- To use on right and left
BEGIN
rl <= '1', '0' AFTER 40 NS, '1' AFTER 80 NS WHEN enable'EVENT ELSE rl;
wave <= rl;
END concurrent;
--
ENTITY assign_tester IS END assign_tester;
--
ARCHITECTURE generation OF assign_tester IS
COMPONENT assign
PORT (enable : IN BIT; wave : OUT BIT);
END COMPONENT;
FOR a1 : assign USE ENTITY WORK.assign (one_process);
FOR a2 : assign USE ENTITY WORK.assign (concurrent);
SIGNAL enable, wave1, wave2 : BIT := '0';
BEGIN
a1 : assign PORT MAP (enable, wave1);
a2 : assign PORT MAP (enable, wave2);
enable <= '0', '1' AFTER 80 NS, '0' AFTER 110 NS, '1' AFTER 175 NS;
END generation;
Ps |
delta |
enable |
wave1 |
wave2 |
0 |
+0 |
0 |
|
|
0 |
+1 |
0 |
|
|
40000 |
+0 |
0 |
|
|
80000 |
+0 |
1 |
|
|
110000 |
+0 |
0 |
|
|
150000 |
+0 |
0 |
|
|
175000 |
+0 |
1 |
|
|
175000 |
+1 |
1 |
|
|
215000 |
+0 |
1 |
|
|
255000 |
+0 |
1 |
|
|
ENTITY sequential_transactions IS
PORT (isa, isb, ida, idb, tsa, tsb, tda, tdb : OUT mvl3 := 'Z' );
END sequential_transactions;
--
ARCHITECTURE in_process OF sequential_transactions IS
BEGIN
PROCESS
BEGIN
-- ('0', 15 NS) existing transaction
isa <= '0' AFTER 15 NS;
idb <= '0' AFTER 15 NS;
tsa <= '0' AFTER 15 NS;
tdb <= '0' AFTER 15 NS;
-- an incoming new transaction
isa <= '0' AFTER 20 NS;
idb <= '1' AFTER 10 NS;
tsa <= TRANSPORT '0' AFTER 20 NS;
tdb <= TRANSPORT '1' AFTER 10 NS;
WAIT;
END PROCESS;
END in_process;
ENTITY drivpass IS
PORT (see_flag, look_flag : OUT BIT);
PROCEDURE wait_and_look (SIGNAL passed : IN BIT; SIGNAL flag : OUT BIT) IS
BEGIN
WAIT FOR 15 NS;
flag <= passed;
END wait_and_look;
PROCEDURE wait_and_see (passed : IN BIT; SIGNAL flag : OUT BIT) IS
BEGIN
WAIT FOR 15 NS;
flag <= passed;
END wait_and_see;
END drivpass;
--
ARCHITECTURE concurrent OF drivpass IS
SIGNAL future_look : BIT := '0';
BEGIN
future_look <= '1' AFTER 10 NS, '0' AFTER 20 NS,
'1' AFTER 40 NS, '0' AFTER 60 NS,
'1' AFTER 70 NS;
wait_and_see (future_look, see_flag);
wait_and_look (future_look, look_flag);
END concurrent;
Ps |
delta |
Future_look |
see_flag1 |
look_flag1 |
0 |
+0 |
0 |
|
|
10000 |
+0 |
1 |
|
|
15000 |
+1 |
1 |
|
|
20000 |
+0 |
0 |
|
|
35000 |
+1 |
0 |
|
|
40000 |
+0 |
1 |
|
|
55000 |
+1 |
1 |
|
|
60000 |
+0 |
0 |
|
|
70000 |
+0 |
1 |
|
|
75000 |
+1 |
1 |
|
|
80000 |
.. |
1 |
|
|
85000 |
.. |
1 |
|
|
ENTITY WhatIsThis IS
--FUNCTION ???
…..
--END ???
END WhatIsThis;
--
ARCHITECTURE behavioral OF WhatIsThis IS
SIGNAL a, b, c, d : INTEGER := 0;
BEGIN
a <= (b <= c) <= d;
END behavioral;