

In a real FPGA, the output of one LUT can be routed (wired) into the input of another LUT. Check this page for more detail about LUTs and Boolean Logic in general. The tools will simply tie off input 3 and input 4 if they are unused. Note that you don’t actually need to have 4-inputs, you can use a single LUT to make a 2-input AND gate. This means that any possible Boolean logic you can come up with given 1-output and 4-inputs can be programmed into a single LUT element. The Go Board uses LUT4s, which are 4-input LUTs. There are 3-input, 4-input, and even 5-input LUTs on FPGAs. Therefore, A 2-input LUT can implement any Boolean output given 2-inputs. But given 2-inputs, there’s lots of possible output combinations, which all must be possible to satisfy given a 2-input LUT. The above examples show a 2-input LUT that has been configured to be an AND gate and an OR gate. Let’s take a look at that truth table: Truth Table – A OR BĪ Look-Up Table (LUT) is how any arbitrary Boolean logic gets implemented inside your FPGA. If neither A OR B are 1, then the output will be 0. Now what if we wanted to change this to an OR gate? An OR gate means that the output will be 1 if input A OR input B are 1. Remember, the AND gate Output is 1 when input A AND input B are 1. Let’s look at the truth table for an AND gate. I also created a YouTube video for this project, should you prefer to follow along with that.Ī truth table shows every possible input combination and what the resulting output will be. LUTs are a fundamental component used to perform all Boolean logic inside your FPGA. Instead, FPGAs use Look-Up Tables or LUTs. But have you ever considered how these are actually implemented inside of an FPGA? Are there really thousands of individual AND gates, just waiting to be wired up? That would not be very versatile. There are other types of simple Boolean logic components: OR, NOT, XOR, NAND, etc. Boolean logic simply means all variables can have the value 1 or 0 (or as sometimes called in FPGAs, high and low). It’s a very simple Boolean logic circuit. Unless both inputs are 1, the output will be 0. The output is equal to 1 only when both inputs are equal to 1. Have you ever wondered how an AND gate actually works inside your FPGA? An AND gate is a type of logic circuit that has two inputs and one output. Go Board – Introducing Look-Up Tables (LUTs) How Boolean Algebra is Actually Performed on an FPGA
