Disconnect Example - EDA Playground
Warning! This exercise has been opened in another tab; autosave has been disabled. Close this tab or refresh to reactivate.

 Languages & Libraries

 Tools & Simulators

 Examples

202


11
 
1
library IEEE;
2
use IEEE.std_logic_1164.all;
3
4
entity testbench is
5
end entity testbench;
6
7
architecture DUMMY of testbench is
8
begin
9
  DUT : entity work.EX_DISCONNECT(A1);
10
end architecture DUMMY;
11
xxxxxxxxxx
1
39
 
1
-- THE EXAMPLES ARE DIRECTLY BELOW
2
                                               library IEEE;
3
                                               use IEEE.STD_LOGIC_1164.all;
4
                                               
5
                                               entity EX_DISCONNECT is
6
                                               end entity EX_DISCONNECT;
7
----------------------------------------
8
                                               
9
architecture A1 of EX_DISCONNECT is
10
11
  signal Foo : STD_LOGIC bus;
12
  disconnect Foo: STD_LOGIC after 10 NS; -- then goes to 'Z'
13
  signal D : STD_LOGIC;
14
                                                 
15
begin
16
17
  Logic: block (D) is -- block executes while D = '1'
18
  begin
19
    Foo <= guarded D; -- Foo remains '1' for up to 10 NS after D /= '1' then goes to 'Z' 
20
  end block Logic;  
21
  
22
----------------------------------------
23
                                                 Stim: process
24
                                                 begin
25
                                                   D <= '0';
26
                                                wait for 20 NS;
27
                                                   D <= '1';
28
                                                wait for 20 NS;
29
                                                D <= '0';
30
                                                wait for 15 NS;
31
                                                   D <= '1';
32
                                                wait for 5 NS;
33
                                                D <= '0';
34
                                                   wait for 15 NS;
35
                                                   wait;
36
                                                 end process Stim;
37
                                               
38
                                               end architecture A1;
39
808 views and 0 likes     
 
# Disconnect Example
A disconnect defines the delay with which the drivers of a guarded signal are disconnected from the resolution function, when the signal is assigned by a guarded signal assignment. A driver is disconnected by assigning the signal the value null.
## Notes
 * The list of signal names may be replaced by others or all.
 * Each signal must be declared as a guarded signal, and must be assigned in a guarded signal assignment.
 * Not synthesizable. Instead, use the types STD_LOGIC and STD_LOGIC_VECTOR, and assign the value 'Z' to a signal to represent high impedance.
 
**Don't use guarded signals or disconnection!**

Disconnect Example

A disconnect defines the delay with which the drivers of a guarded signal are disconnected from the resolution function, when the signal is assigned by a guarded signal assignment. A driver is disconnected by assigning the signal the value null.

Notes

  • The list of signal names may be replaced by others or all.
  • Each signal must be declared as a guarded signal, and must be assigned in a guarded signal assignment.
  • Not synthesizable. Instead, use the types STD_LOGIC and STD_LOGIC_VECTOR, and assign the value 'Z' to a signal to represent high impedance.

Don't use guarded signals or disconnection!

91010:0