plunker에서 simcirjs 6

개요



plunker에서 simcirjs를 시도했습니다.
4입력 3출력 가산기 만들어 보았다.

사진





진리표




a
b
c
d
s0
s1
s2


0
0
0
0
0
0
0

0
0
0
1
1
0
0

0
0
1
0
1
0
0

0
0
1
1
0
0
0

0
1
0
0
1
0
0

0
1
0
1
0
0
1

0
1
1
0
0
1
0

0
1
1
1
1
1
0

1
0
0
0
1
0
0

1
0
0
1
0
0
1

1
0
1
0
0
1
0

1
0
1
1
1
1
1

1
1
0
0
0
1
0

1
1
0
1
1
0
1

1
1
1
0
1
1
0

1
1
1
1
0
1
1


샘플 코드


{
  "width":800,
  "height":400,
  "showToolbox":true,
  "toolbox":[
    {"type":"In"},
    {"type":"Out"},
    {"type":"Joint"},
    {"type":"DC"},
    {"type":"LED"},
    {"type":"PushOff"},
    {"type":"PushOn"},
    {"type":"Toggle"},
    {"type":"BUF"},
    {"type":"NOT"},
    {"type":"AND"},
    {"type":"NAND"},
    {"type":"OR"},
    {"type":"NOR"},
    {"type":"XOR"},
    {"type":"XNOR"},
    {"type":"OSC"},
    {"type":"7seg"},
    {"type":"16seg"},
    {"type":"4bit7seg"},
    {"type":"RotaryEncoder"},
    {"type":"BusIn"},
    {"type":"BusOut"},
    {"type":"RS-FF"},
    {"type":"JK-FF"},
    {"type":"T-FF"},
    {"type":"D-FF"},
    {"type":"8bitCounter"},
    {"type":"HalfAdder"},
    {"type":"FullAdder"},
    {"type":"4bitAdder"},
    {"type":"2to4BinaryDecoder"},
    {"type":"3to8BinaryDecoder"},
    {"type":"4to16BinaryDecoder"},
    {"type":"AltFullAdder"},
    {"type":"Transmitter"},
    {"type":"Delay"},
    {"type":"NumSrc"},
    {"type":"NumDsp"},
    {"type":"DSO"}
  ],
  "devices":[
    {"type":"DC","id":"dev0","x":96,"y":120,"label":"DC"},
    {"type":"LED","id":"dev1","x":216,"y":112,"label":"LED"},
    {"type":"Toggle","id":"dev2","x":160,"y":184,"label":"Toggle","state":{"on":false}},
    {"type":"LED","id":"dev3","x":216,"y":264,"label":"LED"},
    {"type":"LED","id":"dev4","x":216,"y":336,"label":"LED"},
    {"type":"LED","id":"dev5","x":552,"y":216,"label":"LED"},
    {"type":"LED","id":"dev6","x":552,"y":112,"label":"LED"},
    {"type":"LED","id":"dev7","x":552,"y":32,"label":"LED"},
    {"type":"XOR","id":"dev8","x":312,"y":56,"label":"XOR"},
    {"type":"XOR","id":"dev9","x":312,"y":136,"label":"XOR"},
    {"type":"XOR","id":"dev10","x":416,"y":64,"label":"XOR"},
    {"type":"FullAdder","id":"dev11","x":320,"y":216,"label":"FullAdder"},
    {"type":"HalfAdder","id":"dev12","x":416,"y":264,"label":"HalfAdder"},
    {"type":"Toggle","id":"dev13","x":160,"y":40,"label":"Toggle","state":{"on":false}},
    {"type":"LED","id":"dev14","x":216,"y":184,"label":"LED"},
    {"type":"Toggle","id":"dev15","x":160,"y":120,"label":"Toggle","state":{"on":false}},
    {"type":"Toggle","id":"dev16","x":160,"y":256,"label":"Toggle","state":{"on":false}}
  ],
  "connectors":[
    {"from":"dev1.in0","to":"dev13.out0"},
    {"from":"dev2.in0","to":"dev0.out0"},
    {"from":"dev3.in0","to":"dev2.out0"},
    {"from":"dev4.in0","to":"dev16.out0"},
    {"from":"dev5.in0","to":"dev12.out1"},
    {"from":"dev6.in0","to":"dev11.out1"},
    {"from":"dev7.in0","to":"dev10.out0"},
    {"from":"dev8.in0","to":"dev13.out0"},
    {"from":"dev8.in1","to":"dev15.out0"},
    {"from":"dev9.in0","to":"dev2.out0"},
    {"from":"dev9.in1","to":"dev16.out0"},
    {"from":"dev10.in0","to":"dev8.out0"},
    {"from":"dev10.in1","to":"dev9.out0"},
    {"from":"dev11.in0","to":"dev13.out0"},
    {"from":"dev11.in1","to":"dev15.out0"},
    {"from":"dev11.in2","to":"dev2.out0"},
    {"from":"dev12.in0","to":"dev11.out0"},
    {"from":"dev12.in1","to":"dev16.out0"},
    {"from":"dev13.in0","to":"dev0.out0"},
    {"from":"dev14.in0","to":"dev15.out0"},
    {"from":"dev15.in0","to":"dev0.out0"},
    {"from":"dev16.in0","to":"dev0.out0"}
  ]
}

아티팩트



이상.

좋은 웹페이지 즐겨찾기