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

Subversion Repositories open_free_list

[/] [open_free_list/] [trunk/] [docs/] [open_free_list.html] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 amif2000
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<html>
3
<head>
4
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
5
<title>Open FreeList Readme</title>
6
</head>
7
<body>
8
<h1>General Description</h1>
9
<p>
10
        The Open FreeList module is used to manage a set of variable sized packets inside a fixed memory block.
11
        The memory block is partitioned into fixed sized chunks and each packet uses one or more chunks.
12
        The module offers three possible actions:
13
        <ol>
14
                <li>Write a packet into memory</li>
15
                <li>Read a packet from memory</li>
16
                <li>Release a packet</li>
17
        </ol>
18
</p>
19
<h1>Using the Module</h1>
20
        <h2>Parameters</h2>
21
        <table border="1">
22
                <col align="left"/>
23
                <col align="left"/>
24
                <col align="center"/>
25
                <col align="center"/>
26
                <tr>
27
                        <th>Name</th>
28
                        <th>Description</th>
29
                        <th>Unit</th>
30
                        <th>Default Value</th>
31
                </tr>
32
                <tr>
33
                        <td>RAM_W</td>
34
                        <td>Memory block width</td>
35
                        <td>bits</td>
36
                        <td>128</td>
37
                </tr>
38
                <tr>
39
                        <td>RAM_E</td>
40
                        <td>Memory block extra data</td>
41
                        <td>bits</td>
42
                        <td>0</td>
43
                </tr>
44
                <tr>
45
                        <td>RAM_S</td>
46
                        <td>Memory block size</td>
47
                        <td>KBytes</td>
48
                        <td>64</td>
49
                </tr>
50
                <tr>
51
                        <td>CHK_S</td>
52
                        <td>Chunk size</td>
53
                        <td>Bytes</td>
54
                        <td>128</td>
55
                </tr>
56
                <tr>
57
                        <td>RAM_TYPE</td>
58
                        <td>Memory block type</td>
59
                        <td>string</td>
60
                        <td>"MRAM"</td>
61
                </tr>
62
                <tr>
63
                        <td>FL_AEMPTY_LVL</td>
64
                        <td>FreeList almost empty level</td>
65
                        <td>#</td>
66
                        <td>2</td>
67
                </tr>
68
        </table>
69
        <h2>Interface</h2>
70
        <table border="1">
71
                <col align="left"/>
72
                <col align="center"/>
73
                <col align="center"/>
74
                <col align="left"/>
75
                <tr>
76
                        <th>Name</th>
77
                        <th>Direction</th>
78
                        <th>Width</th>
79
                        <th>Description</th>
80
                </tr>
81
                <tr>
82
                        <td colspan="4" align="center"><b>global signals</b></td>
83
                </tr>
84
                <tr>
85
                        <td>reset_n</td>
86
                        <td>input</td>
87
                        <td>1</td>
88
                        <td>async reset (active low)</td>
89
                </tr>
90
                <tr>
91
                        <td>clk</td>
92
                        <td>input</td>
93
                        <td>1</td>
94
                        <td>clock</td>
95
                        </tr>
96
                <tr>
97
                        <td colspan="4" align="center"><b>write interface</b></td>
98
                </tr>
99
                <tr>
100
                        <td>fl_q</td>
101
                        <td>output</td>
102
                        <td>clog(#_of_chunks)</td>
103
                        <td>first chunk number for a new packet.<br />capture this value and use it to read/release the packet</td>
104
                </tr>
105
                <tr>
106
                        <td>fl_aempty</td>
107
                        <td>output</td>
108
                        <td>1</td>
109
                        <td>indicates that the number of chunks reached the almost empty level</td>
110
                </tr>
111
                <tr>
112
                        <td>fl_empty</td>
113
                        <td>output</td>
114
                        <td>1</td>
115
                        <td>no more chunks available. do not write any more</td>
116
                </tr>
117
                <tr>
118
                        <td>wren</td>
119
                        <td>input</td>
120
                        <td>1</td>
121
                        <td>write pulse. writes the data on din into the memory block</td>
122
                </tr>
123
                <tr>
124
                        <td>din</td>
125
                        <td>input</td>
126
                        <td>RAM_W+RAM_E</td>
127
                        <td>data to write into memory block</td>
128
                </tr>
129
                <tr>
130
                        <td>eop</td>
131
                        <td>input</td>
132
                        <td>1</td>
133
                        <td>end-of-packet indication. assert on last write of packet</td>
134
                </tr>
135
                <tr>
136
                        <td colspan="4" align="center"><b>read interface</b></td>
137
                </tr>
138
                <tr>
139
                        <td>chunk_num</td>
140
                        <td>input</td>
141
                        <td>clog(#_of_chunks)</td>
142
                        <td>first chunk in a packet to be read or released</td>
143
                </tr>
144
                <tr>
145
                        <td>load_req</td>
146
                        <td>input</td>
147
                        <td>1</td>
148
                        <td>request to read a packet starting at chunk number 'chunk_num'</td>
149
                </tr>
150
                <tr>
151
                        <td>rel_req</td>
152
                        <td>input</td>
153
                        <td>1</td>
154
                        <td>request to release a packet starting at chunk number 'chunk_num'.<br />also required after a packet is read</td>
155
                </tr>
156
                <tr>
157
                        <td>load_rel_ack</td>
158
                        <td>output</td>
159
                        <td>1</td>
160
                        <td>acknowledge a read or release request</td>
161
                </tr>
162
                <tr>
163
                        <td>rden</td>
164
                        <td>input</td>
165
                        <td>1</td>
166
                        <td>read request. data on 'dout' is valid one clock later</td>
167
                </tr>
168
                <tr>
169
                        <td>dout</td>
170
                        <td>output</td>
171
                        <td>RAM_W+RAM_E</td>
172
                        <td>data read from memory block</td>
173
                </tr>
174
        </table>
175
        <h2>Operations</h2>
176
        <h3>Write</h3>
177
        <p>
178
        To write a packet, do the following:
179
        <ul>
180
                <li>make sure 'fl_empty' is de-asserted</li>
181
                <li>capture the value on 'fl_q'. it will be used later to reference this packet</li>
182
                <li>while 'fl_empty' is not asserted do:</li>
183
                <ul>
184
                        <li>write the next data line in 'din'</li>
185
                        <li>assert 'wren'</li>
186
                        <li>on the last line of the packet, assert 'eop' as well</li>
187
                </ul>
188
        </ul>
189
        </p>
190
        <h3>Read</h3>
191
        <p>
192
        To read a packet that was previously written, do the following:
193
        <ul>
194
                <li>set 'chunk_num' to the value of the first chunk in the packet.<br />
195
                this value was obtained from 'fl_q' when the packet was written</li>
196
                <li>assert 'load_req'</li>
197
                <li>when 'load_rel_ack' is asserted, for each line of data do:</li>
198
                <ul>
199
                        <li>assert 'rden'</li>
200
                        <li>capture 'dout' one cycle later</li>
201
                </ul>
202
        </ul>
203
        To determine the last line of data, you could:
204
        <ul>
205
                <li>store the packet length in an external structure</li>
206
                <li>use the extra bits in the memory block to hold an indication such as end-of-packet</li>
207
        </ul>
208
        </p>
209
        <p>
210
        Note that the 'eop' indication that is written in the write operation is not available on a read operation.
211
        </p>
212
        <p>
213
        <i>Important:</i> after a read is complete, a release operation must be explicitly performed.
214
        There is no need to set the 'chunk_num' value after a read operation.
215
        The chunks are released when the packet is read, but the last chunk requires an explicit release operation.
216
        </p>
217
        <h3>Release</h3>
218
        <p>A packet can be released under two circumstances:
219
        <ol>
220
                <li>when a read is complete, a release must be issued</li>
221
                <li>if a packet is not needed, it can be released without reading it</li>
222
        </ol>
223
        To release a packet, do the following:
224
        <ul>
225
                <li>set 'chunk_num' to the first chunk of the packet (not required after a read)</li>
226
                <li>assert 'rel_req'</li>
227
                <li>when 'load_rel_ack' is asserted, you are done</li>
228
        </ul>
229
        </p>
230
        <h2>Memories</h2>
231
        <p>
232
        Three memories are used in this module:
233
        <ol>
234
                <li>ram - dual port memory. two cycles to read</li>
235
                <li>free_list - single clock lookahead FIFO</li>
236
                <li>link_list - dual port memory. two cycles to read</li>
237
        </ol>
238
        The target architecture is Altera Sratix. There should be matching memory blocks in other architectures.
239
        </p>
240
        <p><br /><br /></p>
241
        <p>
242
        Code: Alex Manash - Crescendo Networks<br />
243
        Docs: Amit Fridman - Crescendo Networks
244
        </p>
245
</body>
246
</html>

powered by: WebSVN 2.1.0

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