Commit 13e57dda08e7321dbb0c5d2d3795e6a6b695a80f

  • Tree SHA1: 4c8ec26
  • Parent SHA1: 985bfc0 (vertailut toimii totuustaululle, lausekkeelle ja kaaviolle. ideana vielä lisätä sallitut portit, eli tee kytkentä esim. pelkillä NANDeilla, ja pisteiden määrittäminen)
  • raw diff | raw patch
lisätty testaamista varten koe6.txt, jossa virheellinen simcirkaavio, ja k6.txt, jossa oikea kaavio, oikea lauseke ja totuustaulu testaamista varte on simcirtest.py tiedostossa
k6.txt
(23 / 0)
  
1{
2 "devices":[
3 {"type":"DC","id":"dev0","x":56,"y":144,"label":"DC"},
4 {"type":"Toggle","id":"dev1","x":160,"y":72,"label":"a"},
5 {"type":"Toggle","id":"dev2","x":160,"y":144,"label":"sel"},
6 {"type":"LED","id":"dev3","x":576,"y":72,"label":"Keltainen","color":"#ffff00"},
7 {"type":"LED","id":"dev4","x":576,"y":144,"label":"Sininen","color":"#0000ff"},
8 {"type":"AND","id":"dev5","x":344,"y":40,"label":"AND"},
9 {"type":"NOT","id":"dev6","x":264,"y":192,"label":"NOT"},
10 {"type":"AND","id":"dev7","x":352,"y":160,"label":"AND"}
11 ],
12 "connectors":[
13 {"from":"dev1.in0","to":"dev0.out0"},
14 {"from":"dev2.in0","to":"dev0.out0"},
15 {"from":"dev3.in0","to":"dev7.out0"},
16 {"from":"dev4.in0","to":"dev5.out0"},
17 {"from":"dev5.in0","to":"dev1.out0"},
18 {"from":"dev5.in1","to":"dev2.out0"},
19 {"from":"dev6.in0","to":"dev2.out0"},
20 {"from":"dev7.in0","to":"dev1.out0"},
21 {"from":"dev7.in1","to":"dev6.out0"}
22 ]
23}
koe6.txt
(23 / 0)
  
1{
2 "devices":[
3 {"type":"DC","id":"dev0","x":56,"y":144,"label":"DC"},
4 {"type":"Toggle","id":"dev1","x":160,"y":72,"label":"a"},
5 {"type":"LED","id":"dev2","x":576,"y":72,"label":"Keltainen","color":"#ffff00"},
6 {"type":"LED","id":"dev3","x":576,"y":144,"label":"Sininen","color":"#0000ff"},
7 {"type":"AND","id":"dev4","x":344,"y":80,"label":"AND"},
8 {"type":"NOT","id":"dev5","x":264,"y":96,"label":"NOT"},
9 {"type":"AND","id":"dev6","x":264,"y":152,"label":"AND"},
10 {"type":"Toggle","id":"dev7","x":160,"y":144,"label":"sel"}
11 ],
12 "connectors":[
13 {"from":"dev1.in0","to":"dev0.out0"},
14 {"from":"dev2.in0","to":"dev4.out0"},
15 {"from":"dev3.in0","to":"dev6.out0"},
16 {"from":"dev4.in0","to":"dev1.out0"},
17 {"from":"dev4.in1","to":"dev5.out0"},
18 {"from":"dev5.in0","to":"dev7.out0"},
19 {"from":"dev6.in0","to":"dev1.out0"},
20 {"from":"dev6.in1","to":"dev0.out0"},
21 {"from":"dev7.in0","to":"dev0.out0"}
22 ]
23}