OpenCores
URL https://opencores.org/ocsvn/tcp_socket/tcp_socket/trunk

Subversion Repositories tcp_socket

[/] [tcp_socket/] [trunk/] [chips2/] [documents/] [INTERCONNECT.rst] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 jondawson
Interconnect Conventions
2
=========================
3
 
4
These are the interface conventions followed by the VHDLToolbox.
5
The main aims of the interface are:
6
  - To be simple to implement.
7
  - Add little performance/logic overhead.
8
  - Allow designs to grow without adding extra levels of asynchronous logic.
9
  - Easy to interface with standard interconnects.
10
 
11
::
12
 
13
  RST >-o-----------------------------+
14
  CLK >-+-o-------------------------+ |
15
        | |                         | |
16
        | |   +-----------+         | |     +--------------+
17
        | |   | TX        |         | |     | RX           |
18
        | +--->           |         | +----->              |
19
        +----->           |         +------->              |
20
              |           |                 |              |
21
              |           |       |              |
22
              |       out >=================> in           |
23
              |           | _STB  |              |
24
              |       out >-----------------> in           |
25
              |           | _ACK  |              |
26
              |       in  <-----------------< out          |
27
              |           |                 |              |
28
              +-----------+                 +--------------+
29
 
30
Global Signals
31
--------------
32
 
33
  +------+------------+-------------------+--------------+
34
  | Name |  Direction |        Type       |  Description |
35
  +======+============+===================+==============+
36
  | CLK  |    input   |  std_logic Global |     Clock    |
37
  +------+------------+-------------------+--------------+
38
  | RST  |    input   |  std_logic Global |     Reset    |
39
  +------+------------+-------------------+--------------+
40
 
41
Interconnect Signals
42
--------------------
43
 
44
  +----------------+------------+-------------------+------------------------------------------------------------+
45
  |      Name      |  Direction |        Type       |                         Description                        |
46
  +================+============+===================+============================================================+
47
  |      |  TX to RX  |  std_logic_vector |                        Payload Data                        |
48
  +----------------+------------+-------------------+------------------------------------------------------------+
49
  | _STB |  TX to RX  |      std_logic    |  '1' indicates that payload data is valid and TX is ready. |
50
  +----------------+------------+-------------------+------------------------------------------------------------+
51
  | _ACK |  TX to RX  |      std_logic    |               '1' indicates that RX is ready.              |
52
  +----------------+------------+-------------------+------------------------------------------------------------+
53
 
54
Interconnect Bus Transaction
55
----------------------------
56
 
57
  - Both transmitter and receiver shall be synchronised to the '0' -> '1' transition of CLK.
58
  - If RST is set to '1' upon the '0' -> '1' transition of clock the transmitter shall terminate any active bus transaction and set _STB to '0'.
59
  - If RST is set to '1' upon the '0' -> '1' transition of clock the receiver shall terminate any active bus transaction and set _ACK to '0'.
60
  - If RST is set to '0', normal operation shall commence as follows:
61
  - The transmitter may insert wait states on the bus by setting _STB '0'.
62
  - The transmitter shall set _STB to '1' to signify that data is valid.
63
  - Once _STB has been set to '1', it shall remain at '1' until the transaction completes.
64
  - The transmitter shall ensure that  contains valid data for the entire period that _STB is '1'.
65
  - The transmitter may set  to any value when _STB is '0'.
66
  - The receiver may insert wait states on the bus by setting _ACK to '0'.
67
  - The receiver shall set _ACK to '1' to signify that it is ready to receive data.
68
  - Once _ACK has been set to '1', it shall remain at '1' until the transaction completes.
69
  - Whenever _STB is '1' and _ACK are '1', a bus transaction shall complete on the following '0' -> '1' transition of CLK.
70
 
71
::
72
 
73
RST
74
                 --------------------------------------------------------------
75
                   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
76
 CLK              | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
77
                 -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
78
 
79
                 ----- ------- ------------------------------------------------
80
           X VALID X
81
                 ----- ------- ------------------------------------------------
82
                       -------
83
_STB       |       |
84
                 -----         ------------------------------------------------
85
                           ---
86
_ACK           |   |
87
                 ---------     ------------------------------------------------
88
 
89
 
90
                       ^^^^ RX adds wait states
91
 
92
                           ^^^^  Data transfers
93
 
94
RST
95
                 --------------------------------------------------------------
96
                   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
97
 CLK              | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
98
                 -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
99
 
100
                 ----- ------- ------------------------------------------------
101
           X VALID X
102
                 ----- ------- ------------------------------------------------
103
                           ---
104
_STB           |   |
105
                 ---------     ------------------------------------------------
106
                       -------
107
_ACK       |       |
108
                 -----         ------------------------------------------------
109
 
110
 
111
                       ^^^^ TX adds wait states
112
 
113
                           ^^^^  Data transfers
114
 
115
- Both the transmitter and receiver may commence a new transaction without inserting any wait states.
116
 
117
::
118
RST
119
                 --------------------------------------------------------------
120
                   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
121
 CLK              | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
122
                 -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
123
 
124
                 ----- ------- ---- ---- --------------------------------------
125
           X D0    X D1 X D2 X
126
                 ----- ------- ---- ---- --------------------------------------
127
                           -------------
128
_STB           |             |
129
                 ---------               --------------------------------------
130
                       -----------------
131
_ACK       |                 |
132
                 -----                   --------------------------------------
133
 
134
                        ^^^^ TX adds wait states
135
 
136
                             ^^^^  Data transfers
137
 
138
                                 ^^^^ STB and ACK needn't return to 0 between data words
139
 
140
 
141
- The receiver may delay a transaction by inserting wait states until the transmitter indicates that data is available.
142
 
143
- The transmitter shall not delay a transaction by inserting wait states until the receiver is ready to accept data.
144
 
145
- Deadlock would occur if both the transmitter and receiver delayed a transaction until the other was ready.
146
 
147
Example Transmitter FSM
148
-----------------------
149
 
150
::
151
 
152
  ...
153
 
154
  process
155
  begin
156
    wait until rising_edge(CLK);
157
 
158
    case STATE is
159
 
160
      ...
161
 
162
      when TRANSMIT_STATE =>
163
 
164
        S_BUS_STB <= '1';
165
        if S_BUS_STB = '1' and BUS_ACK = '1';
166
          LOCAL_DATA <= BUS;
167
          S_BUS_STB <= '0';
168
          STATE <= NEXT_STATE;
169
        end if;
170
 
171
      ...
172
 
173
      if RST = '1' then
174
        S_BUS_STB <= '0';
175
        ...
176
      end if;
177
 
178
  end process;
179
 
180
  BUS_STB <= S_BUS_STB;
181
 
182
  ...
183
 
184
 
185
Example Reciever FSM
186
--------------------
187
 
188
::
189
 
190
  ...
191
 
192
  process
193
  begin
194
    wait until rising_edge(CLK);
195
 
196
    case STATE is
197
 
198
      ...
199
 
200
      when RECIEVE_STATE =>
201
 
202
        S_BUS_ACK <= '1';
203
        BUS <= LOCAL_DATA;
204
        if BUS_STB = '1' and S_BUS_ACK = '1';
205
          S_BUS_ACK <= '0';
206
          STATE <= NEXT_STATE;
207
        end if;
208
 
209
      ...
210
      if RST = '1' then
211
        S_BUS_ACK <= '0';
212
        ...
213
      end if;
214
 
215
  end process;
216
 
217
  BUS_ACK <= S_BUS_ACK;
218
 
219
  ...

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.