-
Notifications
You must be signed in to change notification settings - Fork 1
/
devices.js
1010 lines (1010 loc) · 57.3 KB
/
devices.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
simcir.registerDevice('4BitRam',
{
"name": "4BitRam",
"width": 600,
"height": 400,
"showToolbox": false,
"devices": [
{"id": "dev0", "label": "D-FF", "type": "D-FF", "x": 352, "y": 184},
{"id": "dev1", "label": "D-FF", "type": "D-FF", "x": 352, "y": 72},
{"id": "dev2", "label": "D-FF", "type": "D-FF", "x": 352, "y": 128},
{"type": "Out", "id": "dev3", "x": 440, "y": 24, "label": "O0"},
{"type": "Out", "id": "dev4", "x": 440, "y": 72, "label": "O1"},
{"type": "Out", "id": "dev5", "x": 440, "y": 120, "label": "O2"},
{"type": "Out", "id": "dev6", "x": 440, "y": 168, "label": "O3"},
{"id": "dev7", "label": "Toggle", "state": {"on": false}, "type": "Toggle", "x": 152, "y": 24},
{"id": "dev8", "label": "Toggle", "state": {"on": true}, "type": "Toggle", "x": 152, "y": 80},
{"id": "dev9", "label": "Toggle", "state": {"on": false}, "type": "Toggle", "x": 152, "y": 128},
{"type": "Toggle", "id": "dev10", "x": 152, "y": 184, "label": "Toggle", "state": {"on": false}},
{"type": "PushOn", "id": "dev11", "x": 88, "y": 112, "label": "PushOn"},
{"type": "In", "id": "dev12", "x": 224, "y": 24, "label": "0"},
{"type": "In", "id": "dev13", "x": 224, "y": 72, "label": "1"},
{"type": "In", "id": "dev14", "x": 224, "y": 128, "label": "2"},
{"type": "In", "id": "dev15", "x": 224, "y": 184, "label": "3"},
{"type": "In", "id": "dev16", "x": 224, "y": 232, "label": "On"},
{"id": "dev17", "label": "DC", "type": "DC", "x": 24, "y": 112},
{"type": "NOT", "id": "dev18", "x": 288, "y": 24, "label": "NOT"},
{"type": "NOT", "id": "dev19", "x": 288, "y": 72, "label": "NOT"},
{"id": "dev20", "label": "D-FF", "type": "D-FF", "x": 352, "y": 24},
{"type": "NOT", "id": "dev21", "x": 288, "y": 128, "label": "NOT"},
{"type": "NOT", "id": "dev22", "x": 288, "y": 184, "label": "NOT"}
],
"connectors": [
{"from": "dev0.in0", "to": "dev22.out0"},
{"from": "dev0.in1", "to": "dev16.out0"},
{"from": "dev1.in0", "to": "dev19.out0"},
{"from": "dev1.in1", "to": "dev16.out0"},
{"from": "dev2.in0", "to": "dev21.out0"},
{"from": "dev2.in1", "to": "dev16.out0"},
{"from": "dev3.in0", "to": "dev20.out1"},
{"from": "dev4.in0", "to": "dev1.out1"},
{"from": "dev5.in0", "to": "dev2.out1"},
{"from": "dev6.in0", "to": "dev0.out1"},
{"from": "dev7.in0", "to": "dev11.out0"},
{"from": "dev8.in0", "to": "dev11.out0"},
{"from": "dev9.in0", "to": "dev11.out0"},
{"from": "dev10.in0", "to": "dev11.out0"},
{"from": "dev11.in0", "to": "dev17.out0"},
{"from": "dev12.in0", "to": "dev7.out0"},
{"from": "dev13.in0", "to": "dev8.out0"},
{"from": "dev14.in0", "to": "dev9.out0"},
{"from": "dev15.in0", "to": "dev10.out0"},
{"from": "dev16.in0", "to": "dev11.out0"},
{"from": "dev18.in0", "to": "dev12.out0"},
{"from": "dev19.in0", "to": "dev13.out0"},
{"from": "dev20.in0", "to": "dev18.out0"},
{"from": "dev20.in1", "to": "dev16.out0"},
{"from": "dev21.in0", "to": "dev14.out0"},
{"from": "dev22.in0", "to": "dev15.out0"}
]
}
);
simcir.registerDevice('N_If_On_Else_D',
{
"name": "N_If_On_Else_D",
"width": 600,
"height": 400,
"showToolbox": false,
"devices": [
{"type": "Toggle", "id": "dev0", "x": 120, "y": 104, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev1", "x": 120, "y": 48, "label": "Toggle", "state": {"on": false}},
{"type": "In", "id": "dev2", "x": 176, "y": 104, "label": "N"},
{"type": "In", "id": "dev3", "x": 176, "y": 48, "label": "D"},
{"type": "Toggle", "id": "dev4", "x": 120, "y": 160, "label": "Toggle", "state": {"on": false}},
{"type": "DC", "id": "dev5", "x": 48, "y": 104, "label": "DC"},
{"type": "AND", "id": "dev6", "x": 304, "y": 56, "label": "AND"},
{"type": "OR", "id": "dev7", "x": 392, "y": 80, "label": "OR"},
{"type": "Out", "id": "dev8", "x": 448, "y": 80, "label": "Out"},
{"type": "In", "id": "dev9", "x": 176, "y": 160, "label": "On"},
{"type": "NOT", "id": "dev10", "x": 248, "y": 112, "label": "NOT"},
{"type": "AND", "id": "dev11", "x": 328, "y": 112, "label": "AND"}
],
"connectors": [
{"from": "dev0.in0", "to": "dev5.out0"},
{"from": "dev1.in0", "to": "dev5.out0"},
{"from": "dev2.in0", "to": "dev0.out0"},
{"from": "dev3.in0", "to": "dev1.out0"},
{"from": "dev4.in0", "to": "dev5.out0"},
{"from": "dev6.in0", "to": "dev3.out0"},
{"from": "dev6.in1", "to": "dev10.out0"},
{"from": "dev7.in0", "to": "dev6.out0"},
{"from": "dev7.in1", "to": "dev11.out0"},
{"from": "dev8.in0", "to": "dev7.out0"},
{"from": "dev9.in0", "to": "dev4.out0"},
{"from": "dev10.in0", "to": "dev9.out0"},
{"from": "dev11.in0", "to": "dev2.out0"},
{"from": "dev11.in1", "to": "dev9.out0"}
]
}
);
simcir.registerDevice('4BitNOD',
{
"name": "4BitNOD",
"width": 500,
"height": 600,
"showToolbox": false,
"devices": [
{"type": "In", "id": "dev0", "x": 48, "y": 32, "label": "N0"},
{"type": "In", "id": "dev1", "x": 48, "y": 80, "label": "N1"},
{"type": "In", "id": "dev2", "x": 48, "y": 128, "label": "N2"},
{"type": "In", "id": "dev3", "x": 48, "y": 176, "label": "N3"},
{"type": "In", "id": "dev4", "x": 48, "y": 224, "label": "D0"},
{"type": "In", "id": "dev5", "x": 48, "y": 272, "label": "D1"},
{"type": "In", "id": "dev6", "x": 48, "y": 376, "label": "D3"},
{"type": "N_If_On_Else_D", "id": "dev7", "x": 192, "y": 136, "label": "N_If_On_Else_D"},
{"type": "In", "id": "dev8", "x": 48, "y": 424, "label": "On"},
{"type": "Out", "id": "dev9", "x": 328, "y": 144, "label": "O0"},
{"type": "Out", "id": "dev10", "x": 328, "y": 208, "label": "O1"},
{"type": "N_If_On_Else_D", "id": "dev11", "x": 192, "y": 208, "label": "N_If_On_Else_D"},
{"type": "N_If_On_Else_D", "id": "dev12", "x": 192, "y": 288, "label": "N_If_On_Else_D"},
{"type": "In", "id": "dev13", "x": 48, "y": 320, "label": "D2"},
{"type": "Out", "id": "dev14", "x": 328, "y": 280, "label": "O2"},
{"type": "Out", "id": "dev15", "x": 328, "y": 368, "label": "O3"},
{"type": "N_If_On_Else_D", "id": "dev16", "x": 192, "y": 368, "label": "N_If_On_Else_D"}
],
"connectors": [
{"from": "dev7.in0", "to": "dev4.out0"},
{"from": "dev7.in1", "to": "dev0.out0"},
{"from": "dev7.in2", "to": "dev8.out0"},
{"from": "dev9.in0", "to": "dev7.out0"},
{"from": "dev10.in0", "to": "dev11.out0"},
{"from": "dev11.in0", "to": "dev5.out0"},
{"from": "dev11.in1", "to": "dev1.out0"},
{"from": "dev11.in2", "to": "dev8.out0"},
{"from": "dev12.in0", "to": "dev13.out0"},
{"from": "dev12.in1", "to": "dev2.out0"},
{"from": "dev12.in2", "to": "dev8.out0"},
{"from": "dev14.in0", "to": "dev12.out0"},
{"from": "dev15.in0", "to": "dev16.out0"},
{"from": "dev16.in0", "to": "dev6.out0"},
{"from": "dev16.in1", "to": "dev3.out0"},
{"from": "dev16.in2", "to": "dev8.out0"}
]
}
);
simcir.registerDevice('4BitMulti',
{
"name": "4BitMulti",
"width": 1200,
"height": 800,
"showToolbox": false,
"devices": [
{"type": "In", "id": "dev0", "x": 144, "y": 72, "label": "A0"},
{"type": "In", "id": "dev1", "x": 144, "y": 128, "label": "A1"},
{"type": "In", "id": "dev2", "x": 144, "y": 184, "label": "A2"},
{"type": "In", "id": "dev3", "x": 144, "y": 240, "label": "A3"},
{"type": "In", "id": "dev4", "x": 144, "y": 288, "label": "B0"},
{"type": "In", "id": "dev5", "x": 144, "y": 344, "label": "B1"},
{"type": "In", "id": "dev6", "x": 144, "y": 400, "label": "B2"},
{"type": "In", "id": "dev7", "x": 144, "y": 456, "label": "B3"},
{"type": "AND", "id": "dev8", "x": 328, "y": 88, "label": "AND"},
{"type": "AND", "id": "dev9", "x": 328, "y": 136, "label": "AND"},
{"type": "AND", "id": "dev10", "x": 328, "y": 184, "label": "AND"},
{"type": "AND", "id": "dev11", "x": 328, "y": 232, "label": "AND"},
{"type": "AND", "id": "dev12", "x": 328, "y": 304, "label": "AND"},
{"type": "AND", "id": "dev13", "x": 328, "y": 360, "label": "AND"},
{"type": "AND", "id": "dev14", "x": 328, "y": 408, "label": "AND"},
{"type": "AND", "id": "dev15", "x": 328, "y": 456, "label": "AND"},
{"type": "AND", "id": "dev16", "x": 456, "y": 424, "label": "AND"},
{"type": "AND", "id": "dev17", "x": 456, "y": 368, "label": "AND"},
{"type": "AND", "id": "dev18", "x": 456, "y": 480, "label": "AND"},
{"type": "Out", "id": "dev19", "x": 608, "y": 88, "label": "O0"},
{"type": "4bitAdder", "id": "dev20", "x": 608, "y": 152, "label": "4bitAdder"},
{"type": "4bitAdder", "id": "dev21", "x": 432, "y": 40, "label": "4bitAdder"},
{"type": "FullAdder", "id": "dev22", "x": 432, "y": 192, "label": "FullAdder"},
{"type": "FullAdder", "id": "dev23", "x": 608, "y": 304, "label": "FullAdder"},
{"type": "Out", "id": "dev24", "x": 744, "y": 120, "label": "O1"},
{"type": "AND", "id": "dev25", "x": 632, "y": 408, "label": "AND"},
{"type": "AND", "id": "dev26", "x": 640, "y": 456, "label": "AND"},
{"type": "AND", "id": "dev27", "x": 640, "y": 504, "label": "AND"},
{"type": "AND", "id": "dev28", "x": 632, "y": 552, "label": "AND"},
{"type": "FullAdder", "id": "dev29", "x": 768, "y": 432, "label": "FullAdder"},
{"type": "Out", "id": "dev30", "x": 920, "y": 288, "label": "O2"},
{"type": "Out", "id": "dev31", "x": 920, "y": 344, "label": "O3"},
{"type": "Out", "id": "dev32", "x": 920, "y": 456, "label": "C1"},
{"type": "Out", "id": "dev33", "x": 928, "y": 504, "label": "C2"},
{"type": "Out", "id": "dev34", "x": 928, "y": 552, "label": "C3"},
{"type": "Out", "id": "dev35", "x": 920, "y": 400, "label": "C0"},
{"type": "4bitAdder", "id": "dev36", "x": 768, "y": 272, "label": "4bitAdder"},
{"type": "AND", "id": "dev37", "x": 456, "y": 312, "label": "AND"}
],
"connectors": [
{"from": "dev8.in0", "to": "dev0.out0"},
{"from": "dev8.in1", "to": "dev4.out0"},
{"from": "dev9.in0", "to": "dev0.out0"},
{"from": "dev9.in1", "to": "dev5.out0"},
{"from": "dev10.in0", "to": "dev0.out0"},
{"from": "dev10.in1", "to": "dev6.out0"},
{"from": "dev11.in0", "to": "dev0.out0"},
{"from": "dev11.in1", "to": "dev7.out0"},
{"from": "dev12.in0", "to": "dev1.out0"},
{"from": "dev12.in1", "to": "dev4.out0"},
{"from": "dev13.in0", "to": "dev1.out0"},
{"from": "dev13.in1", "to": "dev5.out0"},
{"from": "dev14.in0", "to": "dev1.out0"},
{"from": "dev14.in1", "to": "dev6.out0"},
{"from": "dev15.in0", "to": "dev1.out0"},
{"from": "dev15.in1", "to": "dev7.out0"},
{"from": "dev16.in0", "to": "dev2.out0"},
{"from": "dev16.in1", "to": "dev6.out0"},
{"from": "dev17.in0", "to": "dev2.out0"},
{"from": "dev17.in1", "to": "dev5.out0"},
{"from": "dev18.in0", "to": "dev2.out0"},
{"from": "dev18.in1", "to": "dev7.out0"},
{"from": "dev19.in0", "to": "dev21.out0"},
{"from": "dev20.in1", "to": "dev21.out1"},
{"from": "dev20.in2", "to": "dev21.out2"},
{"from": "dev20.in3", "to": "dev21.out3"},
{"from": "dev20.in4", "to": "dev22.out0"},
{"from": "dev20.in6", "to": "dev37.out0"},
{"from": "dev20.in7", "to": "dev17.out0"},
{"from": "dev20.in8", "to": "dev16.out0"},
{"from": "dev21.in1", "to": "dev8.out0"},
{"from": "dev21.in2", "to": "dev9.out0"},
{"from": "dev21.in3", "to": "dev10.out0"},
{"from": "dev21.in4", "to": "dev11.out0"},
{"from": "dev21.in6", "to": "dev12.out0"},
{"from": "dev21.in7", "to": "dev13.out0"},
{"from": "dev21.in8", "to": "dev14.out0"},
{"from": "dev22.in0", "to": "dev21.out4"},
{"from": "dev22.in2", "to": "dev15.out0"},
{"from": "dev23.in0", "to": "dev20.out4"},
{"from": "dev23.in1", "to": "dev22.out1"},
{"from": "dev23.in2", "to": "dev18.out0"},
{"from": "dev24.in0", "to": "dev20.out0"},
{"from": "dev25.in0", "to": "dev3.out0"},
{"from": "dev25.in1", "to": "dev4.out0"},
{"from": "dev26.in0", "to": "dev3.out0"},
{"from": "dev26.in1", "to": "dev5.out0"},
{"from": "dev27.in0", "to": "dev3.out0"},
{"from": "dev27.in1", "to": "dev6.out0"},
{"from": "dev28.in0", "to": "dev3.out0"},
{"from": "dev28.in1", "to": "dev7.out0"},
{"from": "dev29.in0", "to": "dev36.out4"},
{"from": "dev29.in1", "to": "dev23.out1"},
{"from": "dev29.in2", "to": "dev28.out0"},
{"from": "dev30.in0", "to": "dev36.out0"},
{"from": "dev31.in0", "to": "dev36.out1"},
{"from": "dev32.in0", "to": "dev36.out3"},
{"from": "dev33.in0", "to": "dev29.out0"},
{"from": "dev34.in0", "to": "dev29.out1"},
{"from": "dev35.in0", "to": "dev36.out2"},
{"from": "dev36.in1", "to": "dev20.out1"},
{"from": "dev36.in2", "to": "dev20.out2"},
{"from": "dev36.in3", "to": "dev20.out3"},
{"from": "dev36.in4", "to": "dev23.out0"},
{"from": "dev36.in6", "to": "dev25.out0"},
{"from": "dev36.in7", "to": "dev26.out0"},
{"from": "dev36.in8", "to": "dev27.out0"},
{"from": "dev37.in0", "to": "dev2.out0"},
{"from": "dev37.in1", "to": "dev4.out0"}
]
}
);
simcir.registerDevice('BinToDez',
{
"name": "BinToDez",
"width": 1200,
"height": 800,
"showToolbox": false,
"devices": [
{"type": "In", "id": "dev0", "x": 32, "y": 56, "label": "D0"},
{"type": "In", "id": "dev1", "x": 32, "y": 104, "label": "D1"},
{"type": "In", "id": "dev2", "x": 32, "y": 152, "label": "D2"},
{"type": "In", "id": "dev3", "x": 32, "y": 200, "label": "D3"},
{"type": "NOT", "id": "dev4", "x": 80, "y": 200, "label": "NOT"},
{"type": "AND", "id": "dev5", "x": 136, "y": 208, "label": "AND"},
{"type": "AND", "id": "dev6", "x": 136, "y": 256, "label": "AND"},
{"type": "3to8BinaryDecoder", "id": "dev7", "x": 208, "y": 32, "label": "3to8BinaryDecoder"},
{"type": "Out", "id": "dev8", "x": 376, "y": 24, "label": "A0"},
{"type": "Out", "id": "dev9", "x": 376, "y": 72, "label": "A1"},
{"type": "3to8BinaryDecoder", "id": "dev10", "x": 208, "y": 184, "label": "3to8BinaryDecoder"},
{"type": "In", "id": "dev11", "x": 32, "y": 264, "label": "OE"},
{"type": "Out", "id": "dev12", "x": 376, "y": 120, "label": "A2"},
{"type": "Out", "id": "dev13", "x": 376, "y": 168, "label": "A3"},
{"type": "Out", "id": "dev14", "x": 376, "y": 216, "label": "A4"},
{"type": "Out", "id": "dev15", "x": 376, "y": 272, "label": "A5"},
{"type": "Out", "id": "dev16", "x": 376, "y": 320, "label": "A6"},
{"type": "Out", "id": "dev17", "x": 376, "y": 368, "label": "A7"},
{"type": "Out", "id": "dev18", "x": 376, "y": 416, "label": "A8"},
{"type": "Out", "id": "dev19", "x": 376, "y": 464, "label": "A9"},
{"type": "Out", "id": "dev20", "x": 376, "y": 512, "label": "A10"},
{"type": "Out", "id": "dev21", "x": 376, "y": 560, "label": "A11"},
{"type": "Out", "id": "dev22", "x": 376, "y": 608, "label": "A12"},
{"type": "Out", "id": "dev23", "x": 376, "y": 656, "label": "A13"},
{"type": "Out", "id": "dev24", "x": 376, "y": 704, "label": "A14"},
{"type": "Out", "id": "dev25", "x": 376, "y": 752, "label": "A15"}
],
"connectors": [
{"from": "dev4.in0", "to": "dev3.out0"},
{"from": "dev5.in0", "to": "dev4.out0"},
{"from": "dev5.in1", "to": "dev11.out0"},
{"from": "dev6.in0", "to": "dev3.out0"},
{"from": "dev6.in1", "to": "dev11.out0"},
{"from": "dev7.in0", "to": "dev0.out0"},
{"from": "dev7.in1", "to": "dev1.out0"},
{"from": "dev7.in2", "to": "dev2.out0"},
{"from": "dev7.in3", "to": "dev5.out0"},
{"from": "dev8.in0", "to": "dev7.out0"},
{"from": "dev9.in0", "to": "dev7.out1"},
{"from": "dev10.in0", "to": "dev0.out0"},
{"from": "dev10.in1", "to": "dev1.out0"},
{"from": "dev10.in2", "to": "dev2.out0"},
{"from": "dev10.in3", "to": "dev6.out0"},
{"from": "dev12.in0", "to": "dev7.out2"},
{"from": "dev13.in0", "to": "dev7.out3"},
{"from": "dev14.in0", "to": "dev7.out4"},
{"from": "dev15.in0", "to": "dev7.out5"},
{"from": "dev16.in0", "to": "dev7.out6"},
{"from": "dev17.in0", "to": "dev7.out7"},
{"from": "dev18.in0", "to": "dev10.out0"},
{"from": "dev19.in0", "to": "dev10.out1"},
{"from": "dev20.in0", "to": "dev10.out2"},
{"from": "dev21.in0", "to": "dev10.out3"},
{"from": "dev22.in0", "to": "dev10.out4"},
{"from": "dev23.in0", "to": "dev10.out5"},
{"from": "dev24.in0", "to": "dev10.out6"},
{"from": "dev25.in0", "to": "dev10.out7"}
]
}
)
simcir.registerDevice('2ByteRam',
{
"name": "2ByteRam",
"width": 1000,
"height": 700,
"showToolbox": false,
"devices": [
{"type": "Toggle", "id": "dev0", "x": 80, "y": 432, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev1", "x": 80, "y": 240, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev2", "x": 80, "y": 200, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev3", "x": 80, "y": 288, "label": "Toggle", "state": {"on": false}},
{"type": "In", "id": "dev4", "x": 136, "y": 392, "label": "A0"},
{"type": "In", "id": "dev5", "x": 136, "y": 200, "label": "W0"},
{"type": "In", "id": "dev6", "x": 136, "y": 248, "label": "W1"},
{"type": "In", "id": "dev7", "x": 136, "y": 296, "label": "W2"},
{"type": "Toggle", "id": "dev8", "x": 80, "y": 336, "label": "Toggle", "state": {"on": false}},
{"type": "In", "id": "dev9", "x": 136, "y": 440, "label": "A1"},
{"type": "PushOn", "id": "dev10", "x": 80, "y": 488, "label": "PushOn"},
{"type": "DC", "id": "dev11", "x": 8, "y": 336, "label": "DC"},
{"type": "In", "id": "dev12", "x": 136, "y": 344, "label": "W3"},
{"type": "4BitRam", "id": "dev13", "x": 272, "y": 72, "label": "4BitRam"},
{"type": "AND", "id": "dev14", "x": 224, "y": 320, "label": "AND"},
{"type": "4BitNOD", "id": "dev15", "x": 272, "y": 184, "label": "4BitNOD"},
{"type": "AND", "id": "dev16", "x": 376, "y": 144, "label": "AND"},
{"type": "4BitRam", "id": "dev17", "x": 432, "y": 72, "label": "4BitRam"},
{"type": "4BitNOD", "id": "dev18", "x": 432, "y": 184, "label": "4BitNOD"},
{"type": "In", "id": "dev19", "x": 136, "y": 488, "label": "On"},
{"type": "Out", "id": "dev20", "x": 592, "y": 128, "label": "O0"},
{"type": "Out", "id": "dev21", "x": 592, "y": 176, "label": "O1"},
{"type": "Out", "id": "dev22", "x": 592, "y": 232, "label": "O2"},
{"type": "Out", "id": "dev23", "x": 592, "y": 280, "label": "O3"},
{"type": "Toggle", "id": "dev24", "x": 80, "y": 384, "label": "Toggle", "state": {"on": false}},
{"type": "In", "id": "dev25", "x": 128, "y": 8, "label": "D0"},
{"type": "In", "id": "dev26", "x": 128, "y": 56, "label": "D1"},
{"type": "In", "id": "dev27", "x": 128, "y": 104, "label": "D2"},
{"type": "In", "id": "dev28", "x": 128, "y": 152, "label": "D3"}
],
"connectors": [
{"from": "dev0.in0", "to": "dev11.out0"},
{"from": "dev1.in0", "to": "dev11.out0"},
{"from": "dev2.in0", "to": "dev11.out0"},
{"from": "dev3.in0", "to": "dev11.out0"},
{"from": "dev4.in0", "to": "dev24.out0"},
{"from": "dev5.in0", "to": "dev2.out0"},
{"from": "dev6.in0", "to": "dev1.out0"},
{"from": "dev7.in0", "to": "dev3.out0"},
{"from": "dev8.in0", "to": "dev11.out0"},
{"from": "dev9.in0", "to": "dev0.out0"},
{"from": "dev10.in0", "to": "dev11.out0"},
{"from": "dev12.in0", "to": "dev8.out0"},
{"from": "dev13.in0", "to": "dev5.out0"},
{"from": "dev13.in1", "to": "dev6.out0"},
{"from": "dev13.in2", "to": "dev7.out0"},
{"from": "dev13.in3", "to": "dev12.out0"},
{"from": "dev13.in4", "to": "dev14.out0"},
{"from": "dev14.in0", "to": "dev4.out0"},
{"from": "dev14.in1", "to": "dev19.out0"},
{"from": "dev15.in0", "to": "dev13.out0"},
{"from": "dev15.in1", "to": "dev13.out1"},
{"from": "dev15.in2", "to": "dev13.out2"},
{"from": "dev15.in3", "to": "dev13.out3"},
{"from": "dev15.in4", "to": "dev25.out0"},
{"from": "dev15.in5", "to": "dev26.out0"},
{"from": "dev15.in6", "to": "dev27.out0"},
{"from": "dev15.in7", "to": "dev28.out0"},
{"from": "dev15.in8", "to": "dev4.out0"},
{"from": "dev16.in0", "to": "dev9.out0"},
{"from": "dev16.in1", "to": "dev19.out0"},
{"from": "dev17.in0", "to": "dev5.out0"},
{"from": "dev17.in1", "to": "dev6.out0"},
{"from": "dev17.in2", "to": "dev7.out0"},
{"from": "dev17.in3", "to": "dev12.out0"},
{"from": "dev17.in4", "to": "dev16.out0"},
{"from": "dev18.in0", "to": "dev17.out0"},
{"from": "dev18.in1", "to": "dev17.out1"},
{"from": "dev18.in2", "to": "dev17.out2"},
{"from": "dev18.in3", "to": "dev17.out3"},
{"from": "dev18.in4", "to": "dev15.out0"},
{"from": "dev18.in5", "to": "dev15.out1"},
{"from": "dev18.in6", "to": "dev15.out2"},
{"from": "dev18.in7", "to": "dev15.out3"},
{"from": "dev18.in8", "to": "dev9.out0"},
{"from": "dev19.in0", "to": "dev10.out0"},
{"from": "dev20.in0", "to": "dev18.out0"},
{"from": "dev21.in0", "to": "dev18.out1"},
{"from": "dev22.in0", "to": "dev18.out2"},
{"from": "dev23.in0", "to": "dev18.out3"},
{"from": "dev24.in0", "to": "dev11.out0"}
]
}
)
simcir.registerDevice('4ByteRam',
{
"name": "4ByteRam",
"width": 1000,
"height": 700,
"showToolbox": false,
"devices": [
{"type": "Toggle", "id": "dev0", "x": 80, "y": 432, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev1", "x": 80, "y": 240, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev2", "x": 80, "y": 200, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev3", "x": 80, "y": 288, "label": "Toggle", "state": {"on": false}},
{"type": "In", "id": "dev4", "x": 136, "y": 392, "label": "A0"},
{"type": "In", "id": "dev5", "x": 136, "y": 200, "label": "W0"},
{"type": "In", "id": "dev6", "x": 136, "y": 296, "label": "W2"},
{"type": "In", "id": "dev7", "x": 136, "y": 440, "label": "A1"},
{"type": "DC", "id": "dev8", "x": 8, "y": 336, "label": "DC"},
{"type": "In", "id": "dev9", "x": 136, "y": 344, "label": "W3"},
{"type": "Out", "id": "dev10", "x": 512, "y": 192, "label": "O0"},
{"type": "Out", "id": "dev11", "x": 512, "y": 240, "label": "O1"},
{"type": "Out", "id": "dev12", "x": 512, "y": 296, "label": "O2"},
{"type": "Out", "id": "dev13", "x": 512, "y": 344, "label": "O3"},
{"type": "Toggle", "id": "dev14", "x": 80, "y": 384, "label": "Toggle", "state": {"on": false}},
{"type": "In", "id": "dev15", "x": 128, "y": 8, "label": "D0"},
{"type": "In", "id": "dev16", "x": 128, "y": 56, "label": "D1"},
{"type": "In", "id": "dev17", "x": 128, "y": 104, "label": "D2"},
{"type": "In", "id": "dev18", "x": 128, "y": 152, "label": "D3"},
{"type": "2ByteRam", "id": "dev19", "x": 344, "y": 240, "label": "2ByteRam"},
{"type": "2ByteRam", "id": "dev20", "x": 344, "y": 40, "label": "2ByteRam"},
{"type": "In", "id": "dev21", "x": 136, "y": 248, "label": "W1"},
{"type": "In", "id": "dev22", "x": 136, "y": 584, "label": "On"},
{"type": "In", "id": "dev23", "x": 136, "y": 488, "label": "A2"},
{"type": "In", "id": "dev24", "x": 136, "y": 536, "label": "A3"},
{"type": "Toggle", "id": "dev25", "x": 80, "y": 488, "label": "Toggle", "state": {"on": false}},
{"type": "PushOn", "id": "dev26", "x": 80, "y": 584, "label": "PushOn"},
{"type": "Toggle", "id": "dev27", "x": 80, "y": 536, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev28", "x": 80, "y": 336, "label": "Toggle", "state": {"on": false}}
],
"connectors": [
{"from": "dev0.in0", "to": "dev8.out0"},
{"from": "dev1.in0", "to": "dev8.out0"},
{"from": "dev2.in0", "to": "dev8.out0"},
{"from": "dev3.in0", "to": "dev8.out0"},
{"from": "dev4.in0", "to": "dev14.out0"},
{"from": "dev5.in0", "to": "dev2.out0"},
{"from": "dev6.in0", "to": "dev3.out0"},
{"from": "dev7.in0", "to": "dev0.out0"},
{"from": "dev9.in0", "to": "dev28.out0"},
{"from": "dev10.in0", "to": "dev19.out0"},
{"from": "dev11.in0", "to": "dev19.out1"},
{"from": "dev12.in0", "to": "dev19.out2"},
{"from": "dev13.in0", "to": "dev19.out3"},
{"from": "dev14.in0", "to": "dev8.out0"},
{"from": "dev19.in0", "to": "dev20.out0"},
{"from": "dev19.in1", "to": "dev20.out1"},
{"from": "dev19.in2", "to": "dev20.out2"},
{"from": "dev19.in3", "to": "dev20.out3"},
{"from": "dev19.in4", "to": "dev5.out0"},
{"from": "dev19.in5", "to": "dev21.out0"},
{"from": "dev19.in6", "to": "dev6.out0"},
{"from": "dev19.in7", "to": "dev9.out0"},
{"from": "dev19.in8", "to": "dev23.out0"},
{"from": "dev19.in9", "to": "dev24.out0"},
{"from": "dev19.in10", "to": "dev22.out0"},
{"from": "dev20.in0", "to": "dev15.out0"},
{"from": "dev20.in1", "to": "dev16.out0"},
{"from": "dev20.in2", "to": "dev17.out0"},
{"from": "dev20.in3", "to": "dev18.out0"},
{"from": "dev20.in4", "to": "dev5.out0"},
{"from": "dev20.in5", "to": "dev21.out0"},
{"from": "dev20.in6", "to": "dev6.out0"},
{"from": "dev20.in7", "to": "dev9.out0"},
{"from": "dev20.in8", "to": "dev4.out0"},
{"from": "dev20.in9", "to": "dev7.out0"},
{"from": "dev20.in10", "to": "dev22.out0"},
{"from": "dev21.in0", "to": "dev1.out0"},
{"from": "dev22.in0", "to": "dev26.out0"},
{"from": "dev23.in0", "to": "dev25.out0"},
{"from": "dev24.in0", "to": "dev27.out0"},
{"from": "dev25.in0", "to": "dev8.out0"},
{"from": "dev26.in0", "to": "dev8.out0"},
{"from": "dev27.in0", "to": "dev8.out0"},
{"from": "dev28.in0", "to": "dev8.out0"}
]
}
)
simcir.registerDevice('8ByteRam',
{
"name": "8ByteRam",
"width": 1000,
"height": 700,
"showToolbox": false,
"devices": [
{"type": "Toggle", "id": "dev0", "x": 80, "y": 432, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev1", "x": 80, "y": 240, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev2", "x": 80, "y": 200, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev3", "x": 80, "y": 288, "label": "Toggle", "state": {"on": false}},
{"type": "In", "id": "dev4", "x": 136, "y": 392, "label": "A0"},
{"type": "In", "id": "dev5", "x": 136, "y": 200, "label": "W0"},
{"type": "In", "id": "dev6", "x": 136, "y": 296, "label": "W2"},
{"type": "In", "id": "dev7", "x": 136, "y": 440, "label": "A1"},
{"type": "DC", "id": "dev8", "x": 8, "y": 336, "label": "DC"},
{"type": "In", "id": "dev9", "x": 136, "y": 344, "label": "W3"},
{"type": "Out", "id": "dev10", "x": 512, "y": 192, "label": "O0"},
{"type": "Out", "id": "dev11", "x": 512, "y": 240, "label": "O1"},
{"type": "Out", "id": "dev12", "x": 512, "y": 296, "label": "O2"},
{"type": "Out", "id": "dev13", "x": 512, "y": 344, "label": "O3"},
{"type": "Toggle", "id": "dev14", "x": 80, "y": 384, "label": "Toggle", "state": {"on": false}},
{"type": "In", "id": "dev15", "x": 128, "y": 8, "label": "D0"},
{"type": "In", "id": "dev16", "x": 128, "y": 56, "label": "D1"},
{"type": "In", "id": "dev17", "x": 128, "y": 104, "label": "D2"},
{"type": "In", "id": "dev18", "x": 128, "y": 152, "label": "D3"},
{"type": "In", "id": "dev19", "x": 236, "y": 592, "label": "On"},
{"type": "In", "id": "dev20", "x": 136, "y": 488, "label": "A2"},
{"type": "In", "id": "dev21", "x": 136, "y": 536, "label": "A3"},
{"type": "Toggle", "id": "dev22", "x": 80, "y": 488, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev24", "x": 80, "y": 536, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev25", "x": 80, "y": 336, "label": "Toggle", "state": {"on": false}},
{"type": "4ByteRam", "id": "dev26", "x": 328, "y": 48, "label": "4ByteRam"},
{"type": "In", "id": "dev27", "x": 136, "y": 248, "label": "W1"},
{"type": "In", "id": "dev28", "x": 232, "y": 392, "label": "A4"},
{"type": "In", "id": "dev29", "x": 232, "y": 440, "label": "A5"},
{"type": "In", "id": "dev30", "x": 232, "y": 488, "label": "A6"},
{"type": "In", "id": "dev31", "x": 232, "y": 544, "label": "A7"},
{"type": "PushOn", "id": "dev23", "x": 80, "y": 592, "label": "PushOn"},
{"type": "4ByteRam", "id": "dev32", "x": 336, "y": 296, "label": "4ByteRam"}
],
"connectors": [
{"from": "dev0.in0", "to": "dev8.out0"},
{"from": "dev1.in0", "to": "dev8.out0"},
{"from": "dev2.in0", "to": "dev8.out0"},
{"from": "dev3.in0", "to": "dev8.out0"},
{"from": "dev4.in0", "to": "dev14.out0"},
{"from": "dev5.in0", "to": "dev2.out0"},
{"from": "dev6.in0", "to": "dev3.out0"},
{"from": "dev7.in0", "to": "dev0.out0"},
{"from": "dev9.in0", "to": "dev25.out0"},
{"from": "dev10.in0", "to": "dev32.out0"},
{"from": "dev11.in0", "to": "dev32.out1"},
{"from": "dev12.in0", "to": "dev32.out2"},
{"from": "dev13.in0", "to": "dev32.out3"},
{"from": "dev14.in0", "to": "dev8.out0"},
{"from": "dev19.in0", "to": "dev23.out0"},
{"from": "dev20.in0", "to": "dev22.out0"},
{"from": "dev21.in0", "to": "dev24.out0"},
{"from": "dev22.in0", "to": "dev8.out0"},
{"from": "dev23.in0", "to": "dev8.out0"},
{"from": "dev24.in0", "to": "dev8.out0"},
{"from": "dev25.in0", "to": "dev8.out0"},
{"from": "dev26.in0", "to": "dev15.out0"},
{"from": "dev26.in1", "to": "dev16.out0"},
{"from": "dev26.in2", "to": "dev17.out0"},
{"from": "dev26.in3", "to": "dev18.out0"},
{"from": "dev26.in4", "to": "dev5.out0"},
{"from": "dev26.in5", "to": "dev27.out0"},
{"from": "dev26.in6", "to": "dev6.out0"},
{"from": "dev26.in7", "to": "dev9.out0"},
{"from": "dev26.in8", "to": "dev4.out0"},
{"from": "dev26.in9", "to": "dev7.out0"},
{"from": "dev26.in10", "to": "dev20.out0"},
{"from": "dev26.in11", "to": "dev21.out0"},
{"from": "dev26.in12", "to": "dev19.out0"},
{"from": "dev27.in0", "to": "dev1.out0"},
{"from": "dev32.in0", "to": "dev26.out0"},
{"from": "dev32.in1", "to": "dev26.out1"},
{"from": "dev32.in2", "to": "dev26.out2"},
{"from": "dev32.in3", "to": "dev26.out3"},
{"from": "dev32.in4", "to": "dev5.out0"},
{"from": "dev32.in5", "to": "dev27.out0"},
{"from": "dev32.in6", "to": "dev6.out0"},
{"from": "dev32.in7", "to": "dev9.out0"},
{"from": "dev32.in8", "to": "dev28.out0"},
{"from": "dev32.in9", "to": "dev29.out0"},
{"from": "dev32.in10", "to": "dev30.out0"},
{"from": "dev32.in11", "to": "dev31.out0"},
{"from": "dev32.in12", "to": "dev19.out0"}
]
}
)
simcir.registerDevice('16ByteRam',
{
"name": "16ByteRam",
"width": 800,
"height": 800,
"showToolbox": false,
"devices": [
{"type": "In", "id": "dev0", "x": 120, "y": 168, "label": "W0"},
{"type": "In", "id": "dev1", "x": 120, "y": 216, "label": "W1"},
{"type": "In", "id": "dev2", "x": 120, "y": 328, "label": "W3"},
{"type": "In", "id": "dev3", "x": 120, "y": 272, "label": "W2"},
{"type": "In", "id": "dev4", "x": 120, "y": 384, "label": "R0"},
{"type": "In", "id": "dev5", "x": 120, "y": 440, "label": "R1"},
{"type": "In", "id": "dev6", "x": 120, "y": 488, "label": "R2"},
{"type": "In", "id": "dev7", "x": 120, "y": 544, "label": "R3"},
{"type": "In", "id": "dev8", "x": 120, "y": 600, "label": "On"},
{"type": "Toggle", "id": "dev9", "x": 56, "y": 168, "label": "Toggle", "state": {"on": false}},
{"type": "PushOn", "id": "dev10", "x": 48, "y": 600, "label": "PushOn"},
{"type": "Toggle", "id": "dev11", "x": 56, "y": 224, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev12", "x": 56, "y": 272, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev13", "x": 56, "y": 328, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev14", "x": 56, "y": 384, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev15", "x": 56, "y": 432, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev16", "x": 56, "y": 488, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev17", "x": 48, "y": 544, "label": "Toggle", "state": {"on": false}},
{"type": "DC", "id": "dev18", "x": 8, "y": 264, "label": "DC"},
{"type": "BinToDez", "id": "dev19", "x": 208, "y": 344, "label": "BinToDez"},
{"type": "Out", "id": "dev20", "x": 496, "y": 360, "label": "O0"},
{"type": "Out", "id": "dev21", "x": 496, "y": 408, "label": "O1"},
{"type": "Out", "id": "dev22", "x": 496, "y": 456, "label": "O2"},
{"type": "Out", "id": "dev23", "x": 496, "y": 512, "label": "O3"},
{"type": "8ByteRam", "id": "dev24", "x": 344, "y": 48, "label": "8ByteRam"},
{"type": "8ByteRam", "id": "dev25", "x": 344, "y": 344, "label": "8ByteRam"},
{"type": "In", "id": "dev26", "x": 112, "y": 656, "label": "OE"}
],
"connectors": [
{"from": "dev0.in0", "to": "dev9.out0"},
{"from": "dev1.in0", "to": "dev11.out0"},
{"from": "dev2.in0", "to": "dev13.out0"},
{"from": "dev3.in0", "to": "dev12.out0"},
{"from": "dev4.in0", "to": "dev14.out0"},
{"from": "dev5.in0", "to": "dev15.out0"},
{"from": "dev6.in0", "to": "dev16.out0"},
{"from": "dev7.in0", "to": "dev17.out0"},
{"from": "dev8.in0", "to": "dev10.out0"},
{"from": "dev9.in0", "to": "dev18.out0"},
{"from": "dev10.in0", "to": "dev18.out0"},
{"from": "dev11.in0", "to": "dev18.out0"},
{"from": "dev12.in0", "to": "dev18.out0"},
{"from": "dev13.in0", "to": "dev18.out0"},
{"from": "dev14.in0", "to": "dev18.out0"},
{"from": "dev15.in0", "to": "dev18.out0"},
{"from": "dev16.in0", "to": "dev18.out0"},
{"from": "dev17.in0", "to": "dev18.out0"},
{"from": "dev19.in0", "to": "dev4.out0"},
{"from": "dev19.in1", "to": "dev5.out0"},
{"from": "dev19.in2", "to": "dev6.out0"},
{"from": "dev19.in3", "to": "dev7.out0"},
{"from": "dev19.in4", "to": "dev26.out0"},
{"from": "dev20.in0", "to": "dev25.out0"},
{"from": "dev21.in0", "to": "dev25.out1"},
{"from": "dev22.in0", "to": "dev25.out2"},
{"from": "dev23.in0", "to": "dev25.out3"},
{"from": "dev24.in4", "to": "dev0.out0"},
{"from": "dev24.in5", "to": "dev1.out0"},
{"from": "dev24.in6", "to": "dev3.out0"},
{"from": "dev24.in7", "to": "dev2.out0"},
{"from": "dev24.in8", "to": "dev19.out0"},
{"from": "dev24.in9", "to": "dev19.out1"},
{"from": "dev24.in10", "to": "dev19.out2"},
{"from": "dev24.in11", "to": "dev19.out3"},
{"from": "dev24.in12", "to": "dev19.out4"},
{"from": "dev24.in13", "to": "dev19.out5"},
{"from": "dev24.in14", "to": "dev19.out6"},
{"from": "dev24.in15", "to": "dev19.out7"},
{"from": "dev24.in16", "to": "dev8.out0"},
{"from": "dev25.in0", "to": "dev24.out0"},
{"from": "dev25.in1", "to": "dev24.out1"},
{"from": "dev25.in2", "to": "dev24.out2"},
{"from": "dev25.in3", "to": "dev24.out3"},
{"from": "dev25.in4", "to": "dev0.out0"},
{"from": "dev25.in5", "to": "dev1.out0"},
{"from": "dev25.in6", "to": "dev3.out0"},
{"from": "dev25.in7", "to": "dev2.out0"},
{"from": "dev25.in8", "to": "dev19.out8"},
{"from": "dev25.in9", "to": "dev19.out9"},
{"from": "dev25.in10", "to": "dev19.out10"},
{"from": "dev25.in11", "to": "dev19.out11"},
{"from": "dev25.in12", "to": "dev19.out12"},
{"from": "dev25.in13", "to": "dev19.out13"},
{"from": "dev25.in14", "to": "dev19.out14"},
{"from": "dev25.in15", "to": "dev19.out15"},
{"from": "dev25.in16", "to": "dev8.out0"}
]
}
)
simcir.registerDevice('4BitCounter',
{
"name": "4BitCounter",
"width": 700,
"height": 600,
"showToolbox": false,
"devices": [
{"type": "Out", "id": "dev0", "x": 400, "y": 72, "label": "O0"},
{"type": "Out", "id": "dev1", "x": 400, "y": 120, "label": "O1"},
{"type": "Out", "id": "dev2", "x": 400, "y": 168, "label": "O2"},
{"type": "Out", "id": "dev3", "x": 400, "y": 224, "label": "O3"},
{"type": "Out", "id": "dev4", "x": 400, "y": 280, "label": "State"},
{"type": "In", "id": "dev5", "x": 160, "y": 216, "label": "R0"},
{"type": "In", "id": "dev6", "x": 160, "y": 264, "label": "R1"},
{"type": "In", "id": "dev7", "x": 160, "y": 320, "label": "R2"},
{"type": "In", "id": "dev8", "x": 160, "y": 376, "label": "R3"},
{"type": "4bitAdder", "id": "dev9", "x": 256, "y": 176, "label": "4bitAdder"},
{"type": "4BitNOD", "id": "dev10", "x": 264, "y": 344, "label": "4BitNOD"},
{"type": "4BitRam", "id": "dev11", "x": 256, "y": 64, "label": "4BitRam"},
{"type": "In", "id": "dev12", "x": 160, "y": 96, "label": "On"},
{"type": "In", "id": "dev13", "x": 160, "y": 160, "label": "OE"},
{"type": "PushOn", "id": "dev14", "x": 96, "y": 104, "label": "PushOn"},
{"type": "DC", "id": "dev15", "x": 32, "y": 112, "label": "DC"},
{"type": "In", "id": "dev16", "x": 160, "y": 424, "label": "Set"}
],
"connectors": [
{"from": "dev0.in0", "to": "dev11.out0"},
{"from": "dev1.in0", "to": "dev11.out1"},
{"from": "dev2.in0", "to": "dev11.out2"},
{"from": "dev3.in0", "to": "dev11.out3"},
{"from": "dev4.in0", "to": "dev11.out0"},
{"from": "dev9.in1", "to": "dev11.out0"},
{"from": "dev9.in2", "to": "dev11.out1"},
{"from": "dev9.in3", "to": "dev11.out2"},
{"from": "dev9.in4", "to": "dev11.out3"},
{"from": "dev9.in5", "to": "dev13.out0"},
{"from": "dev10.in0", "to": "dev5.out0"},
{"from": "dev10.in1", "to": "dev6.out0"},
{"from": "dev10.in2", "to": "dev7.out0"},
{"from": "dev10.in3", "to": "dev8.out0"},
{"from": "dev10.in4", "to": "dev9.out0"},
{"from": "dev10.in5", "to": "dev9.out1"},
{"from": "dev10.in6", "to": "dev9.out2"},
{"from": "dev10.in7", "to": "dev9.out3"},
{"from": "dev10.in8", "to": "dev16.out0"},
{"from": "dev11.in0", "to": "dev10.out0"},
{"from": "dev11.in1", "to": "dev10.out1"},
{"from": "dev11.in2", "to": "dev10.out2"},
{"from": "dev11.in3", "to": "dev10.out3"},
{"from": "dev11.in4", "to": "dev12.out0"},
{"from": "dev12.in0", "to": "dev14.out0"},
{"from": "dev13.in0", "to": "dev15.out0"},
{"from": "dev14.in0", "to": "dev15.out0"}
]
}
)
simcir.registerDevice('HalfSub',
{
"name": "HalfSub",
"width": 600,
"height": 400,
"showToolbox": false,
"devices": [
{"type": "In", "id": "dev0", "x": 168, "y": 56, "label": "A"},
{"type": "In", "id": "dev1", "x": 168, "y": 104, "label": "B"},
{"type": "AND", "id": "dev2", "x": 296, "y": 104, "label": "AND"},
{"type": "XOR", "id": "dev3", "x": 248, "y": 56, "label": "XOR"},
{"type": "Out", "id": "dev4", "x": 360, "y": 104, "label": "B"},
{"type": "Out", "id": "dev5", "x": 352, "y": 48, "label": "D"},
{"type": "Toggle", "id": "dev6", "x": 96, "y": 56, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev7", "x": 96, "y": 104, "label": "Toggle", "state": {"on": false}},
{"type": "DC", "id": "dev8", "x": 32, "y": 88, "label": "DC"},
{"type": "NOT", "id": "dev9", "x": 248, "y": 104, "label": "NOT"}
],
"connectors": [
{"from": "dev0.in0", "to": "dev6.out0"},
{"from": "dev1.in0", "to": "dev7.out0"},
{"from": "dev2.in0", "to": "dev9.out0"},
{"from": "dev2.in1", "to": "dev1.out0"},
{"from": "dev3.in0", "to": "dev0.out0"},
{"from": "dev3.in1", "to": "dev1.out0"},
{"from": "dev4.in0", "to": "dev2.out0"},
{"from": "dev5.in0", "to": "dev3.out0"},
{"from": "dev6.in0", "to": "dev8.out0"},
{"from": "dev7.in0", "to": "dev8.out0"},
{"from": "dev9.in0", "to": "dev0.out0"}
]
}
)
simcir.registerDevice('FullSub',
{
"name": "FullSub",
"width": 600,
"height": 400,
"showToolbox": false,
"devices": [
{"type": "In", "id": "dev0", "x": 144, "y": 120, "label": "A"},
{"type": "In", "id": "dev1", "x": 144, "y": 176, "label": "B"},
{"type": "In", "id": "dev2", "x": 144, "y": 72, "label": "BIn"},
{"type": "HalfSub", "id": "dev3", "x": 216, "y": 144, "label": "HalfSub"},
{"type": "OR", "id": "dev4", "x": 368, "y": 144, "label": "OR"},
{"type": "Out", "id": "dev5", "x": 424, "y": 88, "label": "D"},
{"type": "Out", "id": "dev6", "x": 424, "y": 144, "label": "BOut"},
{"type": "Toggle", "id": "dev7", "x": 88, "y": 72, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev8", "x": 88, "y": 120, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev9", "x": 88, "y": 176, "label": "Toggle", "state": {"on": false}},
{"type": "DC", "id": "dev10", "x": 32, "y": 128, "label": "DC"},
{"type": "HalfSub", "id": "dev11", "x": 288, "y": 96, "label": "HalfSub"}
],
"connectors": [
{"from": "dev0.in0", "to": "dev8.out0"},
{"from": "dev1.in0", "to": "dev9.out0"},
{"from": "dev2.in0", "to": "dev7.out0"},
{"from": "dev3.in0", "to": "dev0.out0"},
{"from": "dev3.in1", "to": "dev1.out0"},
{"from": "dev4.in0", "to": "dev11.out1"},
{"from": "dev4.in1", "to": "dev3.out1"},
{"from": "dev5.in0", "to": "dev11.out0"},
{"from": "dev6.in0", "to": "dev4.out0"},
{"from": "dev7.in0", "to": "dev10.out0"},
{"from": "dev8.in0", "to": "dev10.out0"},
{"from": "dev9.in0", "to": "dev10.out0"},
{"from": "dev11.in0", "to": "dev3.out0"},
{"from": "dev11.in1", "to": "dev2.out0"}
]
}
)
simcir.registerDevice('4BitSub',
{
"name": "4BitSub",
"width": 800,
"height": 600,
"showToolbox": false,
"devices": [
{"type": "In", "id": "dev0", "x": 152, "y": 64, "label": "A0"},
{"type": "In", "id": "dev1", "x": 152, "y": 112, "label": "A1"},
{"type": "In", "id": "dev2", "x": 152, "y": 168, "label": "A2"},
{"type": "In", "id": "dev3", "x": 152, "y": 216, "label": "A3"},
{"type": "In", "id": "dev4", "x": 152, "y": 264, "label": "B0"},
{"type": "In", "id": "dev5", "x": 152, "y": 312, "label": "B1"},
{"type": "In", "id": "dev6", "x": 152, "y": 368, "label": "B2"},
{"type": "In", "id": "dev7", "x": 152, "y": 416, "label": "B3"},
{"type": "FullSub", "id": "dev8", "x": 256, "y": 328, "label": "FullSub"},
{"type": "FullSub", "id": "dev9", "x": 256, "y": 248, "label": "FullSub"},
{"type": "Toggle", "id": "dev10", "x": 96, "y": 416, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev11", "x": 96, "y": 368, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev12", "x": 96, "y": 264, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev13", "x": 96, "y": 216, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev14", "x": 96, "y": 168, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev15", "x": 96, "y": 112, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev16", "x": 96, "y": 64, "label": "Toggle", "state": {"on": false}},
{"type": "DC", "id": "dev17", "x": 32, "y": 232, "label": "DC"},
{"type": "FullSub", "id": "dev18", "x": 256, "y": 168, "label": "FullSub"},
{"type": "In", "id": "dev19", "x": 152, "y": 16, "label": "BIn"},
{"type": "Out", "id": "dev20", "x": 384, "y": 96, "label": "D0"},
{"type": "Out", "id": "dev21", "x": 384, "y": 152, "label": "D1"},
{"type": "Out", "id": "dev22", "x": 384, "y": 216, "label": "D2"},
{"type": "Out", "id": "dev23", "x": 384, "y": 280, "label": "D3"},
{"type": "FullSub", "id": "dev24", "x": 256, "y": 88, "label": "FullSub"},
{"type": "Out", "id": "dev25", "x": 384, "y": 336, "label": "BOut"},
{"type": "Toggle", "id": "dev26", "x": 96, "y": 312, "label": "Toggle", "state": {"on": false}}
],
"connectors": [
{"from": "dev0.in0", "to": "dev16.out0"},
{"from": "dev1.in0", "to": "dev15.out0"},
{"from": "dev2.in0", "to": "dev14.out0"},
{"from": "dev3.in0", "to": "dev13.out0"},
{"from": "dev4.in0", "to": "dev12.out0"},
{"from": "dev5.in0", "to": "dev26.out0"},
{"from": "dev6.in0", "to": "dev11.out0"},
{"from": "dev7.in0", "to": "dev10.out0"},
{"from": "dev8.in0", "to": "dev9.out1"},
{"from": "dev8.in1", "to": "dev3.out0"},
{"from": "dev8.in2", "to": "dev7.out0"},
{"from": "dev9.in0", "to": "dev18.out1"},
{"from": "dev9.in1", "to": "dev2.out0"},
{"from": "dev9.in2", "to": "dev6.out0"},
{"from": "dev10.in0", "to": "dev17.out0"},
{"from": "dev11.in0", "to": "dev17.out0"},
{"from": "dev12.in0", "to": "dev17.out0"},
{"from": "dev13.in0", "to": "dev17.out0"},
{"from": "dev14.in0", "to": "dev17.out0"},
{"from": "dev15.in0", "to": "dev17.out0"},
{"from": "dev16.in0", "to": "dev17.out0"},
{"from": "dev18.in0", "to": "dev24.out1"},
{"from": "dev18.in1", "to": "dev1.out0"},
{"from": "dev18.in2", "to": "dev5.out0"},
{"from": "dev20.in0", "to": "dev24.out0"},
{"from": "dev21.in0", "to": "dev18.out0"},
{"from": "dev22.in0", "to": "dev9.out0"},
{"from": "dev23.in0", "to": "dev8.out0"},
{"from": "dev24.in0", "to": "dev19.out0"},
{"from": "dev24.in1", "to": "dev0.out0"},
{"from": "dev24.in2", "to": "dev4.out0"},
{"from": "dev25.in0", "to": "dev8.out1"},
{"from": "dev26.in0", "to": "dev17.out0"}
]
}
)
simcir.registerDevice('10OR',
{
"name": "10OR",
"width": 800,
"height": 600,
"showToolbox": false,
"devices": [
{"type": "Toggle", "id": "dev0", "x": 96, "y": 392, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev1", "x": 96, "y": 344, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev2", "x": 96, "y": 288, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev3", "x": 96, "y": 240, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev4", "x": 96, "y": 192, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev5", "x": 96, "y": 144, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev6", "x": 96, "y": 88, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev7", "x": 96, "y": 40, "label": "Toggle", "state": {"on": false}},
{"type": "DC", "id": "dev8", "x": 32, "y": 208, "label": "DC"},
{"type": "In", "id": "dev9", "x": 152, "y": 40, "label": "0"},
{"type": "In", "id": "dev10", "x": 152, "y": 88, "label": "1"},
{"type": "In", "id": "dev11", "x": 152, "y": 144, "label": "2"},
{"type": "In", "id": "dev12", "x": 152, "y": 240, "label": "4"},
{"type": "In", "id": "dev13", "x": 152, "y": 288, "label": "5"},
{"type": "In", "id": "dev14", "x": 152, "y": 344, "label": "6"},
{"type": "In", "id": "dev15", "x": 152, "y": 392, "label": "7"},
{"type": "In", "id": "dev16", "x": 152, "y": 440, "label": "8"},
{"type": "In", "id": "dev17", "x": 152, "y": 496, "label": "9"},
{"type": "OR", "id": "dev18", "x": 224, "y": 72, "label": "OR"},
{"type": "In", "id": "dev19", "x": 152, "y": 192, "label": "3"},
{"type": "OR", "id": "dev20", "x": 224, "y": 264, "label": "OR"},
{"type": "OR", "id": "dev21", "x": 224, "y": 368, "label": "OR"},
{"type": "OR", "id": "dev22", "x": 224, "y": 464, "label": "OR"},
{"type": "OR", "id": "dev23", "x": 296, "y": 120, "label": "OR"},
{"type": "OR", "id": "dev24", "x": 224, "y": 176, "label": "OR"},
{"type": "OR", "id": "dev25", "x": 296, "y": 320, "label": "OR"},
{"type": "OR", "id": "dev26", "x": 368, "y": 376, "label": "OR"},
{"type": "OR", "id": "dev27", "x": 408, "y": 208, "label": "OR"},
{"type": "Out", "id": "dev28", "x": 480, "y": 208, "label": "Out"}
],
"connectors": [
{"from": "dev0.in0", "to": "dev8.out0"},
{"from": "dev1.in0", "to": "dev8.out0"},
{"from": "dev2.in0", "to": "dev8.out0"},
{"from": "dev3.in0", "to": "dev8.out0"},
{"from": "dev4.in0", "to": "dev8.out0"},
{"from": "dev5.in0", "to": "dev8.out0"},
{"from": "dev6.in0", "to": "dev8.out0"},
{"from": "dev7.in0", "to": "dev8.out0"},
{"from": "dev9.in0", "to": "dev7.out0"},
{"from": "dev10.in0", "to": "dev6.out0"},
{"from": "dev11.in0", "to": "dev5.out0"},
{"from": "dev12.in0", "to": "dev3.out0"},
{"from": "dev13.in0", "to": "dev2.out0"},
{"from": "dev14.in0", "to": "dev1.out0"},
{"from": "dev15.in0", "to": "dev0.out0"},
{"from": "dev18.in0", "to": "dev9.out0"},
{"from": "dev18.in1", "to": "dev10.out0"},
{"from": "dev19.in0", "to": "dev4.out0"},
{"from": "dev20.in0", "to": "dev12.out0"},
{"from": "dev20.in1", "to": "dev13.out0"},
{"from": "dev21.in0", "to": "dev14.out0"},
{"from": "dev21.in1", "to": "dev15.out0"},
{"from": "dev22.in0", "to": "dev16.out0"},
{"from": "dev22.in1", "to": "dev17.out0"},
{"from": "dev23.in0", "to": "dev18.out0"},
{"from": "dev23.in1", "to": "dev24.out0"},
{"from": "dev24.in0", "to": "dev11.out0"},
{"from": "dev24.in1", "to": "dev19.out0"},
{"from": "dev25.in0", "to": "dev20.out0"},
{"from": "dev25.in1", "to": "dev21.out0"},
{"from": "dev26.in0", "to": "dev25.out0"},
{"from": "dev26.in1", "to": "dev22.out0"},
{"from": "dev27.in0", "to": "dev23.out0"},
{"from": "dev27.in1", "to": "dev26.out0"},
{"from": "dev28.in0", "to": "dev27.out0"}
]
}
)
simcir.registerDevice('if0',
{
"name": "if0",
"width": 600,
"height": 600,
"showToolbox": false,
"devices": [
{"type": "Toggle", "id": "dev0", "x": 96, "y": 192, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev1", "x": 96, "y": 144, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev2", "x": 96, "y": 88, "label": "Toggle", "state": {"on": false}},
{"type": "Toggle", "id": "dev3", "x": 96, "y": 40, "label": "Toggle", "state": {"on": false}},
{"type": "In", "id": "dev4", "x": 152, "y": 40, "label": "0"},
{"type": "In", "id": "dev5", "x": 152, "y": 88, "label": "1"},
{"type": "In", "id": "dev6", "x": 152, "y": 144, "label": "2"},
{"type": "In", "id": "dev7", "x": 152, "y": 192, "label": "3"},
{"type": "DC", "id": "dev8", "x": 40, "y": 112, "label": "DC"},
{"type": "OR", "id": "dev9", "x": 216, "y": 64, "label": "OR"},
{"type": "OR", "id": "dev10", "x": 216, "y": 160, "label": "OR"},
{"type": "NOR", "id": "dev11", "x": 288, "y": 104, "label": "NOR"},
{"type": "Out", "id": "dev12", "x": 368, "y": 104, "label": "Out"}
],
"connectors": [
{"from": "dev0.in0", "to": "dev8.out0"},
{"from": "dev1.in0", "to": "dev8.out0"},
{"from": "dev2.in0", "to": "dev8.out0"},
{"from": "dev3.in0", "to": "dev8.out0"},
{"from": "dev4.in0", "to": "dev3.out0"},
{"from": "dev5.in0", "to": "dev2.out0"},
{"from": "dev6.in0", "to": "dev1.out0"},
{"from": "dev7.in0", "to": "dev0.out0"},