Now that we got familiar with FPGAs and their basic block construction, we have seen CLB's, IOB's and interconnection, now it's time to see how we can implement and get some benefit out of them. So, what we're going to see now is how to configure a lookup table. So, basically what we have to do first, obviously, is to have a problem that we're willing to solve or that we have been asked to solve. This problem is going to be translated into a circuit and this circuit at the end is going to be the one that is going to be translated into the lookup table configuration. So, now that we have this schema in mind we can try to see how we can define a problem. Well, basically this is something that is going to be provided to us. In this example we are going to see how a channel made of four different lines is going to be used. Now, for sake of simplicity we are going to name each of these lines like A, B, C and D and what we are asked to is to be able to monitor the activity of this channel and of those four lines. So, basically the idea is to be aware if one of them is going to be active or not. In order to be able to do this we have to try to define a sort of semantics, so zero is going to mean that this channel is not going to be used. So, zero on each of these lines is going to say: the channel is not used. If one of them is going to be set to one, at least one of them is going to be set to one, it means that the channel is used. So, if you are going to have a equal to one at the end the value of the monitoring infrastructure on this channel is going to be one because we have at least one line active. If you're going to have A and D and B and C set to zero, again our output is going to be one. So, that's great! Thanks to this definition we can now try to define this circuit that is going to be used to implement, to describe our monitoring infrastructure. So far we have really not a clear understanding on how this monitoring for structure is going to be built. We know that we have a block that is going to have one output: the information if the channel is going to be used or not. So this output is going to be one bit wide and it's going to have zero or one according to the information that is going to compute online. How many input lines are we going to have? Well, we have A, B, C, D which means that we need four inputs that are going to be the A, B, C, D values. Now, because of this what we have, as we know, is that we have two to the four possible different configurations of our input. That's great! This is what we are willing of designing. We are still not aware on how to do it but we have at least a basic understanding of the overall interface. That's great! These things have to be moved to the lookup table: as we know, a lookup table is basically a memory which is one bit wide. We have sixteen lines because the lookup table is a kind of a memory that is going to be used to implement every sort of function for input one output. So, we can describe it 2, 4, 8 and then 16. Those are the 16 cells that are used to define our lookup table. That's great! Now, basically the idea of moving from the circuit to the lookup table implementation means that we have to properly provide data into those cells. The inputs that we are going to observe here are going to be basically the outputs that are going to be monitored by our monitoring infrastructure And that's great! But, how to do it? Well, what we are looking for is a way in which we can describe the behavior our circuit and the way in which we are going to do it is through a truthtable. The truthtable is basically again a table made of the sixteen lines where we're going to have the four input and the 1 output as a column. So, let's design it. So, we have this truthtable. We're going to have the 16 lines: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 and 16. Now, we're going to list all D for input: D, C, B, A and now we're going to have also one for the output that we're going to call on for simplicity. Now, what we're going to do is basically listing all the possible configurations: so let's say that we're going to have 0 0 0 0 and 0 0 0 is going to provide us as output, a 0. What is going to happen then? Do we really have to list all of them? Well, that's what we are supposed of doing because different configurations of the input are going to provide possible different outputs, but in our case, as we know, we're going to set the output to one every single time at least one of these inputs is going to be set to one. So, from now on in each of these cells at least one of the inputs is going to be set to one. So, without having to set all the possible configurations we can now say that all these outputs are going to be set for sure to a 1, which is great and that's what exactly we are for because those outputs are the ones that we're going to store here. So, now we can take those informations and copy them here 0 1 1 1 1 1 1 1 1 and so on so forth till the sixth in line. Now, what is missing to complete our example is...we have the lookup table: the lookup table is storing the outputs of our circuit but how to select the proper output because of the configuration? Well, with the truthtable we were reading the configuration. We have to do something similar here and this is going to be done with a multiplexer. So, let's draw it here so we're going to have a multiplexer and each of the cells in the lookup table are going to be connected with this multiplexer and what we are going to need now is going to properly define the output of the MUX. The multiplexer is going to be driven by four inputs, so we're going to have one, two, three, four inputs here. Those four inputs, guess what, are these C, B, A, so we're going to have here D, C, B, A. The multiplexer with the configuration of the CBA is going to connect one of these cells with the output. So, let's see what is going to happen if you're going to have 0, 0, 0, 0: this is going to be this line. So, basically what we are going to enable is this connection and we are going to provide as output, because of these inputs, the value which is stored in the lookup table. So, we have these 16 values but just the one in the first cell is going to be provided as the output. So, the configuration provided as input 0 0 0 0 is going to set the multiplexer; we're going to enable this cell with the output; and the 0 is going to be provided. So, now let's see and try to recap what we have seen with this example: we have a problem; the problem has to be properly defined; and we have to describe it in a way that it is going to be translated into a circuit. The first thing that we are going to have with the circuit is the definition of the interfaces, input and output, and the dimension of them: in this case one bit per input and output. Then we have the lookup table: the lookup table is always defined in this way, in the sense that we have the sixteen cells, one bit wide, and we have to define the value that has to be stored in this cells. How to do it? Using the behavior of the circuit. How to define the behavior of the circuit? with the truthtable. The truth table is going to set all the possible input configurations; we are going to have the output defined because of the way in which the circuit is going to behave; we are going to take this output, we are going to set it here and according to the value provided at the input we are going to connect and enable just one of these cells with the output. So, this is the way in which from the problem we are going to configure the load. Obviously, this is a simplification of the real process. There are a lot of things that are going behind the scene: like the way in which were going really to define this output here. Is just super simple what we have shown in this example, but this was just to give you an idea on how to go from the problem to the circuit to the lookup table implementation. Thank you.