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

加入VIP,免费下载
 

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

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

下载须知

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

版权提示 | 免责声明

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

logisim入门.docx

1、logisim入门Logisim使用1熟悉环境学习使用logisim,熟悉基本功能。2Preparation下载Logisim软件,启动Logisim应用程序。输入java -jar logisim-2.7.1.jar如果想知道更多关于Logisim的内容,可以访问Logisim网站2.1基本功能:学会使用toolbar上的功能。学会增加子电路,并能够将子电路放到main电路中或者其他电路中使用学会使用时钟学会使用splitter,理解带宽的含义。这部分需要实现一个8位带宽的输入,其中2位输入到一个与门,中间3位输入到一个3输入的或门,剩下三位输入到其他已有的门电路。2.2练习二(ToolBa

2、r主要功能)我们将通过创建一个非常简单的电路来感受一下如何放置门和电线。1、首先,单击“AND gate” 按钮。这时鼠标附近会出现一个与门的图标,在主电路图窗口任意位置单击鼠标以放置与门。2、单击“Input Pin” 按钮。在你的与门左侧放置两个输入(input pin)。3、单击“Onput Pin” 按钮。在你的与门右侧放置一个输出(output pin)。这时你的电路图看上去可能如下图所示:4、单击“Wire tool”按钮。单击并拖动它,以便将输入端和与门的左边相连。如果你只画垂直电线和水平电线的话,这一步可以分成几步。首先画一条水平电线,放开鼠标,单击并拖动电线的末端画一条垂直电

3、线。你可以把电线连接到与门左边的任意一条腿上。重复这一过程,把与门的输出和LED相连。这时你的电路图看上去可能如下图所示:5、最后,单击“Poke”按钮,试着单击电路图中的输入,看看会发生什么。这和你想象中的与门的功能相符么?2.3练习子电路正如C程序可以包含帮助函数一样,一个电路图中也可以含有子电路。在这部分中,我们会创建几个子电路,并示范一下他们的使用。1、新建一个电路图(FileNew)。2、新建一个子电路(ProjectAdd Circuit),并命名为NAND。3、在新电路图窗口中,你可以看见你刚创建的含有两个输入一个输出NAND电路。4、在屏幕左侧电路选择板中双击“main”以返回

4、主电路图。这时,最初的空白电路图会显示出来,而NAND电路图则被保存。5、单击列表中的“NAND”,告诉Logisim你想吧“NAND”电路添加到主电路中。6、试着把“NAND”电路放到主电路图中。如果你正确地做到了,你会看到一个左边含两个输入右边含一个输出的门。试着把输入输出相连,看看它是否和想象中一样工作。7、重复这些步骤,创建其他几个子电路:NOR,XOR,2 to 1 MUX,和 4 to 1 MUX。除了AND,OR和NOT外,不要使用其他内置门。但是,一旦你创建了一个子电路,你可以使用它来创建其他电路。提示:不熟练者可以查看讲义学习如何创建。你可能需要使用一些你定制的电路来设计其他

5、电路。2.4练习分解器Splitter它是你这次课上需要使用的最基本的工具之一。为了示范如何使用它,你需要创建一个当最高有效位和最低有效位为1时输出1的电路。1、创建一个名为“Exer2”的子电路。2、在该电路中添加一个8位输入。3、在该电路中添加一个1位输入。4、选择“Splitter”电路,这个电路可以将一根电线分解成几根小电线。5、在放置“Splitter”电路前,将“Bit Width In”属性改为8,“Fan Out”属性改为3。这时如果将鼠标移到电路图上,光标看上去就像6、现在,选择哪些位输出到输入的哪一部分。最低有效位为第0位,最高有效位为第7位。改变第1、2、6位输出到输入1

6、。或者,选择“None”,使得第1、2、6位不输出到任一个输入。7、配置完分解器后就可以把它放置在电路中。再添加一个与门,该电路就完成了。2.5练习(传说中的选择器啊)实现一个二路的复用器的子电路。问题:如果信号时一位,而备选的两个输入时32bit,电路怎么做?2.6练习实现如上子电路。2.7练习实现一个一位的触发器,注意要用时钟。用logisim的时钟实验一下结果,看看Q是否存储值。用这个子电路实现一个32位的寄存器。2.8练习实现一个3-8译码器。3FSM3.1基础:根据真值表设计电路上课时,你只是看到了真值表。在这次实验中,通过Logisim,你有足够的工具来实现真值表。假定真值表如下图

7、所示,完成以下任务。in1in0|out1out000|0101|1010|1111|001、从上面的真值表中推导出out1和out0的规范的SOP布尔表达式。2、根据布尔代数中的公式简化布尔表达式(看讲义或者google来复习这部分内容)。得到最简式后,你可以检查一下该等式是否满足众所周知的那些门的模式。3、在Logisim的主电路图中实现该最简式。可以随意使用你之前设计的那些子电路。务必使用“Text” 工具来注记你的输入输出。选择“Text” 工具工具,在电路图上单击,并输入文本即可。如果输错了,你可以通过selection 工具来选中文本对象,编辑位于属性电路浏览器下侧的属性列表中的“

8、Text”属性。3.2看电路,分析功能下面的FSM电路,假设初始状态Register 1 =1; register 2=0理解下面fsm的功能,绘出波形图(参考ppt)写出前5个周期两个寄存器的值3.3看功能,分析电路(分析伯克利实验八的第一个实验的电路)Consider the design 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.

9、 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 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 u

10、p 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位的输入(clk和CE),还有一个2位的输出(X)。clk是时钟信号,CE是“计数使能”信号。当CE=1的时候,FSM的行为就是一个二进制计数器,它的输出一直就是按照00,01,10,11,00状态进行变化,在每个上升沿时钟将状态转换到下一状态。当CE=0的时候,输出值不变。注意FSM没有复位信号,你可以以

11、任何合法的状态开始。根据上面描述,绘制状态转移图分析FSM,并考虑一下实现的问题(只考虑,不实现)。3.4伯克利实验十的Part (A): Advanced Logisim的Exercise A.1: Storing State以下是网络上下载的A.1Lets implement 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 follow

12、ing will show you how to add registers to your circuit. 我们现在开始考虑实现2.1和2.2中的那个FSM,这2个电路和我们以前实现的电路最大的区别在于现在我们需要用到寄存器。(即现在的电路不再是单纯的组合逻辑电路)。下面的提示可以告诉你如何在自己的电路中使用软件内置的寄存器。1.Create a new subcircuit (Project-Add Circuit). Name this new subcircuit, Fib8. 创建一个新的子电路,假设名字叫fib82.Load in the Arithmetic Library (

13、Go to Project-Load Library-Built in Library and select Arithmetic). This library contains elements that will perform basic mathematical operations. When you load a library, the circuit browser at left will have a new Arithmetic folder. 菜单“Project”-“Load Library”-“Built In Library”,选择“Arithmetic”,这个库

14、包含一些基本的算术操作电路。当你load一个库的时候,左边的电路列表就会显示出一个“Arithmetic”文件夹。其他的你自己试试看?3.Select the adder subcircuit from the Arithmetic library and place the adder into your Fib8 subcircuit选择Arithmetic中的一个加法器子电路.,将它放在Fib8电路中4.Load in the Memory Library (Go to Project-Load Library-Built in Library and select Memory). T

15、his library contains memory elements used to keep state in a circuit. A new Memory folder will appear in the circuit browser. 按照上面类似的方法加载“Memory”库,这个库包含一些存储电路。加载成功后,你在左边列表中会看到“Memory”文件夹。5.Select the register from the Memory folder and place two registers into your subcircuit. Below is an image diag

16、raming the parts of a register. 从“Memory”库中选择寄存器,增加两个寄存器到我们的子电路中来。寄存器应该是下面这个样子。注意reset和时钟很近,别弄混了。6.Connect a clock to your register. You can find the clock circuit element in the Base folder in the circuit browser. 为寄存器连接上时钟。时钟电路在“base”节点下寻找,你懂的。7.Connect the two registers and adder together based o

17、n 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 Incompatible 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

18、, you will notice that in the box below circuit browser will have a field called Data Bit Width. This field controls the number of bits 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 pro

19、perties of a given circuit element. Other circuit elements will have other properties. 你可能已经注意到当你连接加法器到寄存器的时候,可能遇到“Incompatible widths”错误(请回顾试验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

20、 end, your circuit should look like as follows: 增加三个输出到你的电路,检测加法器和寄存器的值。最后,你的电路可能做成如下这个样子(这是2.1的电路)Now lets see if you built your circuit correctly. 好,我们现在可以测试一下你的电路是否正确。如果正确,你也可以来实现以下2.2的FSM的电路。电路有了时钟后,大家是不是不知道如何测试了呢?下面这段步骤,是告诉你如何使用你的子电路,并用软件功能模拟时钟,来检测电路实现的,大家自己看看。1.Go back to the main subcircuit b

21、y double clicking on main in the circuit browser. 2.Change the Facing property to another direction. Any circuit with the Facing property 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 subcircui

22、t. 4.Select the Fib8 subcircuit you just placed into main. 5.Connect output pins to the Fib8 subcircuit. Output pins are ordered 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 th

23、e output of adder, and the bottom pin is the output of the bottom register. 6.Right click on your Fib8 subcircuit, and select 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

24、 of just checking what state the circuit has. Note: You can use Simulate-Go In To State-*Circuit Name*, but that allows you go 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. Yo

25、u 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 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 S

26、imulate-Ticks Enabled. Your circuit should now be outputting the fibonachi numbers in binary form. 10.If you want to run your circuit faster, you can change the tick frequency in Simulate-Tick Frequency. 4ALU实现hw5对应的8位ALU,可以不实现溢出。注意参考附录B中相关章节。要求实现加、减、或,判等 四种操作。说明:为了支持第四部分的内容,仅仅要求实现add、sub、or,要求能够支持e

27、qual信号输出5CPU(2次实验课,伯克利prj3)为了考虑大家体力有限,我们不实现32位的CPU。实现prj3对应的8位CPU。这是体力活和脑力活的结合体,体会一下一个能够自动绘制电路软件的必要性吧:)指令设计如下:一共支持7个指令:lw,sw,add,sub,ori,beq,jmp留给寄存器的位数只有1位,所以只有2个通用寄存器不支持移位操作。I类型指令中立即数位数为3,J类型指令地址5位具体指令编码如下指令OpcodeRsRtRdFunc76543210Add00000Sub00001指令OpcodeRsRtIMM/AddrOri001Lw010Sw011Beq100指令OpcodeT

28、arget AddrJmp1011、设计2个8位寄存器的寄存器堆2、支持add、sub、or的ALU3、扩展器(3位的立即数扩展到8位),两种扩展方式4、PC的两种特殊扩展方式5、Ram的试用试验6、控制电路7、连接各个部件Logisim中构建有限状态机1.背景2.目标本实验包括两部分. 第一部分学习如何在Logisim中保存基本信息 , 特别是如何保持状态, 及如何把线分开,及取线中的部分位. 第二部分是学习如何把有限状态机分成两部分,用于维持当前状态的控制器及下一状态及和输出电路的组合函数.3.ReadingP&H section B.10 (copy can be found here)

29、. Refer to the Logisim Website for a refresher on Logisim.4.Part (A): Logisim高级教程以下练习将讲授,如何在logisim中存储状态及告诉你logism中的线wires是如何工作的.5.练习 A.1: 存储状态下面进一步实现实验6中的电路. 本次电路和此前电路的区别在于,现在需要寄存器. 下面将教你如何在电路中添加寄存器.1.建立一个新的subcircuit(子电路)库 (Project-Add Circuit). 将此新的子电路命名为, Fib8.2.装入(Load)算术电路库Arithmetic Library (

30、选择Project-Load Library-Built in Library ,然后选择Arithmetic). 此此库中包含执行基本算术运算的单元. 当装入库后, 左边的电路浏览器中将出现一个新的Arithmetic文件夹.3.从Arithmetic 库中选择adder子电路,并将adder子电路加到Fib8子电路中.4.装入内存库Memory Library (选择Project-Load Library-Built in Library 并选择Memory). 该库中包含能在电路中保存状态的内存单元. 新的Memory文件夹将出现在电路浏览器中.5.从Memory文件夹中选择regis

31、ter(寄存器),并放两个registers到你的子电路中. 下图所示为示register元件的图示. 6.连接一个时钟到寄存器. 可以在电路浏览器的Base文件夹中找到时钟电路.7.连接两个registers(寄存器)和adder(加法器),如实验5中的图所示. 你可能注意到,当连接adder(加法器)到一个register(寄存器)时, 将出现Incompatible widths(宽度不兼容)错误. 其意思是你的wire(连线)要连接两个不同位宽的pin(针). 如果你使用Selection工具点击adder(加法器), 你会注意到在电路浏览器下方的盒子中有一个字段的名字是Data Bit Width数据位宽. 此字段控制adder(加法器)要加的数的位数.修改该字段为8,则Incompatible widths错误将消失.总的来说,电路浏览器下的盒子中将列出给定电路单元

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2