[MUSIC] Hello. This is Elena Valderrama, and I'm going to explain the operation of VerilUOC_Desktop. VerilUOC_Desktop is a sort of tool located within the digital system virtual machine that you have installed in your computer. VerilUOC_Desktop is a suite of tools that will allow you to do most of the course assignments and their automatic grading. It consists of four tools, Logism, VerilCirc, BoolMin, and VerilChart. Logisim is a tool to design circuits and enter the schematics. VerilCirc is a tool that checks whether the circuit designed with Logisim is the right one. BoolMin is the tool we'll use to grade those assignments whose answer is a Boolean expression. and VerilChart is a tool to enter and check Time Charts. As I said earlier VerilUOC_Desktop is inside the DigitalSystem virtual machine. So the first thing we have to do is to launch VirtualBox and start the virtual machine. To run VirtualBox in Windows, just double-click the VirtualBox icon in your desktop. In OS X, double-click the VirtualBox icon in the Applications folder, and in Linux, you should use a terminal to run the command virtualbox &. Let's see an example of how to launch VirtualBox abd start the DigitalSystem virtual machine in Windows. Double-click on the icon. The main VirtualBox window opens, and maybe an additional small window opens informing that the new version is available. Well, in this case, just press "OK" to close it and don't worry. Later on in this video, we shall see how to manage updates. Now we have to start the virtual machine from VirtualBox window. To do so, press start and wait. After a time that can be longer depending on your computer the virtual machine screen opens. In this screen you can see the VerilUOC_Desktop icon. But, before opening VerilUOC_Desktop let me explain how to manage the updates. As indicated in the installation manual of the virtual machine, you should never update neither the virtual machine, nor VirtualBox. Both elements must remain unchanged along the entire course. Therefore, if you get some message while starting VirtualBox telling that a new version exists, just ignore them. Just do nothing, okay? On the contrary, VerilUOC_Desktop do have to be updated when you receive a message saying that a newer version is available. The update may affect either the list of exercises or to the VerilUOC_Desktop tool itself. Let's see what to do in each case. When a window opens saying that there is an update of the list of exercises click on OK and the update process will begin. Then, wait until the process ends. When finished you may continue to use VerilUOC_Desktop as usual. In the second case, when VerilUOC_Desktop informs that a version is available. and asks you if you want to upload it, answer YES and wait until the upload process is over. Once the process is over, close VerilUOC_Desktop. See how a second icon has appeared on the desktop. This is the icon of the new version of the tool that you will easily identify because it has a higher version number. Double-click on it to launch the new version. The first time you run simulate, verify, a new folder named Backup VerilUOC will be created, and the old version of VerilUOC will be moved to this folder so it will disappear from the desktop. And well, that's all. These slides summarize the update policy you should follow along the course. Let's talk now about how to work with the different tools that are part of the VerilUOC_Desktop. To run VerilUOC_Desktop, double-click on the icon. A amall window with the authors appears, and then the VerilUOC_Desktop main window opens. If you want to change the language go to Archive (File) and Preferencias (Preferences), Click on Internacional (International) tap and select the language, for instance English. The VerilUOC_Desktop window is, a matter of fact, the Logisim window. Let's see how it works. We will use Logisim to design circuits or, better speaking, to enter the schematics. Drawing a schematic involves making three reactions. Step one: enter the components, logic gates, multiplexer, flip flops, and so on. Don't worry about these names by now, they will become familiar for us along the course. Step two: place input and output pins, and name them. And step three: draw lines connecting components, or connecting pins and components. Let's see how to do this with an example. Let's assume you are working in the weekly assignments, and we should solve problem 2.4.c, which requires designing a circuit implementing this Boolean expression. We have solved the exercise on the paper. and we have concluded that the circuit we are looking for is this one. The circuit consists of one NOR Gate, three AND Gates, and one OR Gate. Now we have to see how to introduce this schematic into Logisim. Well, Logisim has a library of devices. In this library you will find devices related with wiring, as for example these generators of logical 0s and 1s; logic gates, here you can see an AND, OR, NOR and other gates; plexers are, for instance, Multiplexers; and memory elements, here you can see a D bistable. The library has many other devices. But these are the ones we will use along the course. Let's start adding the circuit components. To add AND, OR, or INVERTER gates we may use the toolbar buttons. To add an AND gate, click on the AND icon and place the gate in the desired position in the edition area Now, we have to define the number of inputs, two in this case. Here you can see the two inputs of the gate. To add two additional 2-input AND gates, we can just duplicate the existing one. To do so, select the gate by clicking on it, and go to Edit, Duplicate. Repeat this action to add the second gate. If you want to move a device, place the mouse over it and drag the gate to the desired position. We can also duplicate using the Copy and Paste comments in the Edit menu. or even using the classic "Ctrl+C", "Ctrl+V". To add the inverter and the OR gate we repeat the same process, clicking on the corresponding icons in the toolbar. Finally we need to add a NOR gate, and let's note that there is no icon for this gate in the toolbar. In this case we should go to the components library, open the folder Gates and click on NOR Gate. Insert the gate in the Editing area and define the number of inputs as we have done before. If you want to rotate the gate to an upright condition, go to the gate Properties menu and select North in the Facing field. The inverter also should have a vertical orientation, so we select it and establish the North facing as before. And well, at this point we have introduced all the circuit components. The second step is to place the input and 0utput pins and name them. To do so we'll use these two buttons on the toolbar. We have five input pins: a, b, c, d, e, and g, and one output pin: f. When solving the assignments, and this is important, please be careful to name the input and output pins with exactly the same names (defined) in the problem statement even respecting the upper and lower cases, OK? Well, to add an input pin, click on the square icon in the toolbar, and name the pin by filling the Label field in the pin Properties menu. Repeat the process for all the input pins. Then the process to add the output pin is almost the same except that we should click on the round icon of the toolbar. And this concludes Step Two. The last step is to add all connecting lines. To add a connecting line, click on the arrow icon on the toolbar, and draw the desired connection between gate terminals or between gate terminals and pins. The terminals of a gate are the points where inputs and outputs are connected. Note that only horizontal or vertical lines can be drawn. And well, at this point, we have the complete schematic entered. Now we should save the circuit, clicking on File and Save, or Save As. Write the name of the file, taking care that the name may not contain wide spaces. And that's all. The extension .circ will be added at the file into the file line automatically. Well, this ends the schematic capture process. It remains to be seen. how to automatically check if the circuit is right. But before we let me introduce a few some comments on Logisim. Logisim is a program primarily developed by Carl Burch since its inception in 2001. It's a software free package released under a GNU-General Public License. widely used by a large number of educational institutions around the world. Logisim has multiple functionalities, here we have mainly discussed the main one, the schematic enter, but there are many others. For instance, Logisim may perform small simulations. Assigning 0s and 1s to the input pins, Logisim computes the value taken by the output pins. We're going to discuss a little bit about the our simulation at the end of the video. There exists a lot of documentation about Logisim on the Internet. If you want to know further, we recommen consulting the websites that appear on the screen. Well let's go back to the exercise we were doing. We have already entered the schematic of the circuit and now we should proceed to check it. To do so we will use the VerilCirc tool. To open VerilCirc we should go to Simulate, click on Verification and select the VerilCirc tab. A list of exercises to be credited by VerilCirc appears. We should look for the exercise we are working on, in our case, exercise 2.4.c and select it. See that the problem is shown in the description PDF tab. To launch the process of checking the circuit, just click on the Verify button in the lower-right corner. After a few second, you will see that the result of the checking of the circuit appears in the Verification panel. In this case VerilCirc has detected that the sequence you have entered is wrong. To help us to detect what the fault is, VerilCirc provides us a combination of input values that result in an output different that expected. VerilCirc also gives us a four capital letter code indicating that we have entered an the answer to the exercise but that, unfortunately, this answer is not the right one. The panel Time Chart shows us graphically the behavior of our circuit when the combination of input values that causes a wrong output are applied The solid-line shows the behavior of our circuit while the dash-line shows the expected behavior. Well, and now, what should you do? Well, with the information provided by VerilCirc you should review the circuit and determine the source of the error. To this end, it may be helpful to consult the VerilUOC_Desktop wiki we have prepared. You can access from the course page. See how there is a section devoted to VerilCirc. And inside you will find several other sections with examples. There are also hints about how to deal with a wrong circuit and how to interpret the error messages. Once determined where the fault is, well, you have to modify the circuit, save it, and run again VerilCirc in order to check it. When finally VerilCirc tells you that the circuit is right, copy that 4-letter code provided by VerilCirc and introduce it into the answer box of the corresponding Coursera question. Before ending this topic, let me make a couple of comments. The first one is about the bug reported by some students of earlier editions. What was the message warning?: "bus with a circular connection", or "an output bus with input value assigned". What does it mean? And what to do to solve the problem? Well, a "circular connection" is any connection between several components forming a loop. For example, here you can see a circuit that does not have this problem, OK? Don't have this problem. Beginning in any gate and following any connection path, you always arrive to an output. If we begin in gate AND1 and try to move toward the output, we should follow the path defined by the connection from the AND1 output to the NOR1 input, then to the AND2 input, then to the AND3 input, and finally to the output. There is no loop in the path. Let's see now this other circuit. It's quite similar to the previous one, but it has this additional blue connection. See how now a circular path connecting the NOR1 gate and the AND2 gate ... has appeared. This is an example of a circular connection reported by the warning. Here is another, more subtle case: Imagine that while drawing the connection lines, by mistake, we have a stretch the connection going to the INVERTER input so that the line expands until the INVERTER output. We have here another loop because the INVERTER output is connected to the INVERTER input. So, as a summary, if VerilCirc gives you a warning of circular connection, check the circuit looking for loops and remove them. The second comment is about circuit simulation. Simulate a circuit consist on replicating the actual behavior of the circuit by computing the output values of the circuit when a set of values are applied to the inputs. Well, Logisim, not only supports the schematic capture, but also is capable to perform small simulations. If you want to simulate a circuit, you should first enable the simulator: go into Simulate, and mark the Simulation Enable box. By default this box is enabled. See how inputs have a logical 0 assigned by default. Because the simulation is enabled, Logisim computes the value of output f for the above input values. In this case the output takes the value 0. If you want to simulate the circuit behavior for other input values, you obviously have to change them. And, to do so, first click on the icon shaped like a hand in the toolbar and then, any time you click on an input, the value of this input will change from 0 to 1, or from 1 to 0. Let's assume we want to simulate the circuit for the input values 1, 1, 0, 1, 1, 0. We select the hand icon and click on the inputs whose values must be changed. Automatically Logisim computes the corresponding output value which, in this case, is 1. See how lines have changed their color. Light green lines mean that the node has the value 1, and dark green lines mean that the node has the value 0. As you can see, simulate a circuit with Logisim is quite easy. And well, this concludes this video in which we have seen how to use Logisim and VerilCirc. And in the next video, we will see how to use BoolMin and VerilChart. Don't miss it. See you in the next video. Bye-bye.