2025SPR-COaA-Solution/实验二、组合逻辑部件设计/lab2.3.circ
2025-04-21 08:28:23 +00:00

458 lines
17 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project source="2.16.1.3.jar" version="1.0">
This file is intended to be loaded by Logisim http://logisim.altervista.org
<lib desc="#Wiring" name="0">
<tool name="Splitter">
<a name="facing" val="west"/>
<a name="appear" val="center"/>
</tool>
<tool name="Pin">
<a name="facing" val="north"/>
<a name="labelfont" val="Dialog plain 12"/>
</tool>
<tool name="Probe">
<a name="facing" val="west"/>
<a name="radix" val="10signed"/>
<a name="labelfont" val="Dialog plain 12"/>
</tool>
<tool name="Tunnel">
<a name="width" val="32"/>
<a name="labelfont" val="Dialog plain 12"/>
</tool>
<tool name="Pull Resistor">
<a name="facing" val="north"/>
</tool>
<tool name="Clock">
<a name="facing" val="north"/>
<a name="labelfont" val="Dialog plain 12"/>
</tool>
<tool name="ProgrammableGenerator">
<a name="labelfont" val="Dialog plain 12"/>
</tool>
<tool name="Constant">
<a name="value" val="0x0"/>
</tool>
</lib>
<lib desc="#Gates" name="1">
<tool name="OR Gate">
<a name="inputs" val="3"/>
</tool>
</lib>
<lib desc="#TTL" name="2"/>
<lib desc="#Plexers" name="3">
<tool name="Multiplexer">
<a name="enable" val="false"/>
</tool>
<tool name="Demultiplexer">
<a name="enable" val="false"/>
</tool>
<tool name="Decoder">
<a name="enable" val="false"/>
</tool>
<tool name="BitSelector">
<a name="selloc" val="tr"/>
<a name="width" val="4"/>
</tool>
</lib>
<lib desc="#Arithmetic" name="4"/>
<lib desc="#Memory" name="5">
<tool name="ROM">
<a name="contents">addr/data: 8 8
0
</a>
</tool>
</lib>
<lib desc="#I/O" name="6"/>
<lib desc="#Base" name="7">
<tool name="Text Tool">
<a name="text" val=""/>
<a name="font" val="Dialog plain 12"/>
<a name="color" val="#000000"/>
<a name="halign" val="center"/>
<a name="valign" val="base"/>
</tool>
</lib>
<main name="main"/>
<options>
<a name="gateUndefined" val="ignore"/>
<a name="simlimit" val="1000"/>
<a name="simrand" val="0"/>
</options>
<mappings>
<tool lib="7" map="Button2" name="Poke Tool"/>
<tool lib="7" map="Button3" name="Menu Tool"/>
<tool lib="7" map="Ctrl Button1" name="Menu Tool"/>
</mappings>
<toolbar>
<tool lib="7" name="Poke Tool"/>
<tool lib="7" name="Edit Tool"/>
<sep/>
<tool lib="7" name="Text Tool">
<a name="text" val=""/>
<a name="font" val="Dialog plain 12"/>
<a name="color" val="#000000"/>
<a name="halign" val="center"/>
<a name="valign" val="base"/>
</tool>
<tool lib="0" name="Pin">
<a name="tristate" val="false"/>
</tool>
<tool lib="0" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
</tool>
<tool lib="1" name="NOT Gate"/>
<tool lib="1" name="AND Gate"/>
<tool lib="1" name="OR Gate"/>
</toolbar>
<circuit name="main">
<a name="circuit" val="main"/>
<a name="clabel" val=""/>
<a name="clabelup" val="east"/>
<a name="clabelfont" val="Dialog plain 12"/>
<a name="clabelcolor" val="#000000"/>
<appear>
<polyline fill="none" points="60,40 60,60" stroke="#000000"/>
<polyline fill="none" points="60,90 60,110" stroke="#000000"/>
<polyline fill="none" points="100,60 100,90" stroke="#000000"/>
<polyline fill="none" points="80,70 80,80" stroke="#000000"/>
<polyline fill="none" points="60,60 80,70" stroke="#000000"/>
<polyline fill="none" points="60,40 100,60" stroke="#000000"/>
<polyline fill="none" points="60,90 80,80" stroke="#000000"/>
<polyline fill="none" points="60,110 100,90" stroke="#000000"/>
<text font-family="Dialog" font-size="8" text-anchor="start" x="66" y="51">X</text>
<text font-family="Dialog" font-size="8" text-anchor="start" x="66" y="102">Y</text>
<text font-family="Dialog" font-size="8" text-anchor="start" x="74" y="90">Cin</text>
<text font-family="Dialog" font-size="8" text-anchor="start" x="86" y="73">S</text>
<text font-family="Dialog" font-size="6" text-anchor="start" x="83" y="82">Cout</text>
<circ-port height="8" pin="120,30" width="8" x="56" y="46"/>
<circ-port height="8" pin="260,30" width="8" x="56" y="96"/>
<circ-port height="10" pin="470,30" width="10" x="95" y="65"/>
<circ-port height="10" pin="610,30" width="10" x="95" y="75"/>
<circ-port height="8" pin="100,60" width="8" x="76" y="96"/>
<circ-anchor facing="east" height="6" width="6" x="97" y="67"/>
</appear>
<wire from="(20,10)" to="(380,10)"/>
<wire from="(470,30)" to="(500,30)"/>
<wire from="(100,60)" to="(120,60)"/>
<wire from="(120,30)" to="(140,30)"/>
<wire from="(260,30)" to="(280,30)"/>
<wire from="(610,30)" to="(650,30)"/>
<wire from="(20,80)" to="(380,80)"/>
<wire from="(380,10)" to="(380,80)"/>
<wire from="(20,10)" to="(20,80)"/>
<wire from="(20,80)" to="(20,110)"/>
<wire from="(710,10)" to="(710,80)"/>
<wire from="(380,10)" to="(710,10)"/>
<wire from="(380,80)" to="(710,80)"/>
<wire from="(710,80)" to="(710,110)"/>
<wire from="(20,110)" to="(710,110)"/>
<wire from="(200,240)" to="(200,250)"/>
<wire from="(90,250)" to="(200,250)"/>
<wire from="(90,250)" to="(90,440)"/>
<wire from="(110,260)" to="(110,550)"/>
<wire from="(90,550)" to="(110,550)"/>
<wire from="(290,240)" to="(290,260)"/>
<wire from="(110,260)" to="(290,260)"/>
<wire from="(90,440)" to="(130,440)"/>
<wire from="(110,550)" to="(130,550)"/>
<wire from="(210,340)" to="(210,420)"/>
<wire from="(150,420)" to="(210,420)"/>
<wire from="(210,340)" to="(250,340)"/>
<wire from="(330,360)" to="(340,360)"/>
<wire from="(150,430)" to="(320,430)"/>
<wire from="(320,340)" to="(320,430)"/>
<wire from="(320,340)" to="(340,340)"/>
<wire from="(290,370)" to="(310,370)"/>
<wire from="(310,370)" to="(310,380)"/>
<wire from="(310,380)" to="(340,380)"/>
<wire from="(410,340)" to="(410,440)"/>
<wire from="(150,440)" to="(410,440)"/>
<wire from="(410,340)" to="(430,340)"/>
<wire from="(420,360)" to="(430,360)"/>
<wire from="(380,370)" to="(400,370)"/>
<wire from="(400,370)" to="(400,380)"/>
<wire from="(400,380)" to="(430,380)"/>
<wire from="(150,450)" to="(500,450)"/>
<wire from="(500,340)" to="(500,450)"/>
<wire from="(500,340)" to="(520,340)"/>
<wire from="(510,360)" to="(520,360)"/>
<wire from="(470,370)" to="(490,370)"/>
<wire from="(490,370)" to="(490,380)"/>
<wire from="(490,380)" to="(520,380)"/>
<wire from="(560,370)" to="(580,370)"/>
<wire from="(310,250)" to="(310,350)"/>
<wire from="(290,350)" to="(310,350)"/>
<wire from="(380,350)" to="(400,350)"/>
<wire from="(400,260)" to="(400,350)"/>
<wire from="(310,250)" to="(600,250)"/>
<wire from="(400,260)" to="(600,260)"/>
<wire from="(490,270)" to="(490,350)"/>
<wire from="(470,350)" to="(490,350)"/>
<wire from="(490,270)" to="(600,270)"/>
<wire from="(560,350)" to="(580,350)"/>
<wire from="(580,280)" to="(580,350)"/>
<wire from="(580,280)" to="(600,280)"/>
<wire from="(620,270)" to="(650,270)"/>
<wire from="(620,270)" to="(620,300)"/>
<wire from="(380,300)" to="(620,300)"/>
<wire from="(380,240)" to="(380,300)"/>
<wire from="(120,380)" to="(120,460)"/>
<wire from="(120,380)" to="(250,380)"/>
<wire from="(100,380)" to="(120,380)"/>
<wire from="(480,460)" to="(480,490)"/>
<wire from="(390,460)" to="(390,490)"/>
<wire from="(390,460)" to="(480,460)"/>
<wire from="(300,460)" to="(300,490)"/>
<wire from="(300,460)" to="(390,460)"/>
<wire from="(190,460)" to="(190,490)"/>
<wire from="(190,460)" to="(300,460)"/>
<wire from="(120,460)" to="(190,460)"/>
<wire from="(190,510)" to="(190,530)"/>
<wire from="(150,530)" to="(190,530)"/>
<wire from="(150,540)" to="(300,540)"/>
<wire from="(300,510)" to="(300,540)"/>
<wire from="(150,550)" to="(390,550)"/>
<wire from="(390,510)" to="(390,550)"/>
<wire from="(150,560)" to="(480,560)"/>
<wire from="(480,510)" to="(480,560)"/>
<wire from="(230,360)" to="(230,500)"/>
<wire from="(230,360)" to="(250,360)"/>
<wire from="(340,400)" to="(340,500)"/>
<wire from="(330,400)" to="(340,400)"/>
<wire from="(330,360)" to="(330,400)"/>
<wire from="(430,400)" to="(430,500)"/>
<wire from="(420,400)" to="(430,400)"/>
<wire from="(420,360)" to="(420,400)"/>
<wire from="(520,400)" to="(520,500)"/>
<wire from="(510,400)" to="(520,400)"/>
<wire from="(510,360)" to="(510,400)"/>
<comp lib="0" loc="(90,550)" name="Tunnel">
<a name="width" val="4"/>
<a name="label" val="操作数y"/>
</comp>
<comp lib="7" loc="(225,66)" name="Text">
<a name="text" val="输入引脚"/>
<a name="font" val="Dialog plain 12"/>
</comp>
<comp lib="0" loc="(120,60)" name="Tunnel">
<a name="facing" val="west"/>
<a name="label" val="Cin"/>
</comp>
<comp lib="7" loc="(553,70)" name="Text">
<a name="text" val="输出引脚"/>
<a name="font" val="Dialog plain 12"/>
</comp>
<comp lib="1" loc="(340,500)" name="XOR Gate"/>
<comp lib="1" loc="(430,500)" name="XOR Gate"/>
<comp lib="6" loc="(380,240)" name="Hex Digit Display"/>
<comp lib="0" loc="(580,370)" name="Tunnel">
<a name="facing" val="west"/>
<a name="label" val="Cout"/>
</comp>
<comp lib="1" loc="(230,500)" name="XOR Gate"/>
<comp lib="0" loc="(100,380)" name="Tunnel">
<a name="label" val="Cin"/>
</comp>
<comp lib="7" loc="(400,102)" name="Text">
<a name="text" val="请勿修改引脚名称、电路名称及电路封装外观"/>
<a name="font" val="Dialog plain 12"/>
</comp>
<comp lib="7" loc="(361,137)" name="Text">
<a name="text" val="提示使用独立逻辑门及全加器FA子电路实现4位二进制数加减法器禁止直接使用加减法器组件。"/>
<a name="font" val="Dialog plain 12"/>
</comp>
<comp lib="1" loc="(520,500)" name="XOR Gate"/>
<comp lib="0" loc="(90,440)" name="Tunnel">
<a name="width" val="4"/>
<a name="label" val="操作数x"/>
</comp>
<comp loc="(380,370)" name="FA">
<a name="label" val="FA1"/>
</comp>
<comp lib="0" loc="(280,30)" name="Tunnel">
<a name="facing" val="west"/>
<a name="width" val="4"/>
<a name="label" val="操作数y"/>
</comp>
<comp lib="7" loc="(342,217)" name="Text">
<a name="text" val="="/>
<a name="font" val="Dialog bold 22"/>
</comp>
<comp lib="0" loc="(130,550)" name="Splitter">
<a name="appear" val="center"/>
</comp>
<comp loc="(560,370)" name="FA">
<a name="label" val="FA3"/>
</comp>
<comp lib="0" loc="(100,60)" name="Pin">
<a name="tristate" val="false"/>
<a name="label" val="Cin"/>
<a name="labelloc" val="west"/>
</comp>
<comp loc="(470,370)" name="FA">
<a name="label" val="FA2"/>
</comp>
<comp lib="6" loc="(290,240)" name="Hex Digit Display"/>
<comp lib="0" loc="(130,440)" name="Splitter">
<a name="appear" val="center"/>
</comp>
<comp lib="7" loc="(253,217)" name="Text">
<a name="text" val="+"/>
<a name="font" val="Dialog bold 22"/>
</comp>
<comp lib="0" loc="(650,30)" name="Tunnel">
<a name="facing" val="west"/>
<a name="label" val="Cout"/>
</comp>
<comp lib="0" loc="(140,30)" name="Tunnel">
<a name="facing" val="west"/>
<a name="width" val="4"/>
<a name="label" val="操作数x"/>
</comp>
<comp lib="0" loc="(650,270)" name="Tunnel">
<a name="facing" val="west"/>
<a name="width" val="4"/>
<a name="label" val="SUM"/>
</comp>
<comp lib="0" loc="(120,30)" name="Pin">
<a name="width" val="4"/>
<a name="tristate" val="false"/>
<a name="label" val="X"/>
<a name="labelloc" val="west"/>
</comp>
<comp lib="0" loc="(100,290)" name="Constant">
<a name="value" val="0x0"/>
</comp>
<comp loc="(290,370)" name="FA">
<a name="label" val="FA0"/>
</comp>
<comp lib="6" loc="(200,240)" name="Hex Digit Display"/>
<comp lib="0" loc="(260,30)" name="Pin">
<a name="width" val="4"/>
<a name="tristate" val="false"/>
<a name="label" val="Y"/>
<a name="labelloc" val="west"/>
</comp>
<comp lib="0" loc="(620,270)" name="Splitter">
<a name="facing" val="west"/>
<a name="appear" val="center"/>
</comp>
<comp lib="0" loc="(470,30)" name="Pin">
<a name="output" val="true"/>
<a name="width" val="4"/>
<a name="label" val="F"/>
<a name="labelloc" val="west"/>
</comp>
<comp lib="0" loc="(500,30)" name="Tunnel">
<a name="facing" val="west"/>
<a name="width" val="4"/>
<a name="label" val="SUM"/>
</comp>
<comp lib="0" loc="(610,30)" name="Pin">
<a name="output" val="true"/>
<a name="label" val="Cout"/>
<a name="labelloc" val="west"/>
</comp>
</circuit>
<circuit name="FA">
<a name="circuit" val="FA"/>
<a name="clabel" val=""/>
<a name="clabelup" val="east"/>
<a name="clabelfont" val="Dialog plain 12"/>
<a name="clabelcolor" val="#000000"/>
<appear>
<rect fill="none" height="60" stroke="#000000" width="40" x="50" y="50"/>
<text font-family="Dialog" font-size="12" text-anchor="middle" x="77" y="103">FA</text>
<text font-family="Dialog" font-size="8" text-anchor="middle" x="78" y="88">Cout</text>
<text font-family="Dialog" font-size="8" text-anchor="middle" x="82" y="68">F</text>
<text font-family="Dialog" font-size="8" text-anchor="middle" x="56" y="59">A</text>
<text font-family="Dialog" font-size="8" text-anchor="middle" x="59" y="104">Cin</text>
<text font-family="Dialog" font-size="8" text-anchor="middle" x="55" y="77">B</text>
<circ-port height="8" pin="150,230" width="8" x="46" y="56"/>
<circ-port height="8" pin="150,290" width="8" x="46" y="76"/>
<circ-port height="8" pin="150,370" width="8" x="46" y="96"/>
<circ-port height="10" pin="440,300" width="10" x="85" y="85"/>
<circ-port height="10" pin="440,190" width="10" x="85" y="65"/>
<circ-anchor facing="east" height="6" width="6" x="87" y="87"/>
</appear>
<wire from="(270,280)" to="(270,290)"/>
<wire from="(270,280)" to="(280,280)"/>
<wire from="(270,370)" to="(270,380)"/>
<wire from="(270,380)" to="(280,380)"/>
<wire from="(260,200)" to="(350,200)"/>
<wire from="(150,370)" to="(260,370)"/>
<wire from="(260,370)" to="(270,370)"/>
<wire from="(260,300)" to="(280,300)"/>
<wire from="(260,200)" to="(260,300)"/>
<wire from="(260,300)" to="(260,370)"/>
<wire from="(250,250)" to="(280,250)"/>
<wire from="(250,250)" to="(250,290)"/>
<wire from="(150,290)" to="(250,290)"/>
<wire from="(250,290)" to="(270,290)"/>
<wire from="(250,180)" to="(250,250)"/>
<wire from="(250,180)" to="(270,180)"/>
<wire from="(240,230)" to="(240,360)"/>
<wire from="(240,360)" to="(280,360)"/>
<wire from="(150,230)" to="(240,230)"/>
<wire from="(240,230)" to="(280,230)"/>
<wire from="(240,160)" to="(270,160)"/>
<wire from="(240,160)" to="(240,230)"/>
<wire from="(310,170)" to="(330,170)"/>
<wire from="(330,170)" to="(330,180)"/>
<wire from="(330,180)" to="(350,180)"/>
<wire from="(390,190)" to="(440,190)"/>
<wire from="(360,240)" to="(360,290)"/>
<wire from="(310,240)" to="(360,240)"/>
<wire from="(360,290)" to="(380,290)"/>
<wire from="(310,290)" to="(350,290)"/>
<wire from="(350,290)" to="(350,300)"/>
<wire from="(350,300)" to="(380,300)"/>
<wire from="(360,310)" to="(360,370)"/>
<wire from="(310,370)" to="(360,370)"/>
<wire from="(360,310)" to="(380,310)"/>
<wire from="(410,300)" to="(440,300)"/>
<comp lib="7" loc="(275,412)" name="Text">
<a name="text" val="全加器"/>
<a name="font" val="Dialog bold 16"/>
</comp>
<comp lib="0" loc="(440,190)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="label" val="F"/>
<a name="labelloc" val="east"/>
</comp>
<comp lib="0" loc="(150,370)" name="Pin">
<a name="tristate" val="false"/>
<a name="label" val="Cin"/>
<a name="labelloc" val="west"/>
</comp>
<comp lib="1" loc="(410,300)" name="OR Gate">
<a name="inputs" val="3"/>
</comp>
<comp lib="1" loc="(310,290)" name="AND Gate"/>
<comp lib="1" loc="(390,190)" name="XOR Gate"/>
<comp lib="0" loc="(440,300)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="label" val="Cout"/>
<a name="labelloc" val="east"/>
</comp>
<comp lib="7" loc="(171,465)" name="Text">
<a name="font" val="Dialog bold 16"/>
</comp>
<comp lib="1" loc="(310,170)" name="XOR Gate"/>
<comp lib="0" loc="(150,290)" name="Pin">
<a name="tristate" val="false"/>
<a name="label" val="B"/>
<a name="labelloc" val="west"/>
</comp>
<comp lib="0" loc="(150,230)" name="Pin">
<a name="tristate" val="false"/>
<a name="label" val="A"/>
<a name="labelloc" val="west"/>
</comp>
<comp lib="1" loc="(310,370)" name="AND Gate"/>
<comp lib="1" loc="(310,240)" name="AND Gate"/>
</circuit>
</project>