1 | # vl2mv arbiter_le.v |
---|
2 | # version: 0.2 |
---|
3 | # date: 15:54:18 11/04/96 (PST) |
---|
4 | .model main |
---|
5 | # I/O ports |
---|
6 | .outputs ackA |
---|
7 | .outputs ackB |
---|
8 | .outputs ackC |
---|
9 | |
---|
10 | .mv sel 4 A B C X |
---|
11 | # assign active = pass_tokenA || pass_tokenB || pass_tokenC |
---|
12 | # pass_tokenA || pass_tokenB |
---|
13 | .names pass_tokenA pass_tokenB _n1 |
---|
14 | .def 1 |
---|
15 | 0 0 0 |
---|
16 | # pass_tokenA || pass_tokenB || pass_tokenC |
---|
17 | .names _n1 pass_tokenC _n2 |
---|
18 | .def 1 |
---|
19 | 0 0 0 |
---|
20 | .names _n2 active$raw_n0 |
---|
21 | - =_n2 |
---|
22 | .mv _n3 4 A B C X |
---|
23 | .names _n3 |
---|
24 | A |
---|
25 | .subckt controller controllerA req=reqA ack=ackA sel=sel pass_token=pass_tokenA id=_n3 |
---|
26 | .mv _n4 4 A B C X |
---|
27 | .names _n4 |
---|
28 | B |
---|
29 | .subckt controller controllerB req=reqB ack=ackB sel=sel pass_token=pass_tokenB id=_n4 |
---|
30 | .mv _n5 4 A B C X |
---|
31 | .names _n5 |
---|
32 | C |
---|
33 | .subckt controller controllerC req=reqC ack=ackC sel=sel pass_token=pass_tokenC id=_n5 |
---|
34 | .subckt arbiter arbiter sel=sel active=active |
---|
35 | .subckt client clientA req=reqA ack=ackA |
---|
36 | .subckt client clientB req=reqB ack=ackB |
---|
37 | .subckt client clientC req=reqC ack=ackC |
---|
38 | .subckt observer observer req=reqA ack=ackA |
---|
39 | # conflict arbitrators |
---|
40 | .names active$raw_n0 active |
---|
41 | 0 0 |
---|
42 | 1 1 |
---|
43 | # non-blocking assignments |
---|
44 | # latches |
---|
45 | # quasi-continuous assignment |
---|
46 | .end |
---|
47 | |
---|
48 | |
---|
49 | .model controller |
---|
50 | # I/O ports |
---|
51 | .inputs sel |
---|
52 | .inputs req |
---|
53 | .outputs pass_token |
---|
54 | .outputs ack |
---|
55 | .inputs id |
---|
56 | |
---|
57 | .mv sel 4 A B C X |
---|
58 | .mv state 3 IDLE READY BUSY |
---|
59 | .mv id 4 A B C X |
---|
60 | # state = 0 |
---|
61 | .mv state$raw_n6 3 IDLE READY BUSY |
---|
62 | .names state$raw_n6 |
---|
63 | IDLE |
---|
64 | # non-blocking assignments for initial |
---|
65 | # ack = 0 |
---|
66 | .names ack$raw_n7 |
---|
67 | 0 |
---|
68 | # non-blocking assignments for initial |
---|
69 | # pass_token = 1 |
---|
70 | .names pass_token$raw_n8 |
---|
71 | 1 |
---|
72 | # non-blocking assignments for initial |
---|
73 | # assign is_selected = (sel == id ) |
---|
74 | # sel == id |
---|
75 | .names sel id _na |
---|
76 | .def 0 |
---|
77 | - =sel 1 |
---|
78 | .names _na is_selected$raw_n9 |
---|
79 | - =_na |
---|
80 | .mv _nd 3 IDLE READY BUSY |
---|
81 | .names _nd |
---|
82 | IDLE |
---|
83 | .names state _nd _nc |
---|
84 | .def 0 |
---|
85 | - =state 1 |
---|
86 | .names _nc _nb |
---|
87 | 1 1 |
---|
88 | 0 0 |
---|
89 | .names is_selected _ne |
---|
90 | - =is_selected |
---|
91 | .names req _nf |
---|
92 | - =req |
---|
93 | # state = 1 |
---|
94 | .mv state$req_n10$true 3 IDLE READY BUSY |
---|
95 | .names state$req_n10$true |
---|
96 | READY |
---|
97 | # pass_token = 0 |
---|
98 | .names pass_token$req_n11$true |
---|
99 | 0 |
---|
100 | # pass_token = 1 |
---|
101 | .names pass_token$req_n12$false |
---|
102 | 1 |
---|
103 | # if/else (req ) |
---|
104 | .names pass_token$req_n11$true pass_token$req_n12$false req pass_token$req$raw_n15 |
---|
105 | 0 - 1 0 |
---|
106 | 1 - 1 1 |
---|
107 | - 0 0 0 |
---|
108 | - 1 0 1 |
---|
109 | .mv state$req$raw_n19 3 IDLE READY BUSY |
---|
110 | .names state$req_n10$true state req state$req$raw_n19 |
---|
111 | - - 0 =state |
---|
112 | - - 1 =state$req_n10$true |
---|
113 | # pass_token = 0 |
---|
114 | .names pass_token$is_selected_n1b$false |
---|
115 | 0 |
---|
116 | # if/else (is_selected ) |
---|
117 | .names pass_token$req$raw_n15 pass_token$is_selected_n1b$false is_selected pass_token$is_selected$raw_n1f |
---|
118 | 0 - 1 0 |
---|
119 | 1 - 1 1 |
---|
120 | - 0 0 0 |
---|
121 | - 1 0 1 |
---|
122 | .mv state$is_selected$raw_n21 3 IDLE READY BUSY |
---|
123 | .names state$req$raw_n19 state is_selected state$is_selected$raw_n21 |
---|
124 | - - 0 =state |
---|
125 | - - 1 =state$req$raw_n19 |
---|
126 | .mv _n26 3 IDLE READY BUSY |
---|
127 | .names _n26 |
---|
128 | READY |
---|
129 | .names state _n26 _n25 |
---|
130 | .def 0 |
---|
131 | - =state 1 |
---|
132 | .names _n25 _n24 |
---|
133 | 1 1 |
---|
134 | 0 0 |
---|
135 | # state = 2 |
---|
136 | .mv state$_n24_n27$true 3 IDLE READY BUSY |
---|
137 | .names state$_n24_n27$true |
---|
138 | BUSY |
---|
139 | # ack = 1 |
---|
140 | .names ack$_n24_n28$true |
---|
141 | 1 |
---|
142 | .mv _n2b 3 IDLE READY BUSY |
---|
143 | .names _n2b |
---|
144 | BUSY |
---|
145 | .names state _n2b _n2a |
---|
146 | .def 0 |
---|
147 | - =state 1 |
---|
148 | .names _n2a _n29 |
---|
149 | 1 1 |
---|
150 | 0 0 |
---|
151 | .names req _n2c |
---|
152 | 0 1 |
---|
153 | 1 0 |
---|
154 | .names _n2c _n2d |
---|
155 | - =_n2c |
---|
156 | # state = 0 |
---|
157 | .mv state$_n2c_n2e$true 3 IDLE READY BUSY |
---|
158 | .names state$_n2c_n2e$true |
---|
159 | IDLE |
---|
160 | # ack = 0 |
---|
161 | .names ack$_n2c_n2f$true |
---|
162 | 0 |
---|
163 | # pass_token = 1 |
---|
164 | .names pass_token$_n2c_n30$true |
---|
165 | 1 |
---|
166 | # if/else (!req ) |
---|
167 | .names pass_token$_n2c_n30$true pass_token _n2c pass_token$_n2c$raw_n37 |
---|
168 | 0 - 1 0 |
---|
169 | 1 - 1 1 |
---|
170 | - 0 0 0 |
---|
171 | - 1 0 1 |
---|
172 | .mv state$_n2c$raw_n39 3 IDLE READY BUSY |
---|
173 | .names state$_n2c_n2e$true state _n2c state$_n2c$raw_n39 |
---|
174 | - - 0 =state |
---|
175 | - - 1 =state$_n2c_n2e$true |
---|
176 | .names ack$_n2c_n2f$true ack _n2c ack$_n2c$raw_n3a |
---|
177 | 0 - 1 0 |
---|
178 | 1 - 1 1 |
---|
179 | - 0 0 0 |
---|
180 | - 1 0 1 |
---|
181 | # case (state ) |
---|
182 | .mv state$_n29$raw_n42 3 IDLE READY BUSY |
---|
183 | .names state$_n2c$raw_n39 state _n29 state$_n29$raw_n42 |
---|
184 | - - 0 =state |
---|
185 | - - 1 =state$_n2c$raw_n39 |
---|
186 | .names pass_token$_n2c$raw_n37 pass_token _n29 pass_token$_n29$raw_n43 |
---|
187 | 0 - 1 0 |
---|
188 | 1 - 1 1 |
---|
189 | - 0 0 0 |
---|
190 | - 1 0 1 |
---|
191 | .names ack$_n2c$raw_n3a ack _n29 ack$_n29$raw_n45 |
---|
192 | 0 - 1 0 |
---|
193 | 1 - 1 1 |
---|
194 | - 0 0 0 |
---|
195 | - 1 0 1 |
---|
196 | .mv state$_n24$raw_n47 3 IDLE READY BUSY |
---|
197 | .names state$_n24_n27$true state$_n29$raw_n42 _n24 state$_n24$raw_n47 |
---|
198 | - - 0 =state$_n29$raw_n42 |
---|
199 | - - 1 =state$_n24_n27$true |
---|
200 | .names ack$_n24_n28$true ack$_n29$raw_n45 _n24 ack$_n24$raw_n48 |
---|
201 | 0 - 1 0 |
---|
202 | 1 - 1 1 |
---|
203 | - 0 0 0 |
---|
204 | - 1 0 1 |
---|
205 | .names pass_token pass_token$_n29$raw_n43 _n24 pass_token$_n24$raw_n4f |
---|
206 | 0 - 1 0 |
---|
207 | 1 - 1 1 |
---|
208 | - 0 0 0 |
---|
209 | - 1 0 1 |
---|
210 | .mv state$_nb$raw_n52 3 IDLE READY BUSY |
---|
211 | .names state$is_selected$raw_n21 state$_n24$raw_n47 _nb state$_nb$raw_n52 |
---|
212 | - - 0 =state$_n24$raw_n47 |
---|
213 | - - 1 =state$is_selected$raw_n21 |
---|
214 | .names pass_token$is_selected$raw_n1f pass_token$_n24$raw_n4f _nb pass_token$_nb$raw_n53 |
---|
215 | 0 - 1 0 |
---|
216 | 1 - 1 1 |
---|
217 | - 0 0 0 |
---|
218 | - 1 0 1 |
---|
219 | .names ack ack$_n24$raw_n48 _nb ack$_nb$raw_n5b |
---|
220 | 0 - 1 0 |
---|
221 | 1 - 1 1 |
---|
222 | - 0 0 0 |
---|
223 | - 1 0 1 |
---|
224 | # conflict arbitrators |
---|
225 | .names is_selected$raw_n9 is_selected |
---|
226 | 0 0 |
---|
227 | 1 1 |
---|
228 | .names _nb _ne _nf _n24 _n29 _n2d _n5d |
---|
229 | .def 0 |
---|
230 | 1 1 1 - - - 1 |
---|
231 | 0 - - 1 - - 1 |
---|
232 | 0 - - 0 1 1 1 |
---|
233 | .mv _n5e 3 IDLE READY BUSY |
---|
234 | .names _n5d state$_nb$raw_n52 state _n5e |
---|
235 | 1 - - =state$_nb$raw_n52 |
---|
236 | 0 - - =state |
---|
237 | .names _nb _ne _nf _n24 _n29 _n2d _n62 |
---|
238 | .def 0 |
---|
239 | 1 1 1 - - - 1 |
---|
240 | 1 1 0 - - - 1 |
---|
241 | 1 0 - - - - 1 |
---|
242 | 0 - - 0 1 1 1 |
---|
243 | .names _n62 pass_token$_nb$raw_n53 pass_token _n63 |
---|
244 | 1 0 - 0 |
---|
245 | 1 1 - 1 |
---|
246 | 0 - 0 0 |
---|
247 | 0 - 1 1 |
---|
248 | .names _nb _n24 _n29 _n2d _n64 |
---|
249 | .def 0 |
---|
250 | 0 1 - - 1 |
---|
251 | 0 0 1 1 1 |
---|
252 | .names _n64 ack$_nb$raw_n5b ack _n65 |
---|
253 | 1 0 - 0 |
---|
254 | 1 1 - 1 |
---|
255 | 0 - 0 0 |
---|
256 | 0 - 1 1 |
---|
257 | # non-blocking assignments |
---|
258 | # latches |
---|
259 | .r pass_token$raw_n8 pass_token |
---|
260 | 0 0 |
---|
261 | 1 1 |
---|
262 | .latch _n63 pass_token |
---|
263 | .r state$raw_n6 state |
---|
264 | - =state$raw_n6 |
---|
265 | .latch _n5e state |
---|
266 | .r ack$raw_n7 ack |
---|
267 | 0 0 |
---|
268 | 1 1 |
---|
269 | .latch _n65 ack |
---|
270 | # quasi-continuous assignment |
---|
271 | .end |
---|
272 | |
---|
273 | |
---|
274 | .model arbiter |
---|
275 | # I/O ports |
---|
276 | .outputs sel |
---|
277 | .inputs active |
---|
278 | |
---|
279 | .mv sel 4 A B C X |
---|
280 | .mv state 4 A B C X |
---|
281 | # state = 0 |
---|
282 | .mv state$raw_n66 4 A B C X |
---|
283 | .names state$raw_n66 |
---|
284 | A |
---|
285 | # non-blocking assignments for initial |
---|
286 | # assign sel = active ? state : 3 |
---|
287 | .mv sel$raw_n67 4 A B C X |
---|
288 | .mv _n68 4 A B C X |
---|
289 | .names _n68 |
---|
290 | X |
---|
291 | # active ? state : 3 |
---|
292 | .mv _n69 4 A B C X |
---|
293 | .names state _n68 active _n69 |
---|
294 | - - 0 =_n68 |
---|
295 | - - 1 =state |
---|
296 | .names _n69 sel$raw_n67 |
---|
297 | - =_n69 |
---|
298 | .names active _n6a |
---|
299 | - =active |
---|
300 | .mv _n6d 4 A B C X |
---|
301 | .names _n6d |
---|
302 | A |
---|
303 | .names state _n6d _n6c |
---|
304 | .def 0 |
---|
305 | - =state 1 |
---|
306 | .names _n6c _n6b |
---|
307 | 1 1 |
---|
308 | 0 0 |
---|
309 | # state = 1 |
---|
310 | .mv state$_n6b_n6e$true 4 A B C X |
---|
311 | .names state$_n6b_n6e$true |
---|
312 | B |
---|
313 | .mv _n71 4 A B C X |
---|
314 | .names _n71 |
---|
315 | B |
---|
316 | .names state _n71 _n70 |
---|
317 | .def 0 |
---|
318 | - =state 1 |
---|
319 | .names _n70 _n6f |
---|
320 | 1 1 |
---|
321 | 0 0 |
---|
322 | # state = 2 |
---|
323 | .mv state$_n6f_n72$true 4 A B C X |
---|
324 | .names state$_n6f_n72$true |
---|
325 | C |
---|
326 | .mv _n75 4 A B C X |
---|
327 | .names _n75 |
---|
328 | C |
---|
329 | .names state _n75 _n74 |
---|
330 | .def 0 |
---|
331 | - =state 1 |
---|
332 | .names _n74 _n73 |
---|
333 | 1 1 |
---|
334 | 0 0 |
---|
335 | # state = 0 |
---|
336 | .mv state$_n73_n76$true 4 A B C X |
---|
337 | .names state$_n73_n76$true |
---|
338 | A |
---|
339 | # case (state ) |
---|
340 | .mv state$_n73$raw_n79 4 A B C X |
---|
341 | .names state$_n73_n76$true state _n73 state$_n73$raw_n79 |
---|
342 | - - 0 =state |
---|
343 | - - 1 =state$_n73_n76$true |
---|
344 | .mv state$_n6f$raw_n7a 4 A B C X |
---|
345 | .names state$_n6f_n72$true state$_n73$raw_n79 _n6f state$_n6f$raw_n7a |
---|
346 | - - 0 =state$_n73$raw_n79 |
---|
347 | - - 1 =state$_n6f_n72$true |
---|
348 | .mv state$_n6b$raw_n7e 4 A B C X |
---|
349 | .names state$_n6b_n6e$true state$_n6f$raw_n7a _n6b state$_n6b$raw_n7e |
---|
350 | - - 0 =state$_n6f$raw_n7a |
---|
351 | - - 1 =state$_n6b_n6e$true |
---|
352 | # if/else (active ) |
---|
353 | .mv state$active$raw_n84 4 A B C X |
---|
354 | .names state$_n6b$raw_n7e state active state$active$raw_n84 |
---|
355 | - - 0 =state |
---|
356 | - - 1 =state$_n6b$raw_n7e |
---|
357 | # conflict arbitrators |
---|
358 | .names sel$raw_n67 sel |
---|
359 | - =sel$raw_n67 |
---|
360 | .names _n6a _n6b _n6f _n73 _n85 |
---|
361 | .def 0 |
---|
362 | 1 1 - - 1 |
---|
363 | 1 0 1 - 1 |
---|
364 | 1 0 0 1 1 |
---|
365 | .mv _n86 4 A B C X |
---|
366 | .names _n85 state$active$raw_n84 state _n86 |
---|
367 | 1 - - =state$active$raw_n84 |
---|
368 | 0 - - =state |
---|
369 | # non-blocking assignments |
---|
370 | # latches |
---|
371 | .r state$raw_n66 state |
---|
372 | - =state$raw_n66 |
---|
373 | .latch _n86 state |
---|
374 | # quasi-continuous assignment |
---|
375 | .end |
---|
376 | |
---|
377 | |
---|
378 | .model client |
---|
379 | # I/O ports |
---|
380 | .outputs req |
---|
381 | .inputs ack |
---|
382 | |
---|
383 | .mv state 3 NO_REQ REQ HAVE_TOKEN |
---|
384 | # req = 0 |
---|
385 | .names req$raw_n89 |
---|
386 | 0 |
---|
387 | # non-blocking assignments for initial |
---|
388 | # state = 0 |
---|
389 | .mv state$raw_n8a 3 NO_REQ REQ HAVE_TOKEN |
---|
390 | .names state$raw_n8a |
---|
391 | NO_REQ |
---|
392 | # non-blocking assignments for initial |
---|
393 | # assign rand_choice = $NDset ( 0,1 ) |
---|
394 | .names rand_choice |
---|
395 | 0 |
---|
396 | 1 |
---|
397 | .mv _n8f 3 NO_REQ REQ HAVE_TOKEN |
---|
398 | .names _n8f |
---|
399 | NO_REQ |
---|
400 | .names state _n8f _n8e |
---|
401 | .def 0 |
---|
402 | - =state 1 |
---|
403 | .names _n8e _n8d |
---|
404 | 1 1 |
---|
405 | 0 0 |
---|
406 | .names rand_choice _n90 |
---|
407 | - =rand_choice |
---|
408 | # req = 1 |
---|
409 | .names req$rand_choice_n91$true |
---|
410 | 1 |
---|
411 | # state = 1 |
---|
412 | .mv state$rand_choice_n92$true 3 NO_REQ REQ HAVE_TOKEN |
---|
413 | .names state$rand_choice_n92$true |
---|
414 | REQ |
---|
415 | # if/else (rand_choice ) |
---|
416 | .names req$rand_choice_n91$true req rand_choice req$rand_choice$raw_n97 |
---|
417 | 0 - 1 0 |
---|
418 | 1 - 1 1 |
---|
419 | - 0 0 0 |
---|
420 | - 1 0 1 |
---|
421 | .mv state$rand_choice$raw_n99 3 NO_REQ REQ HAVE_TOKEN |
---|
422 | .names state$rand_choice_n92$true state rand_choice state$rand_choice$raw_n99 |
---|
423 | - - 0 =state |
---|
424 | - - 1 =state$rand_choice_n92$true |
---|
425 | .mv _n9c 3 NO_REQ REQ HAVE_TOKEN |
---|
426 | .names _n9c |
---|
427 | REQ |
---|
428 | .names state _n9c _n9b |
---|
429 | .def 0 |
---|
430 | - =state 1 |
---|
431 | .names _n9b _n9a |
---|
432 | 1 1 |
---|
433 | 0 0 |
---|
434 | .names ack _n9d |
---|
435 | - =ack |
---|
436 | # state = 2 |
---|
437 | .mv state$ack_n9e$true 3 NO_REQ REQ HAVE_TOKEN |
---|
438 | .names state$ack_n9e$true |
---|
439 | HAVE_TOKEN |
---|
440 | # if/else (ack ) |
---|
441 | .mv state$ack$raw_na1 3 NO_REQ REQ HAVE_TOKEN |
---|
442 | .names state$ack_n9e$true state ack state$ack$raw_na1 |
---|
443 | - - 0 =state |
---|
444 | - - 1 =state$ack_n9e$true |
---|
445 | .mv _na4 3 NO_REQ REQ HAVE_TOKEN |
---|
446 | .names _na4 |
---|
447 | HAVE_TOKEN |
---|
448 | .names state _na4 _na3 |
---|
449 | .def 0 |
---|
450 | - =state 1 |
---|
451 | .names _na3 _na2 |
---|
452 | 1 1 |
---|
453 | 0 0 |
---|
454 | .names rand_choice _na5 |
---|
455 | - =rand_choice |
---|
456 | # req = 0 |
---|
457 | .names req$rand_choice_na6$true |
---|
458 | 0 |
---|
459 | # state = 0 |
---|
460 | .mv state$rand_choice_na7$true 3 NO_REQ REQ HAVE_TOKEN |
---|
461 | .names state$rand_choice_na7$true |
---|
462 | NO_REQ |
---|
463 | # if/else (rand_choice ) |
---|
464 | .names req$rand_choice_na6$true req rand_choice req$rand_choice$raw_nac |
---|
465 | 0 - 1 0 |
---|
466 | 1 - 1 1 |
---|
467 | - 0 0 0 |
---|
468 | - 1 0 1 |
---|
469 | .mv state$rand_choice$raw_nae 3 NO_REQ REQ HAVE_TOKEN |
---|
470 | .names state$rand_choice_na7$true state rand_choice state$rand_choice$raw_nae |
---|
471 | - - 0 =state |
---|
472 | - - 1 =state$rand_choice_na7$true |
---|
473 | # case (state ) |
---|
474 | .names req$rand_choice$raw_nac req _na2 req$_na2$raw_nb3 |
---|
475 | 0 - 1 0 |
---|
476 | 1 - 1 1 |
---|
477 | - 0 0 0 |
---|
478 | - 1 0 1 |
---|
479 | .mv state$_na2$raw_nb5 3 NO_REQ REQ HAVE_TOKEN |
---|
480 | .names state$rand_choice$raw_nae state _na2 state$_na2$raw_nb5 |
---|
481 | - - 0 =state |
---|
482 | - - 1 =state$rand_choice$raw_nae |
---|
483 | .mv state$_n9a$raw_nb6 3 NO_REQ REQ HAVE_TOKEN |
---|
484 | .names state$ack$raw_na1 state$_na2$raw_nb5 _n9a state$_n9a$raw_nb6 |
---|
485 | - - 0 =state$_na2$raw_nb5 |
---|
486 | - - 1 =state$ack$raw_na1 |
---|
487 | .names req req$_na2$raw_nb3 _n9a req$_n9a$raw_nb9 |
---|
488 | 0 - 1 0 |
---|
489 | 1 - 1 1 |
---|
490 | - 0 0 0 |
---|
491 | - 1 0 1 |
---|
492 | .names req$rand_choice$raw_n97 req$_n9a$raw_nb9 _n8d req$_n8d$raw_nbc |
---|
493 | 0 - 1 0 |
---|
494 | 1 - 1 1 |
---|
495 | - 0 0 0 |
---|
496 | - 1 0 1 |
---|
497 | .mv state$_n8d$raw_nbe 3 NO_REQ REQ HAVE_TOKEN |
---|
498 | .names state$rand_choice$raw_n99 state$_n9a$raw_nb6 _n8d state$_n8d$raw_nbe |
---|
499 | - - 0 =state$_n9a$raw_nb6 |
---|
500 | - - 1 =state$rand_choice$raw_n99 |
---|
501 | # conflict arbitrators |
---|
502 | .names _n8d _n90 _n9a _na2 _na5 _nc5 |
---|
503 | .def 0 |
---|
504 | 1 1 - - - 1 |
---|
505 | 0 - 0 1 1 1 |
---|
506 | .names _nc5 req$_n8d$raw_nbc req _nc6 |
---|
507 | 1 0 - 0 |
---|
508 | 1 1 - 1 |
---|
509 | 0 - 0 0 |
---|
510 | 0 - 1 1 |
---|
511 | .names _n8d _n90 _n9a _n9d _na2 _na5 _nc7 |
---|
512 | .def 0 |
---|
513 | 1 1 - - - - 1 |
---|
514 | 0 - 1 1 - - 1 |
---|
515 | 0 - 0 - 1 1 1 |
---|
516 | .mv _nc8 3 NO_REQ REQ HAVE_TOKEN |
---|
517 | .names _nc7 state$_n8d$raw_nbe state _nc8 |
---|
518 | 1 - - =state$_n8d$raw_nbe |
---|
519 | 0 - - =state |
---|
520 | # non-blocking assignments |
---|
521 | # latches |
---|
522 | .r req$raw_n89 req |
---|
523 | 0 0 |
---|
524 | 1 1 |
---|
525 | .latch _nc6 req |
---|
526 | .r state$raw_n8a state |
---|
527 | - =state$raw_n8a |
---|
528 | .latch _nc8 state |
---|
529 | # quasi-continuous assignment |
---|
530 | .end |
---|
531 | |
---|
532 | |
---|
533 | .model observer |
---|
534 | # I/O ports |
---|
535 | .inputs req |
---|
536 | .inputs ack |
---|
537 | |
---|
538 | .mv state 3 IDLE BAD GOOD |
---|
539 | # state = 0 |
---|
540 | .mv state$raw_ncb 3 IDLE BAD GOOD |
---|
541 | .names state$raw_ncb |
---|
542 | IDLE |
---|
543 | # non-blocking assignments for initial |
---|
544 | # assign rand_choice = $NDset ( 0,1 ) |
---|
545 | .names rand_choice |
---|
546 | 0 |
---|
547 | 1 |
---|
548 | .mv _nd0 3 IDLE BAD GOOD |
---|
549 | .names _nd0 |
---|
550 | IDLE |
---|
551 | .names state _nd0 _ncf |
---|
552 | .def 0 |
---|
553 | - =state 1 |
---|
554 | .names _ncf _nce |
---|
555 | 1 1 |
---|
556 | 0 0 |
---|
557 | # req && rand_choice |
---|
558 | .names req rand_choice _nd1 |
---|
559 | .def 0 |
---|
560 | 1 1 1 |
---|
561 | .names _nd1 _nd2 |
---|
562 | - =_nd1 |
---|
563 | # state = 1 |
---|
564 | .mv state$_nd1_nd3$true 3 IDLE BAD GOOD |
---|
565 | .names state$_nd1_nd3$true |
---|
566 | BAD |
---|
567 | # if/else (req && rand_choice ) |
---|
568 | .mv state$_nd1$raw_nd6 3 IDLE BAD GOOD |
---|
569 | .names state$_nd1_nd3$true state _nd1 state$_nd1$raw_nd6 |
---|
570 | - - 0 =state |
---|
571 | - - 1 =state$_nd1_nd3$true |
---|
572 | .mv _nd9 3 IDLE BAD GOOD |
---|
573 | .names _nd9 |
---|
574 | BAD |
---|
575 | .names state _nd9 _nd8 |
---|
576 | .def 0 |
---|
577 | - =state 1 |
---|
578 | .names _nd8 _nd7 |
---|
579 | 1 1 |
---|
580 | 0 0 |
---|
581 | .names ack _nda |
---|
582 | - =ack |
---|
583 | # state = 2 |
---|
584 | .mv state$ack_ndb$true 3 IDLE BAD GOOD |
---|
585 | .names state$ack_ndb$true |
---|
586 | GOOD |
---|
587 | # if/else (ack ) |
---|
588 | .mv state$ack$raw_nde 3 IDLE BAD GOOD |
---|
589 | .names state$ack_ndb$true state ack state$ack$raw_nde |
---|
590 | - - 0 =state |
---|
591 | - - 1 =state$ack_ndb$true |
---|
592 | # case (state ) |
---|
593 | .mv state$_nd7$raw_ne1 3 IDLE BAD GOOD |
---|
594 | .names state$ack$raw_nde state _nd7 state$_nd7$raw_ne1 |
---|
595 | - - 0 =state |
---|
596 | - - 1 =state$ack$raw_nde |
---|
597 | .mv state$_nce$raw_ne2 3 IDLE BAD GOOD |
---|
598 | .names state$_nd1$raw_nd6 state$_nd7$raw_ne1 _nce state$_nce$raw_ne2 |
---|
599 | - - 0 =state$_nd7$raw_ne1 |
---|
600 | - - 1 =state$_nd1$raw_nd6 |
---|
601 | # conflict arbitrators |
---|
602 | .names _nce _nd2 _nd7 _nda _ne6 |
---|
603 | .def 0 |
---|
604 | 1 1 - - 1 |
---|
605 | 0 - 1 1 1 |
---|
606 | .mv _ne7 3 IDLE BAD GOOD |
---|
607 | .names _ne6 state$_nce$raw_ne2 state _ne7 |
---|
608 | 1 - - =state$_nce$raw_ne2 |
---|
609 | 0 - - =state |
---|
610 | # non-blocking assignments |
---|
611 | # latches |
---|
612 | .r state$raw_ncb state |
---|
613 | - =state$raw_ncb |
---|
614 | .latch _ne7 state |
---|
615 | # quasi-continuous assignment |
---|
616 | .end |
---|
617 | |
---|
618 | |
---|