source: vis_dev/vis-2.1/examples/arbiter/arbiter_bug.mv @ 16

Last change on this file since 16 was 11, checked in by cecile, 13 years ago

Add vis

File size: 10.4 KB
Line 
1# vl2mv arbiter_bug.v
2# version: 0.2
3# date:    15:54:13 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
150 0 0
16# pass_tokenA  || pass_tokenB  || pass_tokenC
17.names _n1 pass_tokenC _n2
18.def 1
190 0 0
20.names _n2 active$raw_n0
21- =_n2
22.mv _n3 4 A B C X
23.names _n3
24A
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
28B
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
32C
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# conflict arbitrators
39.names active$raw_n0  active
400 0
411 1
42# non-blocking assignments
43# latches
44# quasi-continuous assignment
45.end
46
47
48.model controller
49# I/O ports
50.inputs sel
51.inputs req
52.outputs pass_token
53.outputs ack
54.inputs id
55
56.mv sel 4 A B C X
57.mv state 3 IDLE READY BUSY
58.mv id 4 A B C X
59# state  = 0
60.mv state$raw_n6 3 IDLE READY BUSY
61.names state$raw_n6
62IDLE
63# non-blocking assignments for initial
64# ack  = 0
65.names ack$raw_n7
660
67# non-blocking assignments for initial
68# pass_token  = 1
69.names pass_token$raw_n8
701
71# non-blocking assignments for initial
72# assign is_selected  = (sel  == id )
73# sel  == id
74.names sel id _na
75.def 0
76- =sel 1
77.names _na is_selected$raw_n9
78- =_na
79.mv _nd 3 IDLE READY BUSY
80.names _nd
81IDLE
82.names state _nd _nc
83.def 0
84- =state 1
85.names _nc  _nb
861 1
870 0
88.names is_selected _ne
89- =is_selected
90.names req _nf
91- =req
92# state  = 1
93.mv state$req_n10$true 3 IDLE READY BUSY
94.names state$req_n10$true
95READY
96# pass_token  = 0
97.names pass_token$req_n11$true
980
99# pass_token  = 1
100.names pass_token$req_n12$false
1011
102# if/else (req )
103.names pass_token$req_n11$true pass_token$req_n12$false req pass_token$req$raw_n15
1040 - 1 0
1051 - 1 1
106- 0 0 0
107- 1 0 1
108.mv state$req$raw_n19 3 IDLE READY BUSY
109.names state$req_n10$true state req state$req$raw_n19
110- - 0 =state
111- - 1 =state$req_n10$true
112# pass_token  = 0
113.names pass_token$is_selected_n1b$false
1140
115# if/else (is_selected )
116.names pass_token$req$raw_n15 pass_token$is_selected_n1b$false is_selected pass_token$is_selected$raw_n1f
1170 - 1 0
1181 - 1 1
119- 0 0 0
120- 1 0 1
121.mv state$is_selected$raw_n21 3 IDLE READY BUSY
122.names state$req$raw_n19 state is_selected state$is_selected$raw_n21
123- - 0 =state
124- - 1 =state$req$raw_n19
125.mv _n26 3 IDLE READY BUSY
126.names _n26
127READY
128.names state _n26 _n25
129.def 0
130- =state 1
131.names _n25  _n24
1321 1
1330 0
134# state  = 2
135.mv state$_n24_n27$true 3 IDLE READY BUSY
136.names state$_n24_n27$true
137BUSY
138# ack  = 1
139.names ack$_n24_n28$true
1401
141.mv _n2b 3 IDLE READY BUSY
142.names _n2b
143BUSY
144.names state _n2b _n2a
145.def 0
146- =state 1
147.names _n2a  _n29
1481 1
1490 0
150.names req _n2c
1510 1 
1521 0 
153.names _n2c _n2d
154- =_n2c
155# state  = 0
156.mv state$_n2c_n2e$true 3 IDLE READY BUSY
157.names state$_n2c_n2e$true
158IDLE
159# ack  = 0
160.names ack$_n2c_n2f$true
1610
162# pass_token  = 1
163.names pass_token$_n2c_n30$true
1641
165# if/else (!req )
166.names pass_token$_n2c_n30$true pass_token _n2c pass_token$_n2c$raw_n37
1670 - 1 0
1681 - 1 1
169- 0 0 0
170- 1 0 1
171.mv state$_n2c$raw_n39 3 IDLE READY BUSY
172.names state$_n2c_n2e$true state _n2c state$_n2c$raw_n39
173- - 0 =state
174- - 1 =state$_n2c_n2e$true
175.names ack$_n2c_n2f$true ack _n2c ack$_n2c$raw_n3a
1760 - 1 0
1771 - 1 1
178- 0 0 0
179- 1 0 1
180# case (state )
181.mv state$_n29$raw_n42 3 IDLE READY BUSY
182.names state$_n2c$raw_n39 state _n29 state$_n29$raw_n42
183- - 0 =state
184- - 1 =state$_n2c$raw_n39
185.names pass_token$_n2c$raw_n37 pass_token _n29 pass_token$_n29$raw_n43
1860 - 1 0
1871 - 1 1
188- 0 0 0
189- 1 0 1
190.names ack$_n2c$raw_n3a ack _n29 ack$_n29$raw_n45
1910 - 1 0
1921 - 1 1
193- 0 0 0
194- 1 0 1
195.mv state$_n24$raw_n47 3 IDLE READY BUSY
196.names state$_n24_n27$true state$_n29$raw_n42 _n24 state$_n24$raw_n47
197- - 0 =state$_n29$raw_n42
198- - 1 =state$_n24_n27$true
199.names ack$_n24_n28$true ack$_n29$raw_n45 _n24 ack$_n24$raw_n48
2000 - 1 0
2011 - 1 1
202- 0 0 0
203- 1 0 1
204.names pass_token pass_token$_n29$raw_n43 _n24 pass_token$_n24$raw_n4f
2050 - 1 0
2061 - 1 1
207- 0 0 0
208- 1 0 1
209.mv state$_nb$raw_n52 3 IDLE READY BUSY
210.names state$is_selected$raw_n21 state$_n24$raw_n47 _nb state$_nb$raw_n52
211- - 0 =state$_n24$raw_n47
212- - 1 =state$is_selected$raw_n21
213.names pass_token$is_selected$raw_n1f pass_token$_n24$raw_n4f _nb pass_token$_nb$raw_n53
2140 - 1 0
2151 - 1 1
216- 0 0 0
217- 1 0 1
218.names ack ack$_n24$raw_n48 _nb ack$_nb$raw_n5b
2190 - 1 0
2201 - 1 1
221- 0 0 0
222- 1 0 1
223# conflict arbitrators
224.names is_selected$raw_n9  is_selected
2250 0
2261 1
227.names _nb _ne _nf _n24 _n29 _n2d _n5d
228.def 0
229 1 1 1 - - - 1
230 0 - - 1 - - 1
231 0 - - 0 1 1 1
232.mv _n5e 3 IDLE READY BUSY
233.names _n5d state$_nb$raw_n52 state _n5e
2341 - - =state$_nb$raw_n52
2350 - - =state
236.names _nb _ne _nf _n24 _n29 _n2d _n62
237.def 0
238 1 1 1 - - - 1
239 1 1 0 - - - 1
240 1 0 - - - - 1
241 0 - - 0 1 1 1
242.names _n62 pass_token$_nb$raw_n53 pass_token _n63
2431 0 - 0
2441 1 - 1
2450 - 0 0
2460 - 1 1
247.names _nb _n24 _n29 _n2d _n64
248.def 0
249 0 1 - - 1
250 0 0 1 1 1
251.names _n64 ack$_nb$raw_n5b ack _n65
2521 0 - 0
2531 1 - 1
2540 - 0 0
2550 - 1 1
256# non-blocking assignments
257# latches
258.r pass_token$raw_n8 pass_token
2590 0
2601 1
261.latch _n63 pass_token
262.r state$raw_n6 state
263- =state$raw_n6
264.latch _n5e state
265.r ack$raw_n7 ack
2660 0
2671 1
268.latch _n65 ack
269# quasi-continuous assignment
270.end
271
272
273.model arbiter
274# I/O ports
275.outputs sel
276.inputs active
277
278.mv sel 4 A B C X
279.mv state 4 A B C X
280# state  = 0
281.mv state$raw_n66 4 A B C X
282.names state$raw_n66
283A
284# non-blocking assignments for initial
285# assign sel  = active  ? state  : 3
286.mv sel$raw_n67 4 A B C X
287.mv _n68 4 A B C X
288.names _n68
289X
290# active  ? state  : 3
291.mv _n69 4 A B C X
292.names state _n68 active _n69
293- - 0 =_n68
294- - 1 =state
295.names _n69 sel$raw_n67
296- =_n69
297.mv _n6c 4 A B C X
298.names _n6c
299A
300.names state _n6c _n6b
301.def 0
302- =state 1
303.names _n6b  _n6a
3041 1
3050 0
306# state  = 1
307.mv state$_n6a_n6d$true 4 A B C X
308.names state$_n6a_n6d$true
309B
310.mv _n70 4 A B C X
311.names _n70
312B
313.names state _n70 _n6f
314.def 0
315- =state 1
316.names _n6f  _n6e
3171 1
3180 0
319# state  = 2
320.mv state$_n6e_n71$true 4 A B C X
321.names state$_n6e_n71$true
322C
323.mv _n74 4 A B C X
324.names _n74
325C
326.names state _n74 _n73
327.def 0
328- =state 1
329.names _n73  _n72
3301 1
3310 0
332# state  = 0
333.mv state$_n72_n75$true 4 A B C X
334.names state$_n72_n75$true
335A
336# case (state )
337.mv state$_n72$raw_n78 4 A B C X
338.names state$_n72_n75$true state _n72 state$_n72$raw_n78
339- - 0 =state
340- - 1 =state$_n72_n75$true
341.mv state$_n6e$raw_n79 4 A B C X
342.names state$_n6e_n71$true state$_n72$raw_n78 _n6e state$_n6e$raw_n79
343- - 0 =state$_n72$raw_n78
344- - 1 =state$_n6e_n71$true
345.mv state$_n6a$raw_n7d 4 A B C X
346.names state$_n6a_n6d$true state$_n6e$raw_n79 _n6a state$_n6a$raw_n7d
347- - 0 =state$_n6e$raw_n79
348- - 1 =state$_n6a_n6d$true
349# conflict arbitrators
350.names sel$raw_n67  sel
351- =sel$raw_n67
352.names _n6a _n6e _n72 _n81
353.def 0
354 1 - - 1
355 0 1 - 1
356 0 0 1 1
357.mv _n82 4 A B C X
358.names _n81 state$_n6a$raw_n7d state _n82
3591 - - =state$_n6a$raw_n7d
3600 - - =state
361# non-blocking assignments
362# latches
363.r state$raw_n66 state
364- =state$raw_n66
365.latch _n82 state
366# quasi-continuous assignment
367.end
368
369
370.model client
371# I/O ports
372.outputs req
373.inputs ack
374
375.mv state 3 NO_REQ REQ HAVE_TOKEN
376# req  = 0
377.names req$raw_n85
3780
379# non-blocking assignments for initial
380# state  = 0
381.mv state$raw_n86 3 NO_REQ REQ HAVE_TOKEN
382.names state$raw_n86
383NO_REQ
384# non-blocking assignments for initial
385# assign rand_choice  = $NDset ( 0,1 )
386.names rand_choice
3870
3881
389.mv _n8b 3 NO_REQ REQ HAVE_TOKEN
390.names _n8b
391NO_REQ
392.names state _n8b _n8a
393.def 0
394- =state 1
395.names _n8a  _n89
3961 1
3970 0
398.names rand_choice _n8c
399- =rand_choice
400# req  = 1
401.names req$rand_choice_n8d$true
4021
403# state  = 1
404.mv state$rand_choice_n8e$true 3 NO_REQ REQ HAVE_TOKEN
405.names state$rand_choice_n8e$true
406REQ
407# if/else (rand_choice )
408.names req$rand_choice_n8d$true req rand_choice req$rand_choice$raw_n93
4090 - 1 0
4101 - 1 1
411- 0 0 0
412- 1 0 1
413.mv state$rand_choice$raw_n95 3 NO_REQ REQ HAVE_TOKEN
414.names state$rand_choice_n8e$true state rand_choice state$rand_choice$raw_n95
415- - 0 =state
416- - 1 =state$rand_choice_n8e$true
417.mv _n98 3 NO_REQ REQ HAVE_TOKEN
418.names _n98
419REQ
420.names state _n98 _n97
421.def 0
422- =state 1
423.names _n97  _n96
4241 1
4250 0
426.names ack _n99
427- =ack
428# state  = 2
429.mv state$ack_n9a$true 3 NO_REQ REQ HAVE_TOKEN
430.names state$ack_n9a$true
431HAVE_TOKEN
432# if/else (ack )
433.mv state$ack$raw_n9d 3 NO_REQ REQ HAVE_TOKEN
434.names state$ack_n9a$true state ack state$ack$raw_n9d
435- - 0 =state
436- - 1 =state$ack_n9a$true
437.mv _na0 3 NO_REQ REQ HAVE_TOKEN
438.names _na0
439HAVE_TOKEN
440.names state _na0 _n9f
441.def 0
442- =state 1
443.names _n9f  _n9e
4441 1
4450 0
446.names rand_choice _na1
447- =rand_choice
448# req  = 0
449.names req$rand_choice_na2$true
4500
451# state  = 0
452.mv state$rand_choice_na3$true 3 NO_REQ REQ HAVE_TOKEN
453.names state$rand_choice_na3$true
454NO_REQ
455# if/else (rand_choice )
456.names req$rand_choice_na2$true req rand_choice req$rand_choice$raw_na8
4570 - 1 0
4581 - 1 1
459- 0 0 0
460- 1 0 1
461.mv state$rand_choice$raw_naa 3 NO_REQ REQ HAVE_TOKEN
462.names state$rand_choice_na3$true state rand_choice state$rand_choice$raw_naa
463- - 0 =state
464- - 1 =state$rand_choice_na3$true
465# case (state )
466.names req$rand_choice$raw_na8 req _n9e req$_n9e$raw_naf
4670 - 1 0
4681 - 1 1
469- 0 0 0
470- 1 0 1
471.mv state$_n9e$raw_nb1 3 NO_REQ REQ HAVE_TOKEN
472.names state$rand_choice$raw_naa state _n9e state$_n9e$raw_nb1
473- - 0 =state
474- - 1 =state$rand_choice$raw_naa
475.mv state$_n96$raw_nb2 3 NO_REQ REQ HAVE_TOKEN
476.names state$ack$raw_n9d state$_n9e$raw_nb1 _n96 state$_n96$raw_nb2
477- - 0 =state$_n9e$raw_nb1
478- - 1 =state$ack$raw_n9d
479.names req req$_n9e$raw_naf _n96 req$_n96$raw_nb5
4800 - 1 0
4811 - 1 1
482- 0 0 0
483- 1 0 1
484.names req$rand_choice$raw_n93 req$_n96$raw_nb5 _n89 req$_n89$raw_nb8
4850 - 1 0
4861 - 1 1
487- 0 0 0
488- 1 0 1
489.mv state$_n89$raw_nba 3 NO_REQ REQ HAVE_TOKEN
490.names state$rand_choice$raw_n95 state$_n96$raw_nb2 _n89 state$_n89$raw_nba
491- - 0 =state$_n96$raw_nb2
492- - 1 =state$rand_choice$raw_n95
493# conflict arbitrators
494.names _n89 _n8c _n96 _n9e _na1 _nc1
495.def 0
496 1 1 - - - 1
497 0 - 0 1 1 1
498.names _nc1 req$_n89$raw_nb8 req _nc2
4991 0 - 0
5001 1 - 1
5010 - 0 0
5020 - 1 1
503.names _n89 _n8c _n96 _n99 _n9e _na1 _nc3
504.def 0
505 1 1 - - - - 1
506 0 - 1 1 - - 1
507 0 - 0 - 1 1 1
508.mv _nc4 3 NO_REQ REQ HAVE_TOKEN
509.names _nc3 state$_n89$raw_nba state _nc4
5101 - - =state$_n89$raw_nba
5110 - - =state
512# non-blocking assignments
513# latches
514.r req$raw_n85 req
5150 0
5161 1
517.latch _nc2 req
518.r state$raw_n86 state
519- =state$raw_n86
520.latch _nc4 state
521# quasi-continuous assignment
522.end
523
524
Note: See TracBrowser for help on using the repository browser.