ImageVerifierCode 换一换
格式:DOCX , 页数:14 ,大小:77.37KB ,
资源ID:8680161      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/8680161.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(logisim实验逻辑电路实习题目.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

logisim实验逻辑电路实习题目.docx

1、logisim实验逻辑电路实习题目Logisim实验中国地质大学信息工程学院2010-3-26修订历史记录日期版本号修改说明修改人核准人2009-4-2初稿陈亮2009-4-20增加fsm部分陈亮2010-4-27修改fsm部分陈亮2011-3-26补充部分中文缺失的地方,增加中文翻译陈亮2011-3-31补充子电路和分解器的说明陈亮2012-10-21删减部分实验(触发器)陈亮2013-9-21修改部分ALU的内容(不自己做这个部件)陈亮目 录1 熟悉环境 41.1 基本功能: 41.2 练习二(ToolBar主要功能) 41.3 练习子电路 51.4 练习分解器Splitter 51.5

2、练习(传说中的选择器啊) 51.6 练习 61.7 练习 61.8 练习 62 FSM 62.1 基础:根据真值表设计电路 62.2 看电路,分析功能 72.3 看功能,分析电路(分析伯克利实验八的第一个实验的电路) 82.4 伯克利实验十的Part (A): Advanced Logisim的Exercise A.1: Storing State 83 ALU 114 CPU(2次实验课,伯克利prj3) 111 熟悉环境学习使用logisim,熟悉基本功能。1.1 基本功能: 学会使用toolbar上的功能。 学会增加子电路,并能够将子电路放到main电路中或者其他电路中使用 学会使用时钟

3、 学会使用splitter,理解带宽的含义。这部分需要实现一个8位带宽的输入,其中2位输入到一个与门,中间3位输入到一个3输入的或门,剩下三位输入到其他已有的门电路。1.2 练习二(ToolBar主要功能)我们将通过创建一个非常简单的电路来感受一下如何放置门和电线。1、 首先,单击“AND gate” 按钮。这时鼠标附近会出现一个与门的图标,在主电路图窗口任意位置单击鼠标以放置与门。2、 单击“Input Pin” 按钮。在你的与门左侧放置两个输入(input pin)。3、 单击“Onput Pin” 按钮。在你的与门右侧放置一个输出(output pin)。这时你的电路图看上去可能如下图所

4、示:4、 单击“Wire tool”按钮。单击并拖动它,以便将输入端和与门的左边相连。如果你只画垂直电线和水平电线的话,这一步可以分成几步。首先画一条水平电线,放开鼠标,单击并拖动电线的末端画一条垂直电线。你可以把电线连接到与门左边的任意一条腿上。重复这一过程,把与门的输出和LED相连。这时你的电路图看上去可能如下图所示:5、 最后,单击“Poke”按钮,试着单击电路图中的输入,看看会发生什么。这和你想象中的与门的功能相符么?1.3 练习子电路正如C程序可以包含帮助函数一样,一个电路图中也可以含有子电路。在这部分中,我们会创建几个子电路,并示范一下他们的使用。1、 新建一个电路图(FileNe

5、w)。2、 新建一个子电路(ProjectAdd Circuit),并命名为NAND。3、 在新电路图窗口中,你可以看见你刚创建的含有两个输入一个输出NAND电路。4、 在屏幕左侧电路选择板中双击“main”以返回主电路图。这时,最初的空白电路图会显示出来,而NAND电路图则被保存。5、 单击列表中的“NAND”,告诉Logisim你想吧“NAND”电路添加到主电路中。6、 试着把“NAND”电路放到主电路图中。如果你正确地做到了,你会看到一个左边含两个输入右边含一个输出的门。试着把输入输出相连,看看它是否和想象中一样工作。7、 重复这些步骤,创建其他几个子电路:NOR,XOR,2 to 1

6、MUX,和 4 to 1 MUX。除了AND,OR和NOT外,不要使用其他内置门。但是,一旦你创建了一个子电路,你可以使用它来创建其他电路。提示:不熟练者可以查看讲义学习如何创建。你可能需要使用一些你定制的电路来设计其他电路。1.4 练习分解器Splitter它是你这次课上需要使用的最基本的工具之一。为了示范如何使用它,你需要创建一个当最高有效位和最低有效位为1时输出1的电路。1、 创建一个名为“Exer2”的子电路。2、 在该电路中添加一个8位输入。3、 在该电路中添加一个1位输入。4、 选择“Splitter”电路,这个电路可以将一根电线分解成几根小电线。5、 在放置“Splitter”电

7、路前,将“Bit Width In”属性改为8,“Fan Out”属性改为3。这时如果将鼠标移到电路图上,光标看上去就像6、 现在,选择哪些位输出到输入的哪一部分。最低有效位为第0位,最高有效位为第7位。改变第1、2、6位输出到输入1。或者,选择“None”,使得第1、2、6位不输出到任一个输入。7、 配置完分解器后就可以把它放置在电路中。再添加一个与门,该电路就完成了。1.5 选择器(可不做)实现一个二路的复用器的子电路。问题:如果信号是一位,而备选的两个输入时32bit,电路怎么做?1.6 练习锁存器(可不做)实现如上子电路。1.7 练习触发器(可不做)实现一个一位的触发器,注意要用时钟。

8、用logisim的时钟实验一下结果,看看Q是否存储值。用这个子电路实现一个32位的寄存器。1.8 练习(可不做)实现一个3-8译码器。2 FSM2.1 基础:根据真值表设计电路上课时,你只是看到了真值表。在这次实验中,通过Logisim,你有足够的工具来实现真值表。假定真值表如下图所示,完成以下任务。in1in0|out1out000|0101|1010|1111|001、 从上面的真值表中推导出out1和out0的规范的SOP布尔表达式。2、 根据布尔代数中的公式简化布尔表达式(看讲义或者google来复习这部分内容)。得到最简式后,你可以检查一下该等式是否满足众所周知的那些门的模式。3、

9、在Logisim的主电路图中实现该最简式。可以随意使用你之前设计的那些子电路。务必使用“Text” 工具来注记你的输入输出。选择“Text” 工具工具,在电路图上单击,并输入文本即可。如果输错了,你可以通过selection 工具来选中文本对象,编辑位于属性电路浏览器下侧的属性列表中的“Text”属性。2.2 看电路,分析功能下面的FSM电路,假设初始状态Register 1 =1; register 2=0 理解下面fsm的功能,绘出波形图(参考ppt) 写出前5个周期两个寄存器的值2.3 看功能,分析电路(分析伯克利实验八的第一个实验的电路, 可不做)Consider the design

10、 of a finite state machine (FSM) with two 1-bit inputs (clk and CE), and one 2-bit output (X). clk is the clock signal and CE is the count enable signal. While CE=1, the FSM behaves as a binary counter, i.e. its output cycles through the pattern 00, 01, 10 11, 00, moving from one output value to the

11、 next on each positive edge of clk. If CE = 0 the output value remains unchanged.Note that FSM has no reset input signal. You can assume that it starts up in any legal state.Sketch the state transition diagram that represents the behavior of this FSM in the style of the lecture notes.考虑设计一个FSM,有2个1位

12、的输入(clk和CE),还有一个2位的输出(X)。clk是时钟信号,CE是“计数使能”信号。当CE=1的时候,FSM的行为就是一个二进制计数器,它的输出一直就是按照00,01,10,11,00状态进行变化,在每个上升沿时钟将状态转换到下一状态。当CE=0的时候,输出值不变。注意FSM没有复位信号,你可以以任何合法的状态开始。根据上面描述,绘制状态转移图分析FSM,并考虑一下实现的问题(只考虑,不实现)。2.4 伯克利实验十的Part (A): Advanced Logisim的Exercise A.1: Storing State(可以不做)以下是网络上下载的A.1Lets implement

13、 the circuit you worked on in Lab 8. The difference between this circuit and the circuits youve built for lab so far is that you need some registers. The following will show you how to add registers to your circuit. 我们现在开始考虑实现2.1和2.2中的那个FSM,这2个电路和我们以前实现的电路最大的区别在于现在我们需要用到寄存器。(即现在的电路不再是单纯的组合逻辑电路)。下面的提

14、示可以告诉你如何在自己的电路中使用软件内置的寄存器。1. Create a new subcircuit (Project-Add Circuit). Name this new subcircuit, Fib8. 创建一个新的子电路,假设名字叫fib82. Load in the Arithmetic Library (Go to Project-Load Library-Built in Library and select Arithmetic). This library contains elements that will perform basic mathematical op

15、erations. When you load a library, the circuit browser at left will have a new Arithmetic folder. 菜单“Project”-“Load Library”-“Built In Library”,选择“Arithmetic”,这个库包含一些基本的算术操作电路。当你load一个库的时候,左边的电路列表就会显示出一个“Arithmetic”文件夹。其他的你自己试试看?3. Select the adder subcircuit from the Arithmetic library and place th

16、e adder into your Fib8 subcircuit选择Arithmetic中的一个加法器子电路.,将它放在Fib8电路中4. Load in the Memory Library (Go to Project-Load Library-Built in Library and select Memory). This library contains memory elements used to keep state in a circuit. A new Memory folder will appear in the circuit browser. 按照上面类似的方法加

17、载“Memory”库,这个库包含一些存储电路。加载成功后,你在左边列表中会看到“Memory”文件夹。5. Select the register from the Memory folder and place two registers into your subcircuit. Below is an image diagraming the parts of a register. 从“Memory”库中选择寄存器,增加两个寄存器到我们的子电路中来。寄存器应该是下面这个样子。注意reset和时钟很近,别弄混了。6. Connect a clock to your register. Y

18、ou can find the clock circuit element in the Base folder in the circuit browser. 为寄存器连接上时钟。时钟电路在“base”节点下寻找,你懂的。7. Connect the two registers and adder together based on the diagram in Lab 8. 两个寄存器和加法器连接起来,实现2.1和2.2的电路。You may notice that when you connect the adder to a register, you will get a Incom

19、patible widths error. This means that your wire is trying to connect two pins together with different bit widths. If you click on one the adder with the Selection tool, you will notice that in the box below circuit browser will have a field called Data Bit Width. This field controls the number of bi

20、ts the the adder will add. Change this field to 8 and the Incompatible widths error should now go away. In general, the box below the circuit browser will list the properties of a given circuit element. Other circuit elements will have other properties. 你可能已经注意到当你连接加法器到寄存器的时候,可能遇到“Incompatible width

21、s”错误(请回顾试验1的1.1的)。在logisim软件中,连线两端的带宽必须是相同的8. Add three output pins to your circuit so that you may monitor what comes out of the adder and both registers. Thus, by the end, your circuit should look like as follows: 增加三个输出到你的电路,检测加法器和寄存器的值。最后,你的电路可能做成如下这个样子(这是2.2的电路)Now lets see if you built your ci

22、rcuit correctly. 好,我们现在可以测试一下你的电路是否正确。如果正确,你也可以来实现以下2.2的FSM的电路。电路有了时钟后,大家是不是不知道如何测试了呢?下面这段步骤,是告诉你如何使用你的子电路,并用软件功能模拟时钟,来检测电路实现的,大家自己看看。1. Go back to the main subcircuit by double clicking on main in the circuit browser. 2. Change the Facing property to another direction. Any circuit with the Facing p

23、roperty can be rotated to accomodate wires as you need them. This will definately be useful when you do your project. 3. Place your Fib8 subcircuit into the main subcircuit. 4. Select the Fib8 subcircuit you just placed into main. 5. Connect output pins to the Fib8 subcircuit. Output pins are ordere

24、d top to bottom, left to right. Thus, if you followed the schematic above, then the top pin on the right side outputs the value one of the top register, the middle pin is the output of adder, and the bottom pin is the output of the bottom register. 6. Right click on your Fib8 subcircuit, and select

25、View Fib8. This is the ONLY method to preserving state. Double-clicking on the circuit at the circuit browser at left makes logisim think you want to edit the circuit instead of just checking what state the circuit has. Note: You can use Simulate-Go In To State-*Circuit Name*, but that allows you go

26、 into the first circuit of that type. If you placed two Fib8 circuits down, it only takes you to the first Fib8 circuit to put down. 7. Initialize the register values to 1. You can do this by first, click on the register value with the poke tool. Then, type the hex value in. 8. To return to the main

27、 circuit while preserving state, go to Simulate-Go Out To State-main. Alternatively, you can hold Control key and press Up-Arrow. 9. Now start running your circuit by going to Simulate-Ticks Enabled. Your circuit should now be outputting the fibonachi numbers in binary form. 10. If you want to run y

28、our circuit faster, you can change the tick frequency in Simulate-Tick Frequency. 3 ALU实现hw5对应的8位ALU,可以不实现溢出。注意参考附录B中相关章节。要求实现加、减、或,判等 四种操作。说明:为了支持第四部分的内容,仅仅要求实现add、sub、or,要求能够支持equal信号输出4 CPU(2次实验课,伯克利prj3)为了考虑大家体力有限,我们不实现32位的CPU。(也可以参考http:/inst.eecs.berkeley.edu/cs61c/sp11/projects/04/)实现prj3对应的8

29、位CPU。这是体力活和脑力活的结合体,体会一下一个能够自动绘制电路软件的必要性吧:)指令设计如下:一共支持7个指令:lw,sw,add,sub,ori,beq,jmp留给寄存器的位数只有1位,所以只有2个通用寄存器不支持移位操作。I类型指令中立即数位数为3,J类型指令地址5位具体指令编码如下指令OpcodeRsRtRdFunc76543210Add00000Sub00001指令OpcodeRsRtIMM/AddrOri001Lw010Sw011Beq100指令OpcodeTarget AddrJmp1011、 设计2个8位寄存器的寄存器堆2、 支持add、sub、or的ALU(可以先用现成的组

30、件,而不自己实现;当然自己实现是最好的)3、 扩展器(3位的立即数扩展到8位),两种扩展方式4、 PC的两种特殊扩展方式5、 Ram的试用试验Logisim RAM modules can be found in the built-in memory library.Because the RAM module doesnt look like the idealized memory we saw in lecture, you may feel confused about where to begin. The picture above shows a good way to wire up a circuit to use RAM. Here are a few things to know before you get started. sel determines whether or not the RAM module is active. We will probably not run into any cases where we need to turn our RAM off, so you can wire a constant 1 to this. A chooses which address will be accessed.

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1