HW8: done ex2

This commit is contained in:
Claudio Maggioni 2018-11-25 21:35:25 +01:00
parent a19aa555ad
commit bc4f34a8e8
1 changed files with 358 additions and 0 deletions

358
Homework 8/ex2.circ Normal file
View File

@ -0,0 +1,358 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project source="2.7.1" version="1.0">
This file is intended to be loaded by Logisim (http://www.cburch.com/logisim/).
<lib desc="#Wiring" name="0"/>
<lib desc="#Gates" name="1"/>
<lib desc="#Plexers" name="2"/>
<lib desc="#Arithmetic" name="3"/>
<lib desc="#Memory" name="4">
<tool name="ROM">
<a name="contents">addr/data: 8 8
0
</a>
</tool>
</lib>
<lib desc="#I/O" name="5"/>
<lib desc="#Base" name="6">
<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>
<main name="MBR"/>
<options>
<a name="gateUndefined" val="ignore"/>
<a name="simlimit" val="1000"/>
<a name="simrand" val="0"/>
</options>
<mappings>
<tool lib="6" map="Button2" name="Menu Tool"/>
<tool lib="6" map="Button3" name="Menu Tool"/>
<tool lib="6" map="Ctrl Button1" name="Menu Tool"/>
</mappings>
<toolbar>
<tool lib="6" name="Poke Tool"/>
<tool lib="6" name="Edit Tool"/>
<tool lib="6" 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">
<a name="tristate" val="false"/>
</tool>
<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="SP">
<a name="circuit" val="SP"/>
<a name="clabel" val=""/>
<a name="clabelup" val="east"/>
<a name="clabelfont" val="SansSerif plain 12"/>
<appear>
<path d="M556,251 Q560,261 564,251" fill="none" stroke="#808080" stroke-width="2"/>
<rect fill="none" height="81" stroke="#000000" stroke-width="2" width="41" x="540" y="250"/>
<text font-family="SansSerif" font-size="12" text-anchor="middle" x="505" y="263">C bus in</text>
<text font-family="SansSerif" font-size="12" text-anchor="middle" x="620" y="264">B bus out</text>
<text font-family="SansSerif" font-size="12" text-anchor="middle" x="561" y="354">CK</text>
<text font-family="SansSerif" font-size="12" text-anchor="middle" x="515" y="307">C en</text>
<text font-family="SansSerif" font-size="12" text-anchor="middle" x="603" y="305">B en</text>
<circ-port height="8" pin="500,190" width="8" x="536" y="256"/>
<circ-port height="10" pin="630,190" width="10" x="575" y="255"/>
<circ-port height="8" pin="510,350" width="8" x="536" y="296"/>
<circ-port height="8" pin="560,350" width="8" x="556" y="326"/>
<circ-port height="8" pin="610,350" width="8" x="576" y="296"/>
<circ-anchor facing="east" height="6" width="6" x="577" y="257"/>
</appear>
<wire from="(610,170)" to="(610,180)"/>
<wire from="(610,250)" to="(650,250)"/>
<wire from="(560,210)" to="(560,350)"/>
<wire from="(900,130)" to="(900,250)"/>
<wire from="(610,130)" to="(610,170)"/>
<wire from="(610,130)" to="(900,130)"/>
<wire from="(510,200)" to="(550,200)"/>
<wire from="(510,200)" to="(510,350)"/>
<wire from="(580,190)" to="(590,190)"/>
<wire from="(610,250)" to="(610,350)"/>
<wire from="(500,190)" to="(550,190)"/>
<wire from="(570,210)" to="(570,240)"/>
<wire from="(610,210)" to="(610,250)"/>
<wire from="(670,250)" to="(900,250)"/>
<comp lib="4" loc="(580,190)" name="Register">
<a name="width" val="32"/>
</comp>
<comp lib="0" loc="(560,350)" name="Pin">
<a name="facing" val="north"/>
<a name="tristate" val="false"/>
</comp>
<comp lib="6" loc="(484,389)" name="Text">
<a name="text" val="C Bus enable"/>
</comp>
<comp lib="6" loc="(801,194)" name="Text">
<a name="text" val="B bus output (open collector)"/>
</comp>
<comp lib="0" loc="(510,350)" name="Pin">
<a name="facing" val="north"/>
<a name="tristate" val="false"/>
</comp>
<comp lib="6" loc="(560,388)" name="Text">
<a name="text" val="Clock"/>
</comp>
<comp lib="6" loc="(379,194)" name="Text">
<a name="text" val="C Bus input"/>
</comp>
<comp lib="0" loc="(570,240)" name="Constant">
<a name="facing" val="north"/>
<a name="value" val="0x0"/>
</comp>
<comp lib="1" loc="(670,250)" name="NOT Gate">
<a name="size" val="20"/>
</comp>
<comp lib="0" loc="(610,350)" name="Pin">
<a name="facing" val="north"/>
<a name="tristate" val="false"/>
</comp>
<comp lib="0" loc="(630,190)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="width" val="32"/>
<a name="labelloc" val="east"/>
</comp>
<comp lib="0" loc="(630,190)" name="Transmission Gate">
<a name="width" val="32"/>
</comp>
<comp lib="0" loc="(500,190)" name="Pin">
<a name="width" val="32"/>
<a name="tristate" val="false"/>
</comp>
<comp lib="6" loc="(635,389)" name="Text">
<a name="text" val="B bus enable"/>
</comp>
</circuit>
<circuit name="MBR">
<a name="circuit" val="MBR"/>
<a name="clabel" val=""/>
<a name="clabelup" val="east"/>
<a name="clabelfont" val="SansSerif plain 12"/>
<wire from="(600,360)" to="(760,360)"/>
<wire from="(760,50)" to="(760,60)"/>
<wire from="(470,460)" to="(500,460)"/>
<wire from="(650,710)" to="(650,720)"/>
<wire from="(600,330)" to="(760,330)"/>
<wire from="(750,700)" to="(750,710)"/>
<wire from="(630,640)" to="(880,640)"/>
<wire from="(600,270)" to="(760,270)"/>
<wire from="(600,420)" to="(760,420)"/>
<wire from="(740,520)" to="(740,660)"/>
<wire from="(580,790)" to="(590,790)"/>
<wire from="(780,50)" to="(900,50)"/>
<wire from="(600,240)" to="(660,240)"/>
<wire from="(720,520)" to="(740,520)"/>
<wire from="(630,520)" to="(630,640)"/>
<wire from="(600,210)" to="(760,210)"/>
<wire from="(630,660)" to="(640,660)"/>
<wire from="(660,50)" to="(760,50)"/>
<wire from="(780,50)" to="(780,60)"/>
<wire from="(600,170)" to="(760,170)"/>
<wire from="(660,50)" to="(660,240)"/>
<wire from="(600,390)" to="(760,390)"/>
<wire from="(860,710)" to="(860,800)"/>
<wire from="(600,460)" to="(760,460)"/>
<wire from="(740,660)" to="(890,660)"/>
<wire from="(600,380)" to="(760,380)"/>
<wire from="(600,410)" to="(760,410)"/>
<wire from="(860,710)" to="(880,710)"/>
<wire from="(630,710)" to="(630,780)"/>
<wire from="(880,140)" to="(880,640)"/>
<wire from="(600,440)" to="(760,440)"/>
<wire from="(660,240)" to="(660,600)"/>
<wire from="(660,660)" to="(740,660)"/>
<wire from="(270,580)" to="(540,580)"/>
<wire from="(560,530)" to="(580,530)"/>
<wire from="(600,300)" to="(760,300)"/>
<wire from="(400,450)" to="(500,450)"/>
<wire from="(600,190)" to="(760,190)"/>
<wire from="(460,470)" to="(470,470)"/>
<wire from="(700,240)" to="(760,240)"/>
<wire from="(600,220)" to="(760,220)"/>
<wire from="(710,710)" to="(730,710)"/>
<wire from="(560,490)" to="(580,490)"/>
<wire from="(710,590)" to="(710,710)"/>
<wire from="(470,470)" to="(470,480)"/>
<wire from="(600,250)" to="(760,250)"/>
<wire from="(600,470)" to="(760,470)"/>
<wire from="(700,540)" to="(700,560)"/>
<wire from="(600,310)" to="(760,310)"/>
<wire from="(700,480)" to="(700,500)"/>
<wire from="(720,100)" to="(890,100)"/>
<wire from="(740,660)" to="(740,670)"/>
<wire from="(400,450)" to="(400,480)"/>
<wire from="(540,560)" to="(540,580)"/>
<wire from="(900,50)" to="(900,710)"/>
<wire from="(600,350)" to="(760,350)"/>
<wire from="(660,600)" to="(690,600)"/>
<wire from="(600,320)" to="(760,320)"/>
<wire from="(600,280)" to="(760,280)"/>
<wire from="(890,100)" to="(890,660)"/>
<wire from="(470,470)" to="(500,470)"/>
<wire from="(330,480)" to="(400,480)"/>
<wire from="(750,710)" to="(860,710)"/>
<wire from="(720,140)" to="(880,140)"/>
<wire from="(600,260)" to="(760,260)"/>
<wire from="(600,430)" to="(760,430)"/>
<wire from="(600,230)" to="(760,230)"/>
<wire from="(690,590)" to="(690,600)"/>
<wire from="(880,710)" to="(880,720)"/>
<wire from="(580,530)" to="(580,790)"/>
<wire from="(630,640)" to="(630,660)"/>
<wire from="(470,480)" to="(500,480)"/>
<wire from="(600,200)" to="(760,200)"/>
<wire from="(600,180)" to="(760,180)"/>
<wire from="(700,480)" to="(760,480)"/>
<wire from="(700,120)" to="(700,240)"/>
<wire from="(470,530)" to="(520,530)"/>
<wire from="(650,710)" to="(710,710)"/>
<wire from="(780,490)" to="(790,490)"/>
<wire from="(600,290)" to="(760,290)"/>
<wire from="(600,400)" to="(760,400)"/>
<wire from="(740,120)" to="(770,120)"/>
<wire from="(880,710)" to="(900,710)"/>
<wire from="(630,710)" to="(650,710)"/>
<wire from="(600,450)" to="(760,450)"/>
<wire from="(600,340)" to="(760,340)"/>
<wire from="(770,90)" to="(770,120)"/>
<wire from="(620,800)" to="(860,800)"/>
<wire from="(470,460)" to="(470,470)"/>
<wire from="(730,700)" to="(730,710)"/>
<wire from="(600,370)" to="(760,370)"/>
<wire from="(620,780)" to="(630,780)"/>
<wire from="(630,520)" to="(680,520)"/>
<comp lib="1" loc="(700,560)" name="AND Gate">
<a name="facing" val="north"/>
<a name="size" val="30"/>
<a name="inputs" val="2"/>
</comp>
<comp loc="(560,490)" name="SP"/>
<comp lib="0" loc="(520,490)" name="Splitter">
<a name="facing" val="west"/>
<a name="fanout" val="4"/>
<a name="incoming" val="32"/>
<a name="appear" val="right"/>
<a name="bit1" val="0"/>
<a name="bit2" val="0"/>
<a name="bit3" val="0"/>
<a name="bit4" val="0"/>
<a name="bit5" val="0"/>
<a name="bit6" val="0"/>
<a name="bit7" val="0"/>
<a name="bit8" val="1"/>
<a name="bit9" val="1"/>
<a name="bit10" val="1"/>
<a name="bit11" val="1"/>
<a name="bit12" val="1"/>
<a name="bit13" val="1"/>
<a name="bit14" val="1"/>
<a name="bit15" val="1"/>
<a name="bit16" val="2"/>
<a name="bit17" val="2"/>
<a name="bit18" val="2"/>
<a name="bit19" val="2"/>
<a name="bit20" val="2"/>
<a name="bit21" val="2"/>
<a name="bit22" val="2"/>
<a name="bit23" val="2"/>
<a name="bit24" val="3"/>
<a name="bit25" val="3"/>
<a name="bit26" val="3"/>
<a name="bit27" val="3"/>
<a name="bit28" val="3"/>
<a name="bit29" val="3"/>
<a name="bit30" val="3"/>
<a name="bit31" val="3"/>
</comp>
<comp lib="6" loc="(213,484)" name="Text">
<a name="text" val="Memory in"/>
</comp>
<comp lib="1" loc="(590,790)" name="OR Gate">
<a name="facing" val="west"/>
<a name="size" val="30"/>
<a name="inputs" val="2"/>
</comp>
<comp lib="0" loc="(650,720)" name="Pin">
<a name="facing" val="north"/>
<a name="tristate" val="false"/>
</comp>
<comp lib="0" loc="(580,490)" name="Splitter">
<a name="fanout" val="32"/>
<a name="incoming" val="32"/>
</comp>
<comp lib="6" loc="(883,761)" name="Text">
<a name="text" val="MBRU"/>
</comp>
<comp lib="1" loc="(770,90)" name="AND Gate">
<a name="facing" val="south"/>
<a name="size" val="30"/>
<a name="inputs" val="2"/>
</comp>
<comp lib="0" loc="(270,580)" name="Pin">
<a name="tristate" val="false"/>
</comp>
<comp lib="0" loc="(790,490)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="width" val="32"/>
<a name="labelloc" val="east"/>
</comp>
<comp lib="0" loc="(330,480)" name="Pin">
<a name="width" val="8"/>
<a name="tristate" val="false"/>
</comp>
<comp lib="0" loc="(460,470)" name="Constant">
<a name="width" val="8"/>
<a name="value" val="0x0"/>
</comp>
<comp lib="1" loc="(740,670)" name="OR Gate">
<a name="facing" val="north"/>
<a name="size" val="30"/>
<a name="inputs" val="2"/>
</comp>
<comp lib="0" loc="(700,500)" name="Transmission Gate">
<a name="facing" val="north"/>
</comp>
<comp lib="6" loc="(186,583)" name="Text">
<a name="text" val="Clock (mem. driven)"/>
</comp>
<comp lib="0" loc="(780,490)" name="Splitter">
<a name="facing" val="west"/>
<a name="fanout" val="32"/>
<a name="incoming" val="32"/>
<a name="appear" val="right"/>
</comp>
<comp lib="6" loc="(652,761)" name="Text">
<a name="text" val="MBR"/>
</comp>
<comp lib="0" loc="(470,530)" name="Constant"/>
<comp lib="0" loc="(880,720)" name="Pin">
<a name="facing" val="north"/>
<a name="tristate" val="false"/>
</comp>
<comp lib="0" loc="(700,120)" name="Transmission Gate">
<a name="facing" val="west"/>
<a name="gate" val="br"/>
</comp>
<comp lib="1" loc="(640,660)" name="NOT Gate">
<a name="facing" val="west"/>
<a name="size" val="20"/>
</comp>
</circuit>
</project>