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

 

  1. Write wave list outputs for the architectures shown below when enable is applied as shown in the test bench.
  2.  

    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

     

     

     

     

     

  3. The following code places sequential transactions on the drivers of isa, idb, tsa, and tdb signals. For each signal write a single concurrent signal assignment to place the same transactions on the driver the signal. In addition to four signal assignment for isa, idb, tsa, and tdb, you can use an activation signal and another signal assignment for activating it. Note: mvl3 is a 3-value logic defined to have ‘0’, ‘1’, ‘Z’ as its enumaration elements.
  4.  

    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;

  5. A signal driver is passed to a procedure when SIGNAL is declared with a procedure parameter, otherwise signal value is passed to the procedure. Considering this, show waveforms generated on see_flag and look_flag from time 0 to the time that no more events occur in the circuit.
  6.  

    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

     

     

  7. Is the statement shown in the statement part of the architecture shown below a valid VHDL statement? Does this architecture simulate as it is shown here? If not, write a function so that when used by the description shown here, the signal assignment in this description becomes a valid simulatable VHDL statement. What you write the function to do is not important, just write a valid function to return any thing that makes the statement simulatable.
  8.  

     

    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;

  9. Write a VHDL architecture with an enable input and 3 data inputs a, b, and c. When enable becomes ‘1’, events on a, b, and c are counted and will be reported to the output when enable becomes 0. The output is a 4-bit binary number that can only keep modulo-16 counts of the input events. Consider simultaneous events on the inputs.
  10.  

     

  11. Write a dataflow description using concurrent signals assignments for an unconstrained counter that starts in 00…001 state and with each clock, it rotates with the most significant bit receiving the complement of the least significant bit. For example if the current contents are 1001101 the next two counts will be 0100110 and 1010011.