Upload files to "/"

EN2 TP3
This commit is contained in:
2025-11-12 17:15:54 +01:00
parent 1792753143
commit bd612cfbce

818
TP3clavier.circ Normal file
View File

@@ -0,0 +1,818 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project source="2.13.22" version="1.0">
This file is intended to be loaded by Logisim-evolution (https://github.com/reds-heig/logisim-evolution).
<lib desc="#Wiring" name="0"/>
<lib desc="#Gates" name="1"/>
<lib desc="#Plexers" name="2">
<tool name="Multiplexer">
<a name="enable" val="false"/>
</tool>
<tool name="Demultiplexer">
<a name="enable" val="false"/>
</tool>
</lib>
<lib desc="#Arithmetic" name="3"/>
<lib desc="#Memory" name="4">
<tool name="RAM">
<a name="contents">addr/data: 8 8
0
</a>
</tool>
<tool name="ROM">
<a name="contents">addr/data: 8 8
0
</a>
</tool>
</lib>
<lib desc="#I/O" name="5"/>
<lib desc="#HDL-IP" name="6">
<tool name="VHDL Entity">
<a name="content">--------------------------------------------------------------------------------&#13;
-- HEIG-VD, institute REDS, 1400 Yverdon-les-Bains&#13;
-- Project :&#13;
-- File :&#13;
-- Autor :&#13;
-- Date :&#13;
--&#13;
--------------------------------------------------------------------------------&#13;
-- Description :&#13;
--&#13;
--------------------------------------------------------------------------------&#13;
&#13;
library ieee;&#13;
use ieee.std_logic_1164.all;&#13;
--use ieee.numeric_std.all;&#13;
&#13;
entity VHDL_Component is&#13;
port(&#13;
------------------------------------------------------------------------------&#13;
--Insert input ports below&#13;
horloge_i : in std_logic; -- input bit example&#13;
val_i : in std_logic_vector(3 downto 0); -- input vector example&#13;
------------------------------------------------------------------------------&#13;
--Insert output ports below&#13;
max_o : out std_logic; -- output bit example&#13;
cpt_o : out std_logic_Vector(3 downto 0) -- output vector example&#13;
);&#13;
end VHDL_Component;&#13;
&#13;
--------------------------------------------------------------------------------&#13;
--Complete your VHDL description below&#13;
architecture type_architecture of VHDL_Component is&#13;
&#13;
&#13;
begin&#13;
&#13;
&#13;
end type_architecture;&#13;
</a>
</tool>
</lib>
<lib desc="#TCL" name="7">
<tool name="TclGeneric">
<a name="content">library ieee;&#13;
use ieee.std_logic_1164.all;&#13;
&#13;
entity TCL_Generic is&#13;
port(&#13;
--Insert input ports below&#13;
horloge_i : in std_logic; -- input bit example&#13;
val_i : in std_logic_vector(3 downto 0); -- input vector example&#13;
&#13;
--Insert output ports below&#13;
max_o : out std_logic; -- output bit example&#13;
cpt_o : out std_logic_Vector(3 downto 0) -- output vector example&#13;
);&#13;
end TCL_Generic;&#13;
</a>
</tool>
</lib>
<lib desc="#Base" name="8">
<tool name="Text Tool">
<a name="text" val=""/>
<a name="font" val="SansSerif plain 12"/>
<a name="halign" val="center"/>
<a name="valign" val="base"/>
</tool>
</lib>
<lib desc="#BFH-Praktika" name="9"/>
<lib desc="#FSM" name="10">
<tool name="FSM Entity">
<a name="content">state_machine example @[50,50,800,500]{&#13;
in A[3] @[50,100,44,15];&#13;
out X[4] @[807,140,43,15];&#13;
codeWidth = 2;&#13;
reset = S0;&#13;
&#13;
state S0["01"]:&#13;
@[297,181,30,30]&#13;
set X="0001"; @[297,181,30,30] &#13;
goto S3 when (A=="000") @[346,269,68,21]; &#13;
goto S1 when default @[432,151,50,21]; &#13;
state S1["10"]:&#13;
@[470,186,30,30]&#13;
set X="0010"; @[470,186,30,30] &#13;
goto S0 when (A=="000") @[399,230,68,21]; &#13;
goto S2 when default @[533,276,50,21]; &#13;
state S2["00"]:&#13;
@[471,339,30,30]&#13;
set X={"00",A[0:1],"1"}; @[471,339,30,30] &#13;
goto S1 when (A[2:1]=="11") @[557,250,90,21]; &#13;
goto S3 when default @[392,398,50,21]; &#13;
state S3["11"]:&#13;
@[287,325,30,30]&#13;
set X="1000"; @[287,325,30,30] &#13;
goto S2 when (A=="000") @[388,313,68,21]; &#13;
goto S0 when default @[248,278,50,21]; &#13;
}&#13;
</a>
<a name="label" val=""/>
</tool>
</lib>
<main name="keypad_decoder"/>
<options>
<a name="gateUndefined" val="ignore"/>
<a name="simlimit" val="1000"/>
<a name="simrand" val="0"/>
<a name="tickmain" val="half_period"/>
</options>
<mappings>
<tool lib="8" map="Button2" name="Menu Tool"/>
<tool lib="8" map="Button3" name="Menu Tool"/>
<tool lib="8" map="Ctrl Button1" name="Menu Tool"/>
</mappings>
<toolbar>
<tool lib="8" name="Poke Tool"/>
<tool lib="8" name="Edit Tool"/>
<tool lib="8" name="Text Tool">
<a name="text" val=""/>
<a name="font" val="SansSerif plain 12"/>
<a name="halign" val="center"/>
<a name="valign" val="base"/>
</tool>
<sep/>
<tool lib="0" name="Pin"/>
<tool lib="0" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="labelloc" val="east"/>
</tool>
<tool lib="1" name="NOT Gate"/>
<tool lib="1" name="AND Gate"/>
<tool lib="1" name="OR Gate"/>
</toolbar>
<circuit name="keypad_decoder">
<a name="circuit" val="keypad_decoder"/>
<a name="clabel" val=""/>
<a name="clabelup" val="east"/>
<a name="clabelfont" val="SansSerif bold 16"/>
<a name="circuitnamedbox" val="true"/>
<a name="circuitvhdlpath" val=""/>
<wire from="(60,140)" to="(250,140)"/>
<wire from="(60,180)" to="(250,180)"/>
<wire from="(60,220)" to="(250,220)"/>
<wire from="(60,260)" to="(250,260)"/>
<wire from="(1180,190)" to="(1180,400)"/>
<wire from="(980,260)" to="(980,270)"/>
<wire from="(990,410)" to="(990,420)"/>
<wire from="(1120,440)" to="(1120,460)"/>
<wire from="(540,420)" to="(590,420)"/>
<wire from="(120,500)" to="(120,510)"/>
<wire from="(860,320)" to="(1050,320)"/>
<wire from="(970,430)" to="(970,460)"/>
<wire from="(120,520)" to="(120,540)"/>
<wire from="(1090,430)" to="(1090,440)"/>
<wire from="(980,420)" to="(980,440)"/>
<wire from="(970,460)" to="(990,460)"/>
<wire from="(970,480)" to="(990,480)"/>
<wire from="(970,520)" to="(990,520)"/>
<wire from="(690,440)" to="(900,440)"/>
<wire from="(760,270)" to="(760,380)"/>
<wire from="(1080,240)" to="(1090,240)"/>
<wire from="(380,560)" to="(860,560)"/>
<wire from="(1110,410)" to="(1120,410)"/>
<wire from="(800,280)" to="(1020,280)"/>
<wire from="(330,320)" to="(350,320)"/>
<wire from="(110,450)" to="(110,490)"/>
<wire from="(540,400)" to="(570,400)"/>
<wire from="(540,380)" to="(760,380)"/>
<wire from="(720,250)" to="(720,480)"/>
<wire from="(1020,190)" to="(1180,190)"/>
<wire from="(1090,430)" to="(1120,430)"/>
<wire from="(340,420)" to="(350,420)"/>
<wire from="(920,410)" to="(990,410)"/>
<wire from="(110,490)" to="(120,490)"/>
<wire from="(980,440)" to="(990,440)"/>
<wire from="(1000,480)" to="(1010,480)"/>
<wire from="(1000,520)" to="(1010,520)"/>
<wire from="(1000,420)" to="(1010,420)"/>
<wire from="(1000,400)" to="(1010,400)"/>
<wire from="(1000,440)" to="(1010,440)"/>
<wire from="(1000,460)" to="(1010,460)"/>
<wire from="(720,480)" to="(800,480)"/>
<wire from="(1090,400)" to="(1110,400)"/>
<wire from="(920,430)" to="(970,430)"/>
<wire from="(340,380)" to="(400,380)"/>
<wire from="(350,250)" to="(350,320)"/>
<wire from="(800,280)" to="(800,480)"/>
<wire from="(1050,300)" to="(1050,320)"/>
<wire from="(1140,400)" to="(1180,400)"/>
<wire from="(920,420)" to="(980,420)"/>
<wire from="(350,400)" to="(400,400)"/>
<wire from="(350,250)" to="(720,250)"/>
<wire from="(350,320)" to="(400,320)"/>
<wire from="(70,400)" to="(120,400)"/>
<wire from="(70,500)" to="(120,500)"/>
<wire from="(70,540)" to="(120,540)"/>
<wire from="(350,400)" to="(350,420)"/>
<wire from="(120,400)" to="(120,480)"/>
<wire from="(660,490)" to="(660,520)"/>
<wire from="(590,440)" to="(690,440)"/>
<wire from="(980,260)" to="(1020,260)"/>
<wire from="(70,450)" to="(110,450)"/>
<wire from="(380,340)" to="(380,560)"/>
<wire from="(1110,400)" to="(1110,410)"/>
<wire from="(590,420)" to="(590,440)"/>
<wire from="(660,490)" to="(690,490)"/>
<wire from="(360,340)" to="(380,340)"/>
<wire from="(380,340)" to="(400,340)"/>
<wire from="(760,270)" to="(980,270)"/>
<wire from="(260,360)" to="(400,360)"/>
<wire from="(1090,460)" to="(1120,460)"/>
<wire from="(1090,420)" to="(1120,420)"/>
<wire from="(920,400)" to="(990,400)"/>
<wire from="(690,440)" to="(690,490)"/>
<wire from="(990,520)" to="(1000,520)"/>
<wire from="(990,480)" to="(1000,480)"/>
<wire from="(990,420)" to="(1000,420)"/>
<wire from="(990,400)" to="(1000,400)"/>
<wire from="(990,440)" to="(1000,440)"/>
<wire from="(990,460)" to="(1000,460)"/>
<wire from="(1020,190)" to="(1020,240)"/>
<wire from="(860,320)" to="(860,560)"/>
<comp lib="0" loc="(340,420)" name="Pin">
<a name="label" val="ACK"/>
</comp>
<comp lib="0" loc="(60,140)" name="Pin">
<a name="label" val="L0"/>
</comp>
<comp lib="0" loc="(1010,540)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="l0"/>
</comp>
<comp lib="0" loc="(970,480)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="l3"/>
</comp>
<comp lib="0" loc="(340,380)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="lhit"/>
</comp>
<comp lib="0" loc="(60,180)" name="Pin">
<a name="label" val="L1"/>
</comp>
<comp lib="0" loc="(1140,400)" name="Splitter">
<a name="facing" val="west"/>
<a name="fanout" val="4"/>
<a name="incoming" val="4"/>
<a name="bit0" val="3"/>
<a name="bit1" val="2"/>
<a name="bit2" val="1"/>
<a name="bit3" val="0"/>
</comp>
<comp lib="0" loc="(60,260)" name="Pin">
<a name="label" val="L3"/>
</comp>
<comp lib="0" loc="(60,220)" name="Pin">
<a name="label" val="L2"/>
</comp>
<comp lib="0" loc="(360,340)" name="Pin">
<a name="label" val="RST"/>
</comp>
<comp lib="10" loc="(400,280)" name="FSM Entity">
<a name="content">state_machine example @[73,58,800,500]{&#13;
in Lhit[1] @[73,303,26,15];ACK[1] @[73,349,30,15];&#13;
out MEM[1] @[841,194,32,15];REQ[1] @[841,280,32,15];C[4] @[835,352,38,15];&#13;
codeWidth = 4;&#13;
reset = BIGBANG;&#13;
&#13;
state C0["0000"]:&#13;
@[210,125,30,30]&#13;
set C="0001"; @[210,125,30,30] &#13;
goto C1 when (/Lhit) @[316,166,37,22]; &#13;
goto S5 when Lhit @[209,210,26,22]; &#13;
state C1["0001"]:&#13;
@[393,151,30,30]&#13;
set C="0010"; @[393,151,30,30] &#13;
goto C2 when (/Lhit) @[503,184,37,22]; &#13;
goto S6 when Lhit @[416,226,26,22]; &#13;
state C2["0010"]:&#13;
@[572,184,30,30]&#13;
set C="0100"; @[572,184,30,30] &#13;
goto C3 when (/Lhit) @[670,199,37,22]; &#13;
goto S7 when Lhit @[584,247,26,22]; &#13;
state C3["0011"]:&#13;
@[739,181,30,30]&#13;
set C="1000"; @[739,181,30,30] &#13;
goto S8 when Lhit @[763,249,26,22]; &#13;
goto C0 when (/Lhit) @[484,95,37,22]; &#13;
state BIGBANG["0100"]:&#13;
@[70,116,30,30]&#13;
goto C0 when default @[187,109,43,22]; &#13;
state S5["0101"]:&#13;
@[195,256,30,30]&#13;
set MEM="1";C="0001"; @[195,256,30,30] &#13;
goto S9 when default @[204,327,43,22]; &#13;
state S6["0110"]:&#13;
@[413,269,30,30]&#13;
set MEM="1";C="0010"; @[413,269,30,30] &#13;
goto S10 when default @[431,323,43,22]; &#13;
state S7["0111"]:&#13;
@[567,287,30,30]&#13;
set MEM="1";C="0100"; @[567,287,30,30] &#13;
goto S11 when default @[582,348,43,22]; &#13;
state S8["1000"]:&#13;
@[739,292,30,30]&#13;
set MEM="1";C="1000"; @[739,292,30,30] &#13;
goto S12 when default @[755,364,43,22]; &#13;
state S9["1001"]:&#13;
@[157,357,30,30]&#13;
set REQ="1";MEM="0";C="0001"; @[157,357,30,30] &#13;
goto S13 when (ACK.(/Lhit)) @[204,442,72,22]; &#13;
state S10["1010"]:&#13;
@[419,362,30,30]&#13;
set REQ="1";MEM="0";C="0010"; @[419,362,30,30] &#13;
goto S13 when (ACK.(/Lhit)) @[326,424,72,22]; &#13;
state S11["1011"]:&#13;
@[568,389,30,30]&#13;
set REQ="1";MEM="0";C="0100"; @[568,389,30,30] &#13;
goto S13 when (ACK.(/Lhit)) @[410,444,72,22]; &#13;
state S12["1100"]:&#13;
@[746,416,30,30]&#13;
set REQ="1";MEM="0";C="1000"; @[746,416,30,30] &#13;
goto S13 when (ACK.(/Lhit)) @[500,474,72,22]; &#13;
state S13["1101"]:&#13;
@[150,488,30,30]&#13;
set REQ="0";MEM="0";C="0000"; @[150,488,30,30] &#13;
goto C0 when (/ACK) @[125,301,41,22]; &#13;
}&#13;
</a>
<a name="label" val="example_1"/>
</comp>
<comp lib="0" loc="(660,520)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="width" val="4"/>
<a name="label" val="C"/>
<a name="labelloc" val="east"/>
</comp>
<comp lib="0" loc="(250,180)" name="Tunnel">
<a name="label" val="l1"/>
</comp>
<comp lib="0" loc="(70,450)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="l1"/>
</comp>
<comp loc="(1090,400)" name="cltokey">
<a name="label" val="cltokey_1"/>
</comp>
<comp lib="0" loc="(260,360)" name="Pin">
<a name="label" val="EN"/>
</comp>
<comp lib="4" loc="(1020,210)" name="Register">
<a name="width" val="4"/>
</comp>
<comp lib="0" loc="(570,400)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="label" val="REQ"/>
<a name="labelloc" val="east"/>
</comp>
<comp lib="0" loc="(970,520)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="l1"/>
</comp>
<comp lib="0" loc="(1090,240)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="width" val="4"/>
<a name="label" val="KEY"/>
<a name="labelloc" val="east"/>
</comp>
<comp lib="0" loc="(70,500)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="l2"/>
</comp>
<comp lib="1" loc="(170,500)" name="OR Gate">
<a name="inputs" val="4"/>
</comp>
<comp lib="0" loc="(70,540)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="l3"/>
</comp>
<comp lib="0" loc="(250,140)" name="Tunnel">
<a name="label" val="l0"/>
</comp>
<comp lib="0" loc="(1010,500)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="l2"/>
</comp>
<comp lib="0" loc="(330,320)" name="Pin">
<a name="label" val="CLK"/>
</comp>
<comp lib="0" loc="(70,400)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="l0"/>
</comp>
<comp lib="0" loc="(250,220)" name="Tunnel">
<a name="label" val="l2"/>
</comp>
<comp lib="0" loc="(170,500)" name="Tunnel">
<a name="label" val="lhit"/>
</comp>
<comp lib="0" loc="(900,440)" name="Splitter">
<a name="fanout" val="4"/>
<a name="incoming" val="4"/>
<a name="bit0" val="3"/>
<a name="bit1" val="2"/>
<a name="bit2" val="1"/>
<a name="bit3" val="0"/>
</comp>
<comp lib="0" loc="(250,260)" name="Tunnel">
<a name="label" val="l3"/>
</comp>
</circuit>
<circuit name="main">
<a name="circuit" val="main"/>
<a name="clabel" val=""/>
<a name="clabelup" val="east"/>
<a name="clabelfont" val="SansSerif bold 16"/>
<a name="circuitnamedbox" val="true"/>
<a name="circuitvhdlpath" val=""/>
</circuit>
<circuit name="test_keypad_decoder">
<a name="circuit" val="test_keypad_decoder"/>
<a name="clabel" val=""/>
<a name="clabelup" val="east"/>
<a name="clabelfont" val="SansSerif bold 16"/>
<a name="circuitnamedbox" val="true"/>
<a name="circuitvhdlpath" val=""/>
<wire from="(820,170)" to="(820,370)"/>
<wire from="(250,380)" to="(310,380)"/>
<wire from="(170,250)" to="(170,260)"/>
<wire from="(450,370)" to="(820,370)"/>
<wire from="(490,300)" to="(670,300)"/>
<wire from="(160,210)" to="(210,210)"/>
<wire from="(250,350)" to="(300,350)"/>
<wire from="(350,270)" to="(350,280)"/>
<wire from="(270,270)" to="(270,290)"/>
<wire from="(290,300)" to="(290,320)"/>
<wire from="(310,340)" to="(310,360)"/>
<wire from="(310,360)" to="(310,380)"/>
<wire from="(460,320)" to="(630,320)"/>
<wire from="(490,280)" to="(490,300)"/>
<wire from="(460,300)" to="(460,320)"/>
<wire from="(170,170)" to="(170,190)"/>
<wire from="(300,320)" to="(300,350)"/>
<wire from="(250,320)" to="(290,320)"/>
<wire from="(310,340)" to="(350,340)"/>
<wire from="(310,300)" to="(350,300)"/>
<wire from="(310,320)" to="(350,320)"/>
<wire from="(700,260)" to="(700,280)"/>
<wire from="(450,280)" to="(490,280)"/>
<wire from="(760,260)" to="(760,280)"/>
<wire from="(290,300)" to="(310,300)"/>
<wire from="(150,210)" to="(150,250)"/>
<wire from="(150,250)" to="(170,250)"/>
<wire from="(250,290)" to="(270,290)"/>
<wire from="(140,210)" to="(140,260)"/>
<wire from="(450,300)" to="(460,300)"/>
<wire from="(210,210)" to="(210,260)"/>
<wire from="(300,320)" to="(310,320)"/>
<wire from="(120,210)" to="(120,260)"/>
<wire from="(140,260)" to="(150,260)"/>
<wire from="(170,260)" to="(180,260)"/>
<wire from="(270,270)" to="(350,270)"/>
<wire from="(170,170)" to="(820,170)"/>
<wire from="(450,320)" to="(450,370)"/>
<wire from="(120,210)" to="(130,210)"/>
<comp lib="5" loc="(90,260)" name="KeyPad">
<a name="label" val="KeyPad_1"/>
</comp>
<comp lib="0" loc="(350,380)" name="Pin">
<a name="label" val="rst"/>
</comp>
<comp lib="9" loc="(690,180)" name="BCD_to_7_Segment_decoder"/>
<comp lib="0" loc="(170,190)" name="Splitter">
<a name="facing" val="south"/>
<a name="fanout" val="4"/>
<a name="incoming" val="4"/>
<a name="appear" val="right"/>
<a name="bit0" val="3"/>
<a name="bit1" val="2"/>
<a name="bit2" val="1"/>
<a name="bit3" val="0"/>
</comp>
<comp lib="5" loc="(690,180)" name="7-Segment Display">
<a name="label" val="L_7_Segment_Display_1"/>
</comp>
<comp lib="0" loc="(350,360)" name="Clock"/>
<comp lib="0" loc="(350,400)" name="Pin">
<a name="label" val="en"/>
</comp>
<comp lib="9" loc="(750,180)" name="BCD_to_7_Segment_decoder"/>
<comp lib="9" loc="(700,300)" name="Binary_to_BCD_converter">
<a name="binvalue" val="4"/>
</comp>
<comp lib="0" loc="(630,320)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="label" val="Output_1"/>
<a name="labelloc" val="east"/>
</comp>
<comp lib="5" loc="(750,180)" name="7-Segment Display">
<a name="label" val="L_7_Segment_Display_2"/>
</comp>
<comp loc="(450,280)" name="keypad_decoder">
<a name="label" val="machin_1"/>
</comp>
<comp lib="0" loc="(350,420)" name="Pin">
<a name="label" val="ack"/>
</comp>
</circuit>
<circuit name="cltokey">
<a name="circuit" val="cltokey"/>
<a name="clabel" val=""/>
<a name="clabelup" val="east"/>
<a name="clabelfont" val="SansSerif bold 16"/>
<a name="circuitnamedbox" val="true"/>
<a name="circuitvhdlpath" val=""/>
<wire from="(350,380)" to="(350,450)"/>
<wire from="(100,130)" to="(100,200)"/>
<wire from="(100,200)" to="(220,200)"/>
<wire from="(330,90)" to="(330,110)"/>
<wire from="(180,550)" to="(220,550)"/>
<wire from="(240,650)" to="(280,650)"/>
<wire from="(100,490)" to="(100,580)"/>
<wire from="(120,230)" to="(120,320)"/>
<wire from="(310,80)" to="(350,80)"/>
<wire from="(40,240)" to="(140,240)"/>
<wire from="(380,590)" to="(420,590)"/>
<wire from="(40,390)" to="(200,390)"/>
<wire from="(80,80)" to="(80,630)"/>
<wire from="(270,140)" to="(290,140)"/>
<wire from="(270,220)" to="(290,220)"/>
<wire from="(270,260)" to="(290,260)"/>
<wire from="(260,530)" to="(280,530)"/>
<wire from="(350,340)" to="(370,340)"/>
<wire from="(350,380)" to="(370,380)"/>
<wire from="(330,600)" to="(350,600)"/>
<wire from="(40,30)" to="(60,30)"/>
<wire from="(240,550)" to="(260,550)"/>
<wire from="(140,520)" to="(220,520)"/>
<wire from="(160,460)" to="(290,460)"/>
<wire from="(100,400)" to="(230,400)"/>
<wire from="(160,160)" to="(220,160)"/>
<wire from="(100,490)" to="(220,490)"/>
<wire from="(100,200)" to="(100,400)"/>
<wire from="(270,120)" to="(270,140)"/>
<wire from="(270,160)" to="(270,180)"/>
<wire from="(270,200)" to="(270,220)"/>
<wire from="(120,320)" to="(230,320)"/>
<wire from="(140,90)" to="(140,240)"/>
<wire from="(60,370)" to="(230,370)"/>
<wire from="(240,20)" to="(280,20)"/>
<wire from="(250,150)" to="(290,150)"/>
<wire from="(380,80)" to="(420,80)"/>
<wire from="(180,120)" to="(180,340)"/>
<wire from="(180,120)" to="(270,120)"/>
<wire from="(200,340)" to="(290,340)"/>
<wire from="(260,250)" to="(290,250)"/>
<wire from="(140,420)" to="(140,520)"/>
<wire from="(340,370)" to="(370,370)"/>
<wire from="(310,30)" to="(330,30)"/>
<wire from="(270,390)" to="(290,390)"/>
<wire from="(330,90)" to="(350,90)"/>
<wire from="(320,400)" to="(340,400)"/>
<wire from="(400,360)" to="(420,360)"/>
<wire from="(60,180)" to="(270,180)"/>
<wire from="(250,370)" to="(270,370)"/>
<wire from="(40,190)" to="(120,190)"/>
<wire from="(180,550)" to="(180,600)"/>
<wire from="(40,340)" to="(180,340)"/>
<wire from="(120,320)" to="(120,440)"/>
<wire from="(160,40)" to="(160,160)"/>
<wire from="(100,70)" to="(100,130)"/>
<wire from="(160,160)" to="(160,290)"/>
<wire from="(40,130)" to="(100,130)"/>
<wire from="(160,290)" to="(220,290)"/>
<wire from="(60,110)" to="(60,180)"/>
<wire from="(160,40)" to="(280,40)"/>
<wire from="(270,410)" to="(270,420)"/>
<wire from="(270,370)" to="(270,390)"/>
<wire from="(60,30)" to="(60,110)"/>
<wire from="(120,440)" to="(290,440)"/>
<wire from="(140,240)" to="(140,260)"/>
<wire from="(240,70)" to="(280,70)"/>
<wire from="(250,320)" to="(290,320)"/>
<wire from="(250,400)" to="(290,400)"/>
<wire from="(180,650)" to="(220,650)"/>
<wire from="(120,20)" to="(220,20)"/>
<wire from="(120,140)" to="(220,140)"/>
<wire from="(180,600)" to="(280,600)"/>
<wire from="(350,240)" to="(350,340)"/>
<wire from="(240,200)" to="(270,200)"/>
<wire from="(140,260)" to="(140,420)"/>
<wire from="(320,240)" to="(350,240)"/>
<wire from="(270,160)" to="(290,160)"/>
<wire from="(310,520)" to="(330,520)"/>
<wire from="(260,510)" to="(280,510)"/>
<wire from="(320,330)" to="(340,330)"/>
<wire from="(330,580)" to="(350,580)"/>
<wire from="(310,640)" to="(330,640)"/>
<wire from="(330,30)" to="(330,70)"/>
<wire from="(240,490)" to="(260,490)"/>
<wire from="(180,600)" to="(180,650)"/>
<wire from="(200,340)" to="(200,390)"/>
<wire from="(140,260)" to="(220,260)"/>
<wire from="(120,140)" to="(120,190)"/>
<wire from="(140,90)" to="(280,90)"/>
<wire from="(140,420)" to="(270,420)"/>
<wire from="(60,180)" to="(60,370)"/>
<wire from="(40,290)" to="(160,290)"/>
<wire from="(100,70)" to="(220,70)"/>
<wire from="(240,230)" to="(290,230)"/>
<wire from="(100,580)" to="(280,580)"/>
<wire from="(260,250)" to="(260,260)"/>
<wire from="(260,490)" to="(260,510)"/>
<wire from="(260,530)" to="(260,550)"/>
<wire from="(180,340)" to="(180,550)"/>
<wire from="(340,330)" to="(340,350)"/>
<wire from="(320,150)" to="(420,150)"/>
<wire from="(40,80)" to="(80,80)"/>
<wire from="(270,260)" to="(270,290)"/>
<wire from="(340,370)" to="(340,400)"/>
<wire from="(240,520)" to="(280,520)"/>
<wire from="(100,400)" to="(100,490)"/>
<wire from="(310,590)" to="(350,590)"/>
<wire from="(120,230)" to="(220,230)"/>
<wire from="(240,290)" to="(270,290)"/>
<wire from="(340,350)" to="(370,350)"/>
<wire from="(320,450)" to="(350,450)"/>
<wire from="(270,410)" to="(290,410)"/>
<wire from="(160,290)" to="(160,460)"/>
<wire from="(330,70)" to="(350,70)"/>
<wire from="(120,190)" to="(120,230)"/>
<wire from="(330,600)" to="(330,640)"/>
<wire from="(240,260)" to="(260,260)"/>
<wire from="(60,110)" to="(330,110)"/>
<wire from="(330,520)" to="(330,580)"/>
<wire from="(80,630)" to="(280,630)"/>
<wire from="(120,20)" to="(120,140)"/>
<comp lib="1" loc="(320,400)" name="AND Gate">
<a name="size" val="30"/>
<a name="inputs" val="3"/>
</comp>
<comp lib="1" loc="(310,640)" name="AND Gate">
<a name="size" val="30"/>
</comp>
<comp lib="1" loc="(380,590)" name="OR Gate">
<a name="size" val="30"/>
<a name="inputs" val="3"/>
</comp>
<comp lib="0" loc="(40,390)" name="Pin">
<a name="label" val="L0"/>
<a name="labelloc" val="north"/>
</comp>
<comp lib="0" loc="(40,290)" name="Pin">
<a name="label" val="L2"/>
<a name="labelloc" val="north"/>
</comp>
<comp lib="1" loc="(400,360)" name="OR Gate">
<a name="size" val="30"/>
<a name="inputs" val="4"/>
</comp>
<comp lib="1" loc="(240,550)" name="NOT Gate">
<a name="size" val="20"/>
</comp>
<comp lib="1" loc="(320,240)" name="AND Gate">
<a name="size" val="30"/>
<a name="inputs" val="4"/>
</comp>
<comp lib="1" loc="(320,450)" name="AND Gate">
<a name="size" val="30"/>
</comp>
<comp lib="1" loc="(250,150)" name="AND Gate">
<a name="size" val="30"/>
</comp>
<comp lib="1" loc="(250,320)" name="NOT Gate">
<a name="size" val="20"/>
</comp>
<comp lib="1" loc="(240,70)" name="NOT Gate">
<a name="size" val="20"/>
</comp>
<comp lib="0" loc="(420,360)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="label" val="K1"/>
<a name="labelloc" val="north"/>
</comp>
<comp lib="0" loc="(420,150)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="label" val="K2"/>
<a name="labelloc" val="north"/>
</comp>
<comp lib="1" loc="(310,590)" name="AND Gate">
<a name="size" val="30"/>
</comp>
<comp lib="0" loc="(40,130)" name="Pin">
<a name="label" val="C1"/>
<a name="labelloc" val="north"/>
</comp>
<comp lib="1" loc="(250,400)" name="NOT Gate">
<a name="size" val="20"/>
</comp>
<comp lib="0" loc="(40,30)" name="Pin">
<a name="label" val="C3"/>
<a name="labelloc" val="north"/>
</comp>
<comp lib="0" loc="(40,340)" name="Pin">
<a name="label" val="L1"/>
<a name="labelloc" val="north"/>
</comp>
<comp lib="0" loc="(40,80)" name="Pin">
<a name="label" val="C2"/>
<a name="labelloc" val="north"/>
</comp>
<comp lib="1" loc="(240,490)" name="NOT Gate">
<a name="size" val="20"/>
</comp>
<comp lib="1" loc="(240,20)" name="NOT Gate">
<a name="size" val="20"/>
</comp>
<comp lib="1" loc="(310,30)" name="AND Gate">
<a name="size" val="30"/>
</comp>
<comp lib="1" loc="(240,520)" name="NOT Gate">
<a name="size" val="20"/>
</comp>
<comp lib="1" loc="(240,290)" name="NOT Gate">
<a name="size" val="20"/>
</comp>
<comp lib="1" loc="(310,80)" name="AND Gate">
<a name="size" val="30"/>
</comp>
<comp lib="1" loc="(240,650)" name="NOT Gate">
<a name="size" val="20"/>
</comp>
<comp lib="0" loc="(420,590)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="label" val="K0"/>
<a name="labelloc" val="north"/>
</comp>
<comp lib="0" loc="(420,80)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="label" val="K3"/>
<a name="labelloc" val="north"/>
</comp>
<comp lib="1" loc="(320,150)" name="OR Gate">
<a name="size" val="30"/>
<a name="inputs" val="3"/>
</comp>
<comp lib="0" loc="(40,190)" name="Pin">
<a name="label" val="C0"/>
<a name="labelloc" val="north"/>
</comp>
<comp lib="1" loc="(250,370)" name="NOT Gate">
<a name="size" val="20"/>
</comp>
<comp lib="1" loc="(320,330)" name="AND Gate">
<a name="size" val="30"/>
</comp>
<comp lib="1" loc="(240,260)" name="NOT Gate">
<a name="size" val="20"/>
</comp>
<comp lib="1" loc="(240,230)" name="NOT Gate">
<a name="size" val="20"/>
</comp>
<comp lib="1" loc="(380,80)" name="OR Gate">
<a name="size" val="30"/>
<a name="inputs" val="3"/>
</comp>
<comp lib="0" loc="(40,240)" name="Pin">
<a name="label" val="l3"/>
<a name="labelloc" val="north"/>
</comp>
<comp lib="1" loc="(240,200)" name="NOT Gate">
<a name="size" val="20"/>
</comp>
<comp lib="1" loc="(310,520)" name="AND Gate">
<a name="size" val="30"/>
<a name="inputs" val="3"/>
</comp>
</circuit>
</project>