Documentation for architecture MROD_X_Out/DS2401_Functionality/a0
VHDL Contents
1 architecture a0 of DS2401_Functionality is
24 Constant Trstl: Time := 480 us; Constant Tpdh: Time := 60 us; Constant Tpdl: Time := 60 us; Constant Tsamping_window_start: Time := 15 us; Constant Tsamping_window_end: Time := 60 us; Constant Tsu: Time := 1 us; Constant Tlowr: Time := 15 us; Constant Trdv: Time := 15 us; Constant Trelease: Time := 0 us; begin
34 Process
35 Variable FamID: std_logic_vector(7 downto 0);
36 Variable DevID: std_logic_vector(47 downto 0);
37 Variable CrcID: std_logic_vector(7 downto 0);
38 Begin
39
40 wait until I = '0';
42 wait for Trstl;
43 wait until rising_Edge(I);
44 wait for Tpdh;
45
46 O <= '0';
48 wait for Tpdl;
49 O <= '1';
50
51 for x in 0 to 7 loop
53 wait until I = '0' and I'Event;
54 wait for Tsamping_window_start;
55 wait for (Tsamping_window_end - Tsamping_window_start) /2;
56 If I = '0' Or I = 'L' Then
58 Command(x) <= '0';
59 ElsIf I = '1' Or I = 'H' Then
60 Command (x) <= '1';
61 Else
62 Command (x) <= 'U';
63 End If;
64 End Loop;
65
66 FamID := HexToStdLogicVector(Family_ID,8);
67 DevID := HexToStdLogicVector(ID,48);
68 CrcID := HexToStdLogicVector(CRC,8);
69
70 Family_ID_o <= FamID;
71 ID_o <= DevID;
72 CRC_o <= CrcID;
73
74 for x in 0 to 7 loop
76 wait until I = '0' and I'Event;
77 wait for Tsu;
78 O <= FamID(x);
79 wait for Trdv - Tsu;
80 wait for Trelease;
81 O <= '1';
82 End Loop;
83
84 for x in 0 to 47 loop
86 wait until I = '0' and I'Event;
87 wait for Tsu;
88 O <= DevID(x);
89 wait for Trdv - Tsu;
90 wait for Trelease;
91 O <= '1';
92 End Loop;
93
94 for x in 0 to 7 loop
96 wait until I = '0' and I'Event;
97 wait for Tsu;
98 O <= CrcID(x);
99 wait for Trdv - Tsu;
100 wait for Trelease;
101 O <= '1';
102 End Loop;
103
104 End Process;
105 end architecture a0 ;