1 00:00:00,780 --> 00:00:04,240 This is Hardware Black Magic, Building Devices with FPGAs. 2 00:00:05,120 --> 00:00:07,320 My name is Rodney McGee. I'm just the first speaker. 3 00:00:08,440 --> 00:00:11,440 Everybody up here should be at least at some point interacting with you. 4 00:00:11,500 --> 00:00:13,820 This is a three-hour talk, kind of a long talk for DEF CON, 5 00:00:13,980 --> 00:00:17,280 but we try to have enough demos and stuff to keep it interesting. 6 00:00:20,280 --> 00:00:24,700 Our research group is called C-Vorg. We're from the University of Delaware. 7 00:00:25,320 --> 00:00:28,600 It's in Newark, not Newark. That's New Jersey. 8 00:00:30,020 --> 00:00:35,500 So our interests actually are in custom hardware, high-speed interconnects, 9 00:00:35,500 --> 00:00:37,440 basically designing custom chips. 10 00:00:38,060 --> 00:00:41,660 We do a little reverse engineering, a little hardware red teaming, security, 11 00:00:41,880 --> 00:00:45,540 and a couple members of a group that works with us do network security. 12 00:00:47,660 --> 00:00:52,040 Actually, at C-Vorg, we try to learn things outside of our discipline. 13 00:00:52,320 --> 00:00:54,240 We find that it gives us a lot of inspiration 14 00:00:54,700 --> 00:01:00,420 and that really puts you ahead of other people who are just learning by the book. 15 00:01:00,620 --> 00:01:02,840 I mean, believe me, we have a lot of books, 16 00:01:02,940 --> 00:01:07,800 but you have to kind of put things together in a way that really gives you insight 17 00:01:07,800 --> 00:01:09,540 and to do something novel. 18 00:01:13,360 --> 00:01:15,300 And we're all about hardware. 19 00:01:15,700 --> 00:01:18,820 Even if it's about software, we still always come back to hardware. 20 00:01:21,120 --> 00:01:24,060 Traditionally, a lot of DEF CON has been focused on hardware, 21 00:01:24,180 --> 00:01:24,680 but if you've heard of it, 22 00:01:24,700 --> 00:01:26,160 you've been to the con the last couple of years. 23 00:01:26,300 --> 00:01:27,660 You notice there's been more hardware 24 00:01:27,660 --> 00:01:30,600 and a lot of emphasis on learning hardware every year. 25 00:01:32,180 --> 00:01:34,540 One of the things we like to say is, you know, 26 00:01:34,560 --> 00:01:37,800 fundamentally, no matter how good your software is, 27 00:01:37,960 --> 00:01:44,620 you cannot do a secure implementation on fundamentally unknown or insecure hardware. 28 00:01:44,920 --> 00:01:48,760 You can't make any assumptions, no matter how many levels of distraction you have. 29 00:01:49,160 --> 00:01:54,220 If your hardware is flawed, there will be some vulnerability introduced there. 30 00:01:54,220 --> 00:01:58,680 And the reason why I said here, fight to understand how your hardware works, 31 00:01:58,840 --> 00:02:03,520 is because a lot of you are probably big open source guys, 32 00:02:04,420 --> 00:02:08,100 and you understand the dangers and the pitfalls of closed source software. 33 00:02:09,200 --> 00:02:15,200 But a lot of us easily accept, almost as a cost of doing business, closed source hardware. 34 00:02:16,220 --> 00:02:18,840 Using hardware that you basically understand nothing about, 35 00:02:19,040 --> 00:02:22,500 have no data sheets for, maybe you don't even know its function. 36 00:02:22,500 --> 00:02:27,620 And that's something that is not completely unavoidable like closed source software, 37 00:02:28,300 --> 00:02:31,940 but I think we can make it the kind of strives in hardware 38 00:02:31,940 --> 00:02:35,100 that we've made in the open source community over the last years 39 00:02:35,100 --> 00:02:39,240 and really introduce a whole new level of understanding for hardware for the masses. 40 00:02:43,060 --> 00:02:49,440 So what we're going to be talking about today, specifically to kind of get there, is FPGAs. 41 00:02:51,220 --> 00:02:52,480 You know, I'm sure a lot of you have heard of FPGAs. 42 00:02:52,500 --> 00:02:57,340 A lot of you have put firmware on things, maybe edited firmware, done something custom, 43 00:02:57,500 --> 00:02:59,980 make something do something that it wasn't meant to do. 44 00:03:01,220 --> 00:03:05,680 HDL, Hardware Descriptive Language, basically lets you design the hardware that you want, 45 00:03:05,800 --> 00:03:07,100 not the hardware that you have. 46 00:03:09,580 --> 00:03:11,560 FPGAs are flexible in that way. 47 00:03:13,820 --> 00:03:16,440 So we're actually going to be covering a lot of different things. 48 00:03:17,420 --> 00:03:20,460 I'll be covering basic FPGA and digital technology. 49 00:03:21,320 --> 00:03:24,960 We're actually going to be having contests throughout the thing for giveaways. 50 00:03:25,160 --> 00:03:27,580 We got some FPGA demo boards. 51 00:03:27,780 --> 00:03:29,360 We got some Intel swag. 52 00:03:31,460 --> 00:03:35,220 And we actually have a netbook that we got from Intel to give away. 53 00:03:35,500 --> 00:03:37,140 And that will actually be the last talk there. 54 00:03:37,880 --> 00:03:42,360 We're going to go through the Xilinx software for designing FPGAs. 55 00:03:42,560 --> 00:03:43,800 We're going to show demos for that. 56 00:03:43,940 --> 00:03:47,620 We're going to show GHDL, which is actually an open source way that you can learn how to code 57 00:03:48,520 --> 00:03:49,580 hardware descriptor language. 58 00:03:50,800 --> 00:03:52,540 Then we're going to talk about the EDK, 59 00:03:52,780 --> 00:03:57,480 which is the next level up in far of it's a little bit more extract. 60 00:03:57,740 --> 00:03:59,900 You can actually write C code that runs on an FPGA. 61 00:04:01,000 --> 00:04:02,480 And then we're going to talk about, 62 00:04:03,140 --> 00:04:05,860 Furcon's going to talk about running Linux on an FPGA. 63 00:04:07,460 --> 00:04:10,960 And we're also going to talk about hardware from Altera, 64 00:04:11,140 --> 00:04:15,280 or actually software from Altera and some hardware demo board that they sent us. 65 00:04:15,600 --> 00:04:18,300 And at the very end we'll announce who won the netbook. 66 00:04:19,580 --> 00:04:21,840 So let's start out with what is an FPGA. 67 00:04:22,080 --> 00:04:26,420 So an FPGA is a, obviously it's a semiconductor, it's a chip, 68 00:04:26,560 --> 00:04:32,400 but specifically it's a field programmable gate array that contains logic blocks that can be reconfigured. 69 00:04:33,340 --> 00:04:38,660 This basically allows an FPGA to be any kind of device you can imagine, 70 00:04:38,780 --> 00:04:41,660 obviously within the constraints of the actual FPGA itself. 71 00:04:42,180 --> 00:04:44,600 There is speed limits, there is complexity limits, 72 00:04:44,840 --> 00:04:47,560 and the more you spend on an FPGA, 73 00:04:47,680 --> 00:04:49,560 the more you'll basically get out of it. 74 00:04:51,920 --> 00:04:56,000 FPGA design covers, modern FPGA design, 75 00:04:56,200 --> 00:04:59,600 this is kind of new, actually covers hardware and software design. 76 00:04:59,960 --> 00:05:02,100 So that's why I started talking about the EDK. 77 00:05:02,260 --> 00:05:05,120 You can actually write C code that runs on a microprocessor 78 00:05:05,120 --> 00:05:08,860 that you actually instantiated on the chip. 79 00:05:12,560 --> 00:05:15,500 And so if you're not familiar with FPGAs, 80 00:05:15,540 --> 00:05:17,220 you may not know that there are a lot of different things. 81 00:05:18,580 --> 00:05:20,960 If you have Verizon Fios, 82 00:05:21,160 --> 00:05:23,700 every one of your set-top boxes has an Altera FPGA, 83 00:05:23,840 --> 00:05:25,880 even in the HD boxes. 84 00:05:27,640 --> 00:05:29,940 Lots of networking equipment uses FPGAs, 85 00:05:30,000 --> 00:05:31,700 and the reason why they do that is for flexibility. 86 00:05:32,180 --> 00:05:35,180 A lot of times you'll have a card that'll plug into the front, 87 00:05:35,280 --> 00:05:36,520 and on the back plane, 88 00:05:36,820 --> 00:05:42,880 they'll actually have FPGAs that basically allow it to be a totally different networking standard. 89 00:05:45,080 --> 00:05:46,860 Also boring things, even like printers, 90 00:05:46,860 --> 00:05:47,840 printers have FPGAs. 91 00:05:51,880 --> 00:05:54,300 Another talk going on right now is the GNU radio talk. 92 00:05:54,500 --> 00:05:57,620 Pretty much every software-defined radio, or most really good ones, 93 00:05:57,700 --> 00:05:59,840 have a FPGA on them, 94 00:05:59,920 --> 00:06:01,940 and lots of analog digital converters. 95 00:06:03,020 --> 00:06:04,180 Digital to analog, actually. 96 00:06:05,240 --> 00:06:08,300 And even like large integrated systems like an F22, 97 00:06:08,600 --> 00:06:11,360 you might think, well, they have the budget to design their own chips. 98 00:06:11,580 --> 00:06:13,040 They don't have to use Phil Gramel chips. 99 00:06:13,220 --> 00:06:16,200 But actually, the flexibility that FPGAs give you, 100 00:06:16,200 --> 00:06:19,300 they'll even use them on projects that you have a large budget for, 101 00:06:19,480 --> 00:06:20,860 so you can find them there. 102 00:06:21,000 --> 00:06:24,420 And one of the other uses for FPGAs is hardware accelerator cards. 103 00:06:25,640 --> 00:06:27,800 ShmooCon is actually a hacker conference out in DC, 104 00:06:28,880 --> 00:06:34,820 and a couple years ago a guy gave a talk on cracking WEP and WPA keys with FPGAs. 105 00:06:35,560 --> 00:06:39,660 And you can see the speed up there between, 106 00:06:39,860 --> 00:06:42,640 this is just running on a PC, there's two different processors. 107 00:06:43,440 --> 00:06:44,480 There's a PS3, 108 00:06:44,480 --> 00:06:47,760 which has actually like six, what they call SPUs, 109 00:06:47,760 --> 00:06:48,760 for doing parallel processing. 110 00:06:49,220 --> 00:06:52,300 And there's actually a fairly middle-of-the-road, 111 00:06:52,420 --> 00:06:53,580 kind of low-end FPGA, 112 00:06:53,760 --> 00:06:55,740 and that's how many keys it's able to get through. 113 00:06:56,040 --> 00:06:57,260 And the same story with WPA. 114 00:06:58,980 --> 00:07:02,940 There's actually two different models of complexity of FPGAs. 115 00:07:03,040 --> 00:07:05,160 They're just basically about the same size, 116 00:07:05,200 --> 00:07:08,660 but they have more parallel units in them that you can take advantage of. 117 00:07:09,840 --> 00:07:13,760 So FPGAs can basically help you a lot, 118 00:07:13,760 --> 00:07:14,760 in that kind of sense. 119 00:07:15,020 --> 00:07:17,340 So what are your choices for digital system development? 120 00:07:18,160 --> 00:07:21,100 Well, you can get a high-end processor. 121 00:07:21,820 --> 00:07:23,720 They're really easy to write code for. 122 00:07:23,980 --> 00:07:28,860 I mean, there's endless languages and endless environments 123 00:07:28,860 --> 00:07:30,520 that you can code for processors. 124 00:07:31,520 --> 00:07:33,520 The newest and the best ones are expensive. 125 00:07:34,580 --> 00:07:37,140 The performance, when I say okay, 126 00:07:37,320 --> 00:07:40,460 what I mean is normally on a processor you're not utilizing the whole thing. 127 00:07:40,600 --> 00:07:42,920 Even if you're utilizing all the cores in your modern processor, 128 00:07:42,920 --> 00:07:45,300 there's a lot of units that are sitting there unused, 129 00:07:45,820 --> 00:07:49,540 and they can be fairly power-hungry when you're actually using them. 130 00:07:49,940 --> 00:07:53,900 Of course, they've come a long way with sleeping for laptops, 131 00:07:54,140 --> 00:07:55,980 being able to get a lot more hours out of your usage. 132 00:07:56,480 --> 00:07:58,920 And then there's something kind of new, actually, 133 00:07:58,960 --> 00:08:00,340 that's coming up in the next couple of years, 134 00:08:00,400 --> 00:08:01,660 is specialized parallel hardware. 135 00:08:01,840 --> 00:08:03,360 Of course, OpenGL has been around forever, 136 00:08:04,140 --> 00:08:06,820 but that was very specific usage. 137 00:08:06,940 --> 00:08:09,900 That allowed you to do massively parallel video systems. 138 00:08:10,420 --> 00:08:12,460 So, you know, basically playing games, 139 00:08:12,920 --> 00:08:14,260 doing 2D, 3D rendering. 140 00:08:15,080 --> 00:08:19,120 But something new, kind of, is NVIDIA came out with CUDA, 141 00:08:19,800 --> 00:08:22,200 and it got standardized around OpenCL. 142 00:08:23,160 --> 00:08:26,780 And what that allows you to do is basically bring the power 143 00:08:26,780 --> 00:08:30,160 of the parallel processor of a video card into the desktop world, 144 00:08:30,260 --> 00:08:33,560 so that you can basically take advantage of the hundreds 145 00:08:33,560 --> 00:08:36,560 of different parallel processing units on a video card 146 00:08:36,560 --> 00:08:41,020 to basically do operations that are not very single-threaded. 147 00:08:41,020 --> 00:08:44,060 And if you know that next to the processor, 148 00:08:44,120 --> 00:08:46,320 these things can be, like, pretty hefty power, 149 00:08:46,380 --> 00:08:48,500 power-hungry monsters, too, actually. 150 00:08:50,500 --> 00:08:53,760 But what you're somewhat restricted is the structure. 151 00:08:54,020 --> 00:08:56,660 They're still fundamentally designed for doing video card stuff. 152 00:08:57,040 --> 00:09:01,140 So if your parallel problem can be fit into that kind of problem, 153 00:09:01,300 --> 00:09:01,880 then they're great. 154 00:09:02,020 --> 00:09:05,320 But if not, then you're going to run into some flexibility problems. 155 00:09:05,520 --> 00:09:09,660 So that's actually kind of exciting. 156 00:09:09,820 --> 00:09:10,580 And for a lot of people, 157 00:09:10,580 --> 00:09:12,280 that's going to bring a lot of parallel performance 158 00:09:12,280 --> 00:09:14,560 to computers over the next couple years. 159 00:09:15,140 --> 00:09:17,460 And actually, the next option here is an ASIC, 160 00:09:17,540 --> 00:09:19,060 which, that's basically a custom chip. 161 00:09:19,280 --> 00:09:22,360 So big companies who do high volume, they design their own chips 162 00:09:22,360 --> 00:09:24,040 that do exactly what they want them to do. 163 00:09:25,100 --> 00:09:26,360 They're very high performance. 164 00:09:26,560 --> 00:09:28,820 They're basically the best performance you get. 165 00:09:28,920 --> 00:09:31,760 The entire chip is optimized for doing one specific thing 166 00:09:31,760 --> 00:09:33,800 or a few specific things very well. 167 00:09:34,660 --> 00:09:37,540 They're expensive to manufacture unless you're making millions of them. 168 00:09:38,280 --> 00:09:40,140 So in that sense, they're kind of out of the reach 169 00:09:40,580 --> 00:09:40,980 of the individual. 170 00:09:41,700 --> 00:09:43,840 And then there's FPGAs. 171 00:09:44,000 --> 00:09:46,380 So once you buy them, you program them. 172 00:09:46,520 --> 00:09:48,900 They're obviously easier to design. 173 00:09:49,220 --> 00:09:53,940 They're high performance if your problem can be parallelized, that is. 174 00:09:54,100 --> 00:09:58,880 And for doing the same job, they're lower power than a processor. 175 00:10:01,760 --> 00:10:09,420 So in embedded design, an FPGA pretty much can do all of this area, 176 00:10:09,420 --> 00:10:13,540 all of its, and you can even do it within the FPGA design tools. 177 00:10:14,680 --> 00:10:16,840 You can substitute out parts that you want there. 178 00:10:17,120 --> 00:10:20,560 But fundamentally, the only layer you're not messing with 179 00:10:20,560 --> 00:10:23,180 is basically making the PCB board that you actually put them on. 180 00:10:23,540 --> 00:10:26,900 And, of course, you can do that too, but that's up to you. 181 00:10:27,200 --> 00:10:30,280 And so FPGAs is kind of very vertical in that sense 182 00:10:30,280 --> 00:10:34,980 where you can do a lot all the way from the bottom to the top. 183 00:10:36,840 --> 00:10:39,400 So when you design FPGAs, 184 00:10:39,420 --> 00:10:41,460 you start out with what you want to do. 185 00:10:41,560 --> 00:10:42,840 You can either actually enter a schematic. 186 00:10:43,060 --> 00:10:45,060 You can actually have the series of digital logic gates 187 00:10:45,060 --> 00:10:46,340 that you actually want to make. 188 00:10:46,700 --> 00:10:49,620 You take them, and you can actually put them in a schematic, 189 00:10:49,780 --> 00:10:51,380 or you can write HDL source code. 190 00:10:52,160 --> 00:10:54,380 And then you have a series of tools, basically. 191 00:10:54,980 --> 00:10:57,800 These tools are kind of like they have analogs in the real world. 192 00:10:57,880 --> 00:11:01,320 That's basically like logic analyzers and things like that 193 00:11:01,320 --> 00:11:05,740 that basically make you to be able to debug your very complicated designs. 194 00:11:07,100 --> 00:11:08,700 And the way you test them, 195 00:11:09,960 --> 00:11:11,700 is you use test benches. 196 00:11:11,900 --> 00:11:12,940 And this is a lot like... 197 00:11:13,740 --> 00:11:16,620 Actually, a lot of you who've learned coding over the last couple years, 198 00:11:16,740 --> 00:11:19,020 this is like a big thing they do now, test-oriented programming. 199 00:11:20,220 --> 00:11:22,920 And there's basically two big languages in HDL. 200 00:11:23,000 --> 00:11:24,380 There's VHDL and Verilog. 201 00:11:25,800 --> 00:11:28,100 So let's start out with something fairly simple. 202 00:11:28,160 --> 00:11:29,720 If you've never seen VHDL before, 203 00:11:29,820 --> 00:11:32,080 I'm going to try to walk you through it. 204 00:11:33,140 --> 00:11:36,780 This is basically kind of in C, kind of the libraries you're using. 205 00:11:36,940 --> 00:11:39,400 There's only a couple standard libraries that come with HDL. 206 00:11:39,420 --> 00:11:41,740 They basically do some simple things, 207 00:11:41,840 --> 00:11:45,000 like you can do adding and handle certain data types. 208 00:11:46,280 --> 00:11:48,540 This here you can think of as like the .h file. 209 00:11:48,760 --> 00:11:53,400 This kind of says like what basically inputs and outputs you have 210 00:11:53,400 --> 00:11:54,660 out of a digital entity. 211 00:11:55,360 --> 00:11:58,240 And you can see here that we have an A, B, C, D 212 00:11:58,700 --> 00:11:59,940 that are both inputs. 213 00:12:00,220 --> 00:12:02,980 They are single bit, which is why they're standard logic. 214 00:12:03,240 --> 00:12:06,720 You have S there, which is actually a vector. 215 00:12:06,860 --> 00:12:08,040 You can think of that as like an array. 216 00:12:08,040 --> 00:12:09,540 Pretty much the same thing. 217 00:12:09,660 --> 00:12:10,900 It's actually only two bits, 218 00:12:11,020 --> 00:12:12,700 but you can see those two bits right there. 219 00:12:13,060 --> 00:12:14,760 And this is the output. 220 00:12:15,020 --> 00:12:16,760 So this is a four to one mux. 221 00:12:16,980 --> 00:12:20,400 So basically you put your signals coming in here, 222 00:12:20,520 --> 00:12:22,300 and then you select them with these S bits, 223 00:12:22,460 --> 00:12:23,640 and then you get out what's on Z. 224 00:12:24,160 --> 00:12:24,860 Pretty simple. 225 00:12:25,100 --> 00:12:27,900 And this is actually the code for the HDL. 226 00:12:28,000 --> 00:12:31,280 So this is what they call architecture in VHDL. 227 00:12:33,080 --> 00:12:35,240 And so basically you can see the cases here. 228 00:12:35,340 --> 00:12:37,500 If it's 00 on the select bits, 229 00:12:37,500 --> 00:12:38,300 you'll get A. 230 00:12:38,500 --> 00:12:41,040 If it's 01, you'll get B. 231 00:12:42,040 --> 00:12:44,140 You could either say 11 or others here. 232 00:12:44,300 --> 00:12:46,660 This is kind of like whether you have an else 233 00:12:46,660 --> 00:12:48,520 or just a series of ifs. 234 00:12:49,120 --> 00:12:52,220 And the most important thing here is this code is not, 235 00:12:52,780 --> 00:12:54,780 if there was more code here, it would be more clear, 236 00:12:54,860 --> 00:12:56,880 but this code is not executed sequentially. 237 00:12:57,080 --> 00:12:57,900 This is not like C. 238 00:12:58,140 --> 00:13:00,620 This actually happens in parallel on all of them 239 00:13:00,620 --> 00:13:01,520 at the same time. 240 00:13:01,740 --> 00:13:05,400 So this line up here, process, is actually pretty important. 241 00:13:05,600 --> 00:13:07,380 Even if you don't have it here, it's kind of implied. 242 00:13:07,500 --> 00:13:11,400 Process actually says when any of these things change, 243 00:13:11,800 --> 00:13:15,540 this code, so to speak, should re-execute. 244 00:13:15,740 --> 00:13:17,980 Or in other words, the output should change. 245 00:13:18,320 --> 00:13:25,200 So this is actually how you control when a new value comes in. 246 00:13:25,300 --> 00:13:27,060 You could also have a clock. 247 00:13:27,340 --> 00:13:29,640 This is actually asynchronous logic, 248 00:13:29,740 --> 00:13:30,760 which means it has no clock. 249 00:13:31,740 --> 00:13:34,100 This is the other language called Verilog. 250 00:13:34,180 --> 00:13:36,080 Very similar idea, same implementation. 251 00:13:36,080 --> 00:13:39,460 Here's the basically structure of what's inputs, what's outputs, 252 00:13:39,640 --> 00:13:40,260 what's the variable. 253 00:13:40,880 --> 00:13:43,340 Over here, you have the same implementation. 254 00:13:43,760 --> 00:13:44,840 This might be a little confusing, 255 00:13:44,980 --> 00:13:52,780 but what this actually says is base two, what this is and that, 256 00:13:52,980 --> 00:13:55,040 and whether those match and whether you get A, B, C, D. 257 00:13:55,220 --> 00:13:56,120 Same idea, though. 258 00:13:56,220 --> 00:13:59,820 And look, there's actually the equivalent line to process. 259 00:14:00,140 --> 00:14:03,380 You have that in Verilog right there. 260 00:14:04,780 --> 00:14:06,060 So after you write your code, 261 00:14:06,080 --> 00:14:08,040 you actually synthesize it. 262 00:14:08,140 --> 00:14:09,800 And what that actually means is when it takes it 263 00:14:09,800 --> 00:14:12,220 and it actually puts it into a series of gates 264 00:14:12,220 --> 00:14:14,920 that actually implement what you are trying to design. 265 00:14:15,800 --> 00:14:17,320 And then you take those pieces, 266 00:14:17,680 --> 00:14:19,440 those logical blocks that you've developed, 267 00:14:19,580 --> 00:14:20,700 and then you connect them together 268 00:14:22,080 --> 00:14:24,000 into pieces that function together. 269 00:14:25,600 --> 00:14:28,100 And so that's actually called the netlist. 270 00:14:30,800 --> 00:14:33,540 The next thing you do is implement your design. 271 00:14:33,760 --> 00:14:35,880 So now that you've actually kind of 272 00:14:36,080 --> 00:14:37,020 compiled it, if you will, 273 00:14:37,100 --> 00:14:37,820 you actually have to say, 274 00:14:37,900 --> 00:14:39,760 well, this is going on a specific FPGA. 275 00:14:39,980 --> 00:14:42,800 This FPGA has this resources available to you. 276 00:14:42,880 --> 00:14:45,580 And how do I map that design onto these resources? 277 00:14:45,880 --> 00:14:49,080 For example, some FPGAs have digital adders on them. 278 00:14:49,860 --> 00:14:51,680 Some of them have a limited number of them. 279 00:14:51,760 --> 00:14:53,920 But an adder can also be made up of a series 280 00:14:53,920 --> 00:14:55,040 of more basic gates. 281 00:14:55,180 --> 00:14:56,860 So this is going to take your design 282 00:14:56,860 --> 00:14:58,880 and actually put it onto a real FPGA. 283 00:15:00,400 --> 00:15:02,180 This is actually compiling it, you know, 284 00:15:02,180 --> 00:15:03,280 for a specific architecture. 285 00:15:03,440 --> 00:15:04,540 It would kind of be the same idea 286 00:15:04,540 --> 00:15:07,800 if you're taking these C analysts of things. 287 00:15:08,180 --> 00:15:10,420 And the place and route is pretty important. 288 00:15:10,540 --> 00:15:12,560 That actually is how you connect 289 00:15:12,560 --> 00:15:14,520 the different logical pieces on your board 290 00:15:14,520 --> 00:15:15,520 to other pieces. 291 00:15:16,620 --> 00:15:19,060 And one more important thing is eventually 292 00:15:19,060 --> 00:15:20,680 you're going to be outside of the FPGA, 293 00:15:20,860 --> 00:15:22,880 and then you need to know your IO standards 294 00:15:22,880 --> 00:15:24,120 of what you're interfacing with. 295 00:15:24,240 --> 00:15:25,740 Actually, that's something you need to consider 296 00:15:25,740 --> 00:15:27,800 before you even select an FPGA is, 297 00:15:27,900 --> 00:15:31,000 does this have the number of IO pins I need 298 00:15:31,000 --> 00:15:32,460 to be able to do what I want to do? 299 00:15:32,680 --> 00:15:34,380 And most of the time, 300 00:15:35,100 --> 00:15:38,460 you cannot mix different IO standards 301 00:15:38,460 --> 00:15:39,540 on what they call a bank, 302 00:15:39,700 --> 00:15:41,340 which is a grouping of IO pins. 303 00:15:41,780 --> 00:15:43,580 And so you need to kind of plan out 304 00:15:43,580 --> 00:15:45,360 before you select an FPGA 305 00:15:45,360 --> 00:15:47,240 which one that you're actually going to go with 306 00:15:47,240 --> 00:15:48,840 and make sure it does and has 307 00:15:48,840 --> 00:15:50,200 the number of output pins you need. 308 00:15:51,000 --> 00:15:52,440 And actually, what I wanted to say here 309 00:15:52,440 --> 00:15:54,380 is that each step where it actually is getting closer 310 00:15:54,380 --> 00:15:55,180 to the real implementation, 311 00:15:55,660 --> 00:15:57,960 you're actually getting more real world numbers in here. 312 00:15:58,140 --> 00:16:00,780 For example, after mapping, 313 00:16:01,120 --> 00:16:02,360 you'll have what they call 314 00:16:02,360 --> 00:16:04,280 a clock to state propagation 315 00:16:04,540 --> 00:16:05,940 delay of 1.2 nanoseconds. 316 00:16:06,000 --> 00:16:06,600 Well, what does that mean? 317 00:16:06,680 --> 00:16:08,320 Well, that means after you change the inputs, 318 00:16:08,580 --> 00:16:10,080 when do the outputs come out to the place 319 00:16:10,080 --> 00:16:11,120 where you expect them to be? 320 00:16:11,580 --> 00:16:13,820 And then as you get farther to the actual real design, 321 00:16:14,000 --> 00:16:15,040 this is actually going to increase. 322 00:16:16,220 --> 00:16:18,820 So this thing has so many gates in it, 323 00:16:18,900 --> 00:16:20,620 and how long does it take to get 324 00:16:20,620 --> 00:16:22,000 from the input side to the output side? 325 00:16:22,120 --> 00:16:23,620 Well then, how long does it take to get 326 00:16:23,620 --> 00:16:26,400 from where it's outputted to the next component 327 00:16:26,400 --> 00:16:28,000 that it's going to go to 328 00:16:28,000 --> 00:16:30,040 to get maybe to the other side of the FPGA? 329 00:16:30,440 --> 00:16:32,360 And of course, you're talking nanoseconds here, 330 00:16:34,540 --> 00:16:36,200 about numbers that matter for high speed. 331 00:16:36,440 --> 00:16:37,960 Then once you get your design ready, 332 00:16:38,060 --> 00:16:39,860 you're actually going to have to program your FPGA. 333 00:16:39,980 --> 00:16:41,940 There's a lot of ways to program an FPGA. 334 00:16:42,160 --> 00:16:43,460 There's JTAG, USB, 335 00:16:43,920 --> 00:16:45,420 you can program it with Flash, 336 00:16:45,640 --> 00:16:47,240 you can have other kinds of programmable memory. 337 00:16:48,760 --> 00:16:51,280 You can have an FPGA program on boot. 338 00:16:51,500 --> 00:16:52,640 Some FPGAs, 339 00:16:52,700 --> 00:16:55,200 you can actually reprogram parts of them 340 00:16:55,200 --> 00:16:57,420 while they're running in some FPGAs 341 00:16:57,420 --> 00:16:58,360 if you look for those features. 342 00:16:58,640 --> 00:17:00,100 So you can dynamically adjust 343 00:17:00,100 --> 00:17:01,520 what actual digital circuits 344 00:17:01,520 --> 00:17:02,460 you're actually implementing 345 00:17:04,540 --> 00:17:05,300 in those modes, basically, 346 00:17:06,260 --> 00:17:08,400 without actually affecting 347 00:17:08,400 --> 00:17:10,000 the other side of the FPGA. 348 00:17:12,340 --> 00:17:14,160 And the rest of the talk 349 00:17:14,160 --> 00:17:15,340 is actually going to be, 350 00:17:15,380 --> 00:17:17,800 we're going to go through different softwares, 351 00:17:17,820 --> 00:17:18,520 hands-on demos. 352 00:17:19,460 --> 00:17:21,160 It's basically the same idea, 353 00:17:21,320 --> 00:17:23,560 but it's going to be on different implementations 354 00:17:23,560 --> 00:17:25,840 or different companies do things, 355 00:17:25,920 --> 00:17:26,940 call things different things. 356 00:17:27,200 --> 00:17:30,160 We're going to go through writing some simple VHDL, 357 00:17:30,220 --> 00:17:32,360 writing some C code for, 358 00:17:32,500 --> 00:17:33,820 well, not so much writing a C code, 359 00:17:34,540 --> 00:17:35,440 but you would use the EDK. 360 00:17:36,280 --> 00:17:37,900 And as a part of that, 361 00:17:38,000 --> 00:17:40,080 you actually see how to do high-speed interconnects 362 00:17:40,080 --> 00:17:41,060 between functional units. 363 00:17:41,640 --> 00:17:43,360 And I also want to say that you can get one of these 364 00:17:43,360 --> 00:17:45,100 demo boards for less than $100, 365 00:17:45,220 --> 00:17:47,840 and you can spend a lot more on them also, 366 00:17:47,980 --> 00:17:49,020 just pretty much like anything. 367 00:17:49,440 --> 00:17:51,340 And we actually have a demo board over there 368 00:17:51,340 --> 00:17:53,740 that actually has a touch interface 369 00:17:53,740 --> 00:17:55,280 and a 5 megapixel camera, 370 00:17:55,460 --> 00:17:56,780 which is actually pretty cool. 371 00:17:57,380 --> 00:17:58,660 And like I said, 372 00:17:59,460 --> 00:18:01,520 we have some stuff that we'll be giving away, too. 373 00:18:02,800 --> 00:18:03,240 So, 374 00:18:04,540 --> 00:18:05,780 I think that's it for me. 375 00:18:06,080 --> 00:18:07,620 Now we're actually going to go to 376 00:18:07,620 --> 00:18:09,800 the Xilinx ISC. 377 00:18:10,060 --> 00:18:12,420 A contest, okay. 378 00:18:12,860 --> 00:18:14,420 So we're going to switch here. 379 00:18:16,300 --> 00:18:17,420 There'll be a lot of switching. 380 00:18:21,660 --> 00:18:29,660 Hello, everyone. 381 00:18:29,820 --> 00:18:31,160 I am Corey Lang. 382 00:18:31,320 --> 00:18:33,160 I'm an undergraduate at the University of Delaware. 383 00:18:34,540 --> 00:18:36,000 And I'm going to be the one 384 00:18:36,000 --> 00:18:38,360 who's giving away stuff today. 385 00:18:38,540 --> 00:18:39,880 So, can you see me? 386 00:18:40,840 --> 00:18:41,380 That's right. 387 00:18:43,600 --> 00:18:44,480 Yay, me. 388 00:18:46,680 --> 00:18:47,120 Okay. 389 00:18:47,440 --> 00:18:48,900 Let me get this thing up here. 390 00:18:49,960 --> 00:18:51,020 See it, maybe. 391 00:18:52,560 --> 00:18:53,000 Something. 392 00:18:54,640 --> 00:18:56,020 Did anyone read that really quick? 393 00:18:56,460 --> 00:18:56,900 Okay. 394 00:18:57,720 --> 00:18:59,800 So, how the contest is going to work. 395 00:18:59,900 --> 00:19:01,300 We're going to put a question up on the screen. 396 00:19:01,580 --> 00:19:03,100 You're going to have about five minutes 397 00:19:04,540 --> 00:19:05,720 of a claim password 398 00:19:05,720 --> 00:19:07,300 that you're going to have to come up 399 00:19:07,300 --> 00:19:08,200 so we don't have, you know, 400 00:19:08,240 --> 00:19:09,900 five people named Spartacus coming up 401 00:19:09,900 --> 00:19:11,120 trying to claim the same thing. 402 00:19:11,300 --> 00:19:13,240 And your answer on a contest form. 403 00:19:14,520 --> 00:19:16,740 People, my lovely cohorts, 404 00:19:16,780 --> 00:19:18,000 all wearing Seaborg t-shirts 405 00:19:18,000 --> 00:19:18,900 will be handing out slips 406 00:19:18,900 --> 00:19:20,220 and collecting them when you're done. 407 00:19:20,860 --> 00:19:22,820 And we will draw the winning slip 408 00:19:22,820 --> 00:19:24,200 from the correct answers. 409 00:19:24,320 --> 00:19:25,460 So it's kind of a lottery, 410 00:19:25,640 --> 00:19:27,260 but you have to get the question right to be entered. 411 00:19:28,240 --> 00:19:29,700 The winner will be announced 412 00:19:29,700 --> 00:19:31,060 and you'll get your prize at the start 413 00:19:31,060 --> 00:19:32,220 of the next contest session. 414 00:19:33,300 --> 00:19:35,100 And, disclaimer, we reserve right 415 00:19:35,100 --> 00:19:36,500 to be judge, jury, executioner 416 00:19:36,500 --> 00:19:38,600 in all contest matters and decisions. 417 00:19:40,060 --> 00:19:41,380 Also, you can take this time. 418 00:19:41,560 --> 00:19:43,120 We'll be having four of these 419 00:19:43,120 --> 00:19:45,320 throughout the talk 420 00:19:45,320 --> 00:19:46,260 since it's a three hour talk. 421 00:19:46,380 --> 00:19:47,800 Stretch your legs, get up, move around. 422 00:19:48,080 --> 00:19:50,300 But don't go anywhere because there's a lot of cool stuff. 423 00:19:51,160 --> 00:19:53,340 So, up for grabs on this first contest 424 00:19:53,340 --> 00:19:55,380 we have a Spartan 3e FPGA 425 00:19:55,380 --> 00:19:56,040 demo board. 426 00:19:57,260 --> 00:19:58,640 And some Intel swag, 427 00:19:58,700 --> 00:20:00,220 some travel mugs, and t-shirts. 428 00:20:00,900 --> 00:20:01,420 So, 429 00:20:02,480 --> 00:20:05,140 some of the Seaborg people 430 00:20:05,140 --> 00:20:06,820 will be around handing out entry slips. 431 00:20:07,320 --> 00:20:09,220 And the question for the first 432 00:20:09,220 --> 00:20:09,960 contest is, 433 00:20:10,500 --> 00:20:12,900 what is the approximate visible bandwidth 434 00:20:12,900 --> 00:20:13,860 of the human eye? 435 00:20:14,920 --> 00:20:16,220 So you guys have about 436 00:20:16,940 --> 00:20:19,000 ten minutes, five, ten minutes 437 00:20:19,000 --> 00:20:20,640 to answer questions and 438 00:20:21,260 --> 00:20:22,920 we'll let you know when the contest is closed. 439 00:20:25,980 --> 00:20:26,500 Okay. 440 00:20:27,400 --> 00:20:29,540 Just raise your hand if you want a contest slip. 441 00:20:29,680 --> 00:20:30,520 We'll be walking all around. 442 00:20:30,680 --> 00:20:32,580 And we'll have a lot of people walking around. 443 00:20:43,120 --> 00:20:44,060 While we're waiting, 444 00:20:44,260 --> 00:20:46,160 do any of you have any questions about the first question? 445 00:20:46,160 --> 00:20:48,440 Yeah, if anyone has any questions, stand up. 446 00:20:48,880 --> 00:20:50,520 Stand up, because we already have hands up. 447 00:20:51,980 --> 00:20:52,960 Unless you want to raise 448 00:20:52,960 --> 00:20:54,940 both hands for a question, I don't know. 449 00:20:54,940 --> 00:20:56,980 That would be a little hard to... 450 00:20:59,560 --> 00:21:00,600 For this? 451 00:21:01,000 --> 00:21:02,500 Units. Give it in 452 00:21:02,500 --> 00:21:03,260 Hertz. 453 00:21:03,980 --> 00:21:05,420 Give it in some kind of frequency. 454 00:21:06,960 --> 00:21:07,740 Preferably Hertz. 455 00:21:09,280 --> 00:21:10,820 Or some, you know, 456 00:21:10,840 --> 00:21:12,660 scientific prefix with Hertz. 457 00:21:14,560 --> 00:21:16,240 Nanometers is not okay. That's a wavelength. 458 00:21:25,180 --> 00:21:25,900 Oh, we're not. 459 00:21:26,220 --> 00:21:27,320 No, right, right, right. 460 00:21:40,440 --> 00:21:44,740 Well, the presentation should already be up, right? 461 00:21:44,900 --> 00:21:45,600 It's already on. 462 00:21:48,220 --> 00:21:53,080 Yeah, you're moving yourself. 463 00:21:54,940 --> 00:21:56,920 Why don't you guys get ready for... 464 00:22:03,920 --> 00:22:06,100 Do all of you have the question memorized? 465 00:22:06,200 --> 00:22:08,380 Can we change the picture? 466 00:22:08,980 --> 00:22:09,680 All right. 467 00:22:10,700 --> 00:22:11,220 Cool. 468 00:22:22,700 --> 00:22:24,480 There it is. Sorry. 469 00:22:26,740 --> 00:22:27,640 Let's give it a minute. 470 00:22:30,660 --> 00:22:31,620 It is. 471 00:22:32,100 --> 00:22:34,140 There are some people over there. 472 00:22:36,640 --> 00:22:38,500 You don't have to do that, I think. 473 00:22:45,720 --> 00:22:47,360 It is a clone. 474 00:22:50,640 --> 00:22:52,200 There are people on the... 475 00:22:54,120 --> 00:22:54,600 Josh. 476 00:22:54,940 --> 00:22:55,500 Josh. 477 00:23:18,960 --> 00:23:24,240 Well, now... Well, don't they... 478 00:23:24,940 --> 00:23:25,580 It just gets to... 479 00:23:25,580 --> 00:23:26,500 Okay. 480 00:23:27,440 --> 00:23:27,920 Six. 481 00:23:28,680 --> 00:23:31,440 Four minutes. Oh, one more minute. 482 00:23:32,440 --> 00:23:34,120 One more minute. Huh? 483 00:23:35,040 --> 00:23:36,600 Yeah, that way we can... 484 00:23:36,600 --> 00:23:38,320 Because the award will take an extra minute. 485 00:23:38,740 --> 00:23:39,260 Well, one time. 486 00:23:39,340 --> 00:23:39,800 Okay. 487 00:23:41,320 --> 00:23:42,780 So how do we collect them? 488 00:23:42,880 --> 00:23:44,680 Did you tell them how to collect them? 489 00:23:44,980 --> 00:23:47,540 I was already collecting them. 490 00:23:48,020 --> 00:23:49,980 Tell them to just start... 491 00:23:50,640 --> 00:23:52,100 Tell them to start passing them 492 00:23:52,100 --> 00:23:53,160 just so people can see them for sure. 493 00:23:53,320 --> 00:23:53,940 Okay. Yeah. 494 00:23:56,360 --> 00:23:57,660 What was our meeting time? 495 00:23:59,900 --> 00:24:01,240 About half an hour, yeah? 496 00:24:01,860 --> 00:24:04,440 About half an hour, yeah? 497 00:24:05,840 --> 00:24:07,240 He's collecting his scans right now. 498 00:24:07,360 --> 00:24:07,500 Of course. 499 00:24:10,200 --> 00:24:10,720 We're fine. 500 00:24:10,880 --> 00:24:11,840 You can tell them. 501 00:24:12,020 --> 00:24:13,820 You might tell them that they can do it. 502 00:24:13,900 --> 00:24:14,760 I mean, explain. 503 00:24:19,120 --> 00:24:19,520 Let's see. 504 00:24:20,320 --> 00:24:21,020 Turn it over. 505 00:24:22,100 --> 00:24:23,680 But not whenever they want to, right? 506 00:24:32,080 --> 00:24:33,960 If you got an answer, keep your hands up 507 00:24:33,960 --> 00:24:34,700 and we'll get to you. 508 00:24:34,780 --> 00:24:36,240 I think we're gonna start the next one now. 509 00:24:37,160 --> 00:24:38,800 All right. Cool. 510 00:24:41,000 --> 00:24:41,600 Hi, everybody. 511 00:24:41,760 --> 00:24:42,740 My name's Tyrell, 512 00:24:42,880 --> 00:24:44,700 and Ryan's gonna be giving a demo. 513 00:24:46,260 --> 00:24:49,720 So we're gonna be talking about the Xilinx IC a little bit. 514 00:24:51,200 --> 00:24:51,560 So... 515 00:24:52,100 --> 00:24:53,200 So a basic overview of the IC 516 00:24:53,200 --> 00:24:55,720 is it's the program that 517 00:24:56,200 --> 00:24:57,800 takes your VHDL, 518 00:24:57,880 --> 00:24:58,680 your Verilog, 519 00:24:58,680 --> 00:25:01,220 your schematics, 520 00:25:01,320 --> 00:25:04,100 and it will turn it into... 521 00:25:04,100 --> 00:25:05,860 It'll give you the tools needed to turn it into something 522 00:25:05,860 --> 00:25:07,400 that your FPGA will understand. 523 00:25:07,520 --> 00:25:08,420 It'll turn it into a bit file. 524 00:25:09,400 --> 00:25:12,020 So the Webpack is completely free. 525 00:25:12,260 --> 00:25:13,600 You can download it at this link. 526 00:25:14,000 --> 00:25:15,440 I believe our slides are gonna be up 527 00:25:15,440 --> 00:25:16,560 on our website. 528 00:25:19,780 --> 00:25:20,920 So here's some... 529 00:25:22,100 --> 00:25:23,920 basic information on the Spartan 3 530 00:25:23,920 --> 00:25:25,420 board we're gonna be demoing. 531 00:25:26,200 --> 00:25:26,800 It's... 532 00:25:26,800 --> 00:25:29,480 It's got the XE3S500E 533 00:25:29,840 --> 00:25:30,780 Spartan FPGA. 534 00:25:32,740 --> 00:25:34,920 232 user I.O. pins. 535 00:25:35,240 --> 00:25:36,500 There's all kinds of 536 00:25:36,500 --> 00:25:37,820 memory with the 537 00:25:37,820 --> 00:25:39,320 PROM, DDR, SDRAM, 538 00:25:39,480 --> 00:25:40,920 NOR flash and SERO flash. 539 00:25:41,240 --> 00:25:42,580 And then some other key things. 540 00:25:42,720 --> 00:25:45,060 It has a BGA display port, 541 00:25:45,420 --> 00:25:47,440 Ethernet, RS-232, 542 00:25:47,640 --> 00:25:48,820 and then some LED switches, 543 00:25:49,180 --> 00:25:50,260 push buttons. 544 00:25:53,520 --> 00:25:54,060 Here's a... 545 00:25:54,060 --> 00:25:55,980 Here's a quick picture showing you 546 00:25:55,980 --> 00:25:57,400 where these things are, so when we give the demo 547 00:25:57,400 --> 00:25:59,600 we're actually gonna be showing the board up on the screen 548 00:25:59,980 --> 00:26:01,840 so you can kind of see what's actually up on there. 549 00:26:06,060 --> 00:26:07,760 So here's the design flow for 550 00:26:08,380 --> 00:26:08,900 DesignLink software. 551 00:26:09,620 --> 00:26:12,100 Basically, to begin with, you plan and budget out your resources. 552 00:26:12,360 --> 00:26:13,560 Make sure you have enough of 553 00:26:14,540 --> 00:26:15,920 lookup tables, flip flops, 554 00:26:17,100 --> 00:26:17,760 serial ports, 555 00:26:18,420 --> 00:26:20,060 Ethernet. Make sure you have everything you need 556 00:26:20,060 --> 00:26:21,900 to actually implement what you're trying to do. 557 00:26:22,300 --> 00:26:23,980 And then, I'm sure a lot of you guys 558 00:26:23,980 --> 00:26:25,780 are programmers, so it's just basically 559 00:26:25,780 --> 00:26:26,380 writing the code. 560 00:26:27,580 --> 00:26:30,320 Then you'll synthesize it 561 00:26:30,320 --> 00:26:31,960 to create the netlist, which 562 00:26:31,960 --> 00:26:34,100 Rodney talked about a little bit, and I'll talk about it a little bit more. 563 00:26:34,820 --> 00:26:35,880 And then you do the 564 00:26:35,880 --> 00:26:36,800 functional simulation, 565 00:26:37,720 --> 00:26:39,880 and implement timing simulation, 566 00:26:40,300 --> 00:26:41,560 make the bit file, and 567 00:26:41,560 --> 00:26:42,700 configure FPGA. 568 00:26:44,980 --> 00:26:45,780 So here's 569 00:26:45,780 --> 00:26:46,940 what the IEC looks like. 570 00:26:47,180 --> 00:26:49,240 It has all the tools you need to 571 00:26:50,060 --> 00:26:51,940 perform all the steps I just showed in 572 00:26:51,940 --> 00:26:53,840 the design flow, which we'll talk about more 573 00:26:53,840 --> 00:26:54,440 in the next couple slides. 574 00:26:55,820 --> 00:26:57,780 It's pretty compact, and 575 00:26:57,780 --> 00:26:59,580 everything's right there for you. 576 00:26:59,680 --> 00:27:00,340 Makes it simple. 577 00:27:02,180 --> 00:27:03,760 So to begin with, 578 00:27:03,820 --> 00:27:05,800 you just take your source type, which can be 579 00:27:05,800 --> 00:27:07,800 schematic, state diagram, 580 00:27:08,860 --> 00:27:09,740 VHDL, Verilog. 581 00:27:09,960 --> 00:27:11,840 You've got tons of options, which you can read on 582 00:27:11,840 --> 00:27:12,480 the side over there. 583 00:27:14,240 --> 00:27:15,120 Then you 584 00:27:15,120 --> 00:27:16,640 have to have a test bench. 585 00:27:17,540 --> 00:27:19,820 The test bench is just basically 586 00:27:20,060 --> 00:27:21,960 a lot of people will test their code 587 00:27:21,960 --> 00:27:23,780 just putting random inputs in, 588 00:27:23,880 --> 00:27:25,940 making sure it comes back out the way 589 00:27:25,940 --> 00:27:28,060 they want it. So that's pretty much what the test bench 590 00:27:28,060 --> 00:27:30,080 is for all of this. 591 00:27:32,700 --> 00:27:34,080 So, like I said, 592 00:27:34,160 --> 00:27:35,860 you have to make a netlist file, which 593 00:27:35,860 --> 00:27:37,820 Xilinx has their own tool. They also have 594 00:27:37,820 --> 00:27:39,880 support for a lot of third party tools, which 595 00:27:39,880 --> 00:27:41,080 can be nice at times. 596 00:27:42,120 --> 00:27:44,040 And so this is the netlist file. 597 00:27:44,680 --> 00:27:45,800 Basically what this is, 598 00:27:45,900 --> 00:27:46,200 is 599 00:27:47,680 --> 00:27:49,880 over here, where you see SW 600 00:27:50,060 --> 00:27:51,820 0-3 and 601 00:27:51,820 --> 00:27:53,420 LED 7-0. 602 00:27:53,780 --> 00:27:55,840 These are the logical names, so kind of like the 603 00:27:55,840 --> 00:27:57,280 variable names that you use in your code. 604 00:27:58,080 --> 00:27:59,900 And these locations here are 605 00:27:59,900 --> 00:28:01,980 the actual spots on the 606 00:28:01,980 --> 00:28:03,900 board, or the traces where it'll hook up to. 607 00:28:04,060 --> 00:28:06,040 So when you see the board later, we'll show 608 00:28:06,040 --> 00:28:07,940 you L13 is right 609 00:28:07,940 --> 00:28:09,800 under one of the switches. So this 610 00:28:09,800 --> 00:28:11,840 netlist file, when you process it, 611 00:28:11,940 --> 00:28:13,680 it gives it, it allows the 612 00:28:14,180 --> 00:28:15,900 FPGA to know whenever we 613 00:28:15,900 --> 00:28:17,000 talk about switch 0, 614 00:28:18,600 --> 00:28:19,480 that signal 615 00:28:20,060 --> 00:28:20,980 will go to L13. 616 00:28:21,740 --> 00:28:23,880 And Ronnie talked about the IO standards. 617 00:28:24,340 --> 00:28:25,740 You have to list those. 618 00:28:26,000 --> 00:28:27,920 For all the ones we're using, we'll be using 619 00:28:27,920 --> 00:28:29,940 LVTTL. And then 620 00:28:29,940 --> 00:28:31,820 these are some other options, 621 00:28:31,860 --> 00:28:33,560 which are specific to whatever 622 00:28:33,560 --> 00:28:34,760 piece of hardware you're using. 623 00:28:39,020 --> 00:28:39,880 So for the 624 00:28:39,880 --> 00:28:41,820 implementation, you 625 00:28:41,820 --> 00:28:43,380 are going to be most likely using 626 00:28:44,050 --> 00:28:45,900 a lot of different pieces of hardware, which 627 00:28:45,900 --> 00:28:47,820 means there could be multiple netlist files. 628 00:28:48,260 --> 00:28:49,940 So to begin with the translating, 629 00:28:50,060 --> 00:28:50,840 you'll take all these 630 00:28:50,840 --> 00:28:53,980 all these netlists and put them together. 631 00:28:54,580 --> 00:28:55,980 This is because they're all going to be 632 00:28:55,980 --> 00:28:57,280 using the same board, same 633 00:28:57,900 --> 00:28:59,960 hardware set, so it makes sense to put them all 634 00:28:59,960 --> 00:29:01,920 together so you can see how they interact. 635 00:29:02,740 --> 00:29:03,720 Then the mapping 636 00:29:03,720 --> 00:29:05,920 is you'll take those logical, from the previous 637 00:29:05,920 --> 00:29:08,140 slide, you'll take the logical, the SW0 638 00:29:08,140 --> 00:29:09,200 or the LED7, 639 00:29:09,680 --> 00:29:11,760 and you'll actually map them to the 640 00:29:11,760 --> 00:29:13,040 trace on the board. 641 00:29:13,980 --> 00:29:15,980 And then you'll actually place them around and make sure 642 00:29:15,980 --> 00:29:16,400 the connections 643 00:29:17,700 --> 00:29:19,340 are good on the chip and 644 00:29:20,320 --> 00:29:21,800 you'll get some timing data and 645 00:29:21,800 --> 00:29:22,680 some reports from that. 646 00:29:25,380 --> 00:29:27,660 So for the configuration, you need to make 647 00:29:27,660 --> 00:29:30,180 a file that the FPGA 648 00:29:30,180 --> 00:29:31,880 understands, which in this case 649 00:29:31,880 --> 00:29:33,860 is a bit file. So you'll 650 00:29:33,860 --> 00:29:35,940 put it, you'll make a bit file, you'll download it 651 00:29:35,940 --> 00:29:37,900 to the board, which you can download it right to 652 00:29:37,900 --> 00:29:39,660 the PROM, and it'll 653 00:29:40,640 --> 00:29:41,460 boot off that. 654 00:29:41,700 --> 00:29:42,620 It'll boot off that 655 00:29:42,620 --> 00:29:45,980 and you can leave it there and turn it on 656 00:29:45,980 --> 00:29:48,020 and off and everything in the program will be 657 00:29:48,020 --> 00:29:49,260 there to run right off that for you. 658 00:29:51,920 --> 00:29:52,920 So this is 659 00:29:52,920 --> 00:29:54,560 a little about the simulation. 660 00:29:54,920 --> 00:29:56,260 The added test bench is basically 661 00:29:56,260 --> 00:29:58,520 you add a test bench with your input 662 00:29:58,520 --> 00:30:00,200 and you make sure your output's coming out 663 00:30:00,200 --> 00:30:00,800 like I said before. 664 00:30:01,600 --> 00:30:04,140 The behavioral simulation is where you will 665 00:30:04,140 --> 00:30:06,060 test just the logic. You'll make sure 666 00:30:06,060 --> 00:30:08,120 your units, or your 667 00:30:08,660 --> 00:30:10,180 logical units are actually making sense. 668 00:30:10,420 --> 00:30:11,880 So if you have, if you say 669 00:30:11,880 --> 00:30:13,860 if SW1 is high, 670 00:30:14,020 --> 00:30:16,320 then LED1 should be on. 671 00:30:16,340 --> 00:30:17,860 If SW1 and SW2 are high, 672 00:30:18,720 --> 00:30:20,040 LED3 should be on. You just have to make sure 673 00:30:20,060 --> 00:30:21,820 that works out how you 674 00:30:21,820 --> 00:30:23,060 expected it. 675 00:30:23,560 --> 00:30:25,740 The timing simulation is a little more tricky 676 00:30:25,740 --> 00:30:27,820 since we're working with hardware, not software. 677 00:30:28,980 --> 00:30:29,880 As Roddy mentioned 678 00:30:29,880 --> 00:30:31,120 before, hardware is 679 00:30:31,640 --> 00:30:33,500 kind of working in parallel. When your signal gets 680 00:30:33,500 --> 00:30:35,880 sent there, it's going to work. Then it's not going to 681 00:30:35,880 --> 00:30:37,820 wait until the previous step. 682 00:30:38,680 --> 00:30:39,460 Like in software, 683 00:30:39,640 --> 00:30:41,760 you do this, then you do A, 684 00:30:41,960 --> 00:30:43,220 then you do B, then you do C. 685 00:30:43,700 --> 00:30:45,900 So the timing simulation is, you may 686 00:30:45,900 --> 00:30:48,000 think you have everything working great, but then as soon as you put it 687 00:30:48,000 --> 00:30:50,000 through the timing, everything breaks up 688 00:30:50,060 --> 00:30:52,120 so you have to make sure you get all the timing 689 00:30:52,120 --> 00:30:53,900 right and everything is going 690 00:30:53,900 --> 00:30:54,900 when you expect it to be going. 691 00:30:57,420 --> 00:30:58,000 This is 692 00:30:58,000 --> 00:30:59,440 just a little bit about the 693 00:31:00,000 --> 00:31:00,460 design data. 694 00:31:01,620 --> 00:31:03,820 The nice thing is they'll give you reports in here. 695 00:31:04,020 --> 00:31:05,840 So over here is a list of all the reports, 696 00:31:06,000 --> 00:31:07,940 some options, and up here 697 00:31:07,940 --> 00:31:09,860 gives you a general overview of the 698 00:31:09,860 --> 00:31:11,980 project, the name, the target device, 699 00:31:12,280 --> 00:31:13,860 and that kind of things. Here 700 00:31:13,860 --> 00:31:16,020 is device utilization, which I'll 701 00:31:16,020 --> 00:31:17,960 talk about in the next slide. Down here 702 00:31:17,960 --> 00:31:19,140 are just some constraints you can 703 00:31:20,480 --> 00:31:21,360 set and 704 00:31:22,440 --> 00:31:23,640 some more reports. 705 00:31:26,640 --> 00:31:28,020 So the design 706 00:31:28,020 --> 00:31:29,560 utilization or device utilization 707 00:31:30,300 --> 00:31:32,080 can be nice because it'll show you 708 00:31:32,080 --> 00:31:34,140 what you've already used in your 709 00:31:34,140 --> 00:31:35,660 design. So here you're using four 710 00:31:35,660 --> 00:31:37,480 flip-flops of the available 711 00:31:37,480 --> 00:31:38,680 27,000. 712 00:31:39,800 --> 00:31:41,580 27,000, so you're only using 1%. 713 00:31:41,580 --> 00:31:43,820 So it's nice when you're making a design to make sure you're not 714 00:31:43,820 --> 00:31:45,900 using up all your resources. And if you 715 00:31:45,900 --> 00:31:48,040 need to go back and change your design and you see you're using up 716 00:31:48,040 --> 00:31:49,160 99% of a resource, 717 00:31:50,060 --> 00:31:51,920 you can take that into consideration when you 718 00:31:51,920 --> 00:31:53,960 redesign to try to either redesign it 719 00:31:53,960 --> 00:31:55,980 and optimize it or redesign it another way 720 00:31:55,980 --> 00:31:57,800 so you can add stuff without using 721 00:31:57,800 --> 00:31:58,720 all your resources. 722 00:32:00,580 --> 00:32:01,960 So now Ryan's gonna 723 00:32:01,960 --> 00:32:03,140 give a demo of all this 724 00:32:03,940 --> 00:32:05,860 with some switches and LEDs and 725 00:32:05,860 --> 00:32:07,940 then a nice VGA to show you that 726 00:32:07,940 --> 00:32:08,840 the VGA actually works. 727 00:32:10,940 --> 00:32:11,980 I also wanted to 728 00:32:11,980 --> 00:32:13,900 add that if you guys have any questions 729 00:32:13,900 --> 00:32:16,020 at all during this, this is kind of a long talk, so 730 00:32:16,020 --> 00:32:17,900 feel free to ask them even during the demo 731 00:32:17,900 --> 00:32:19,960 sessions if you have just a quick question 732 00:32:19,960 --> 00:32:21,680 about something we said or just wanted to know 733 00:32:21,680 --> 00:32:22,200 something more. 734 00:32:31,240 --> 00:32:33,540 Okay, so I'm actually gonna walk you guys through 735 00:32:34,680 --> 00:32:35,560 a very 736 00:32:35,560 --> 00:32:36,620 simple hardware design 737 00:32:38,320 --> 00:32:39,620 with the Xilinx 738 00:32:39,620 --> 00:32:41,780 ISE. So I'm gonna go ahead and start that out now. 739 00:32:50,860 --> 00:32:51,380 . 740 00:32:57,700 --> 00:32:59,940 Okay, so we're gonna basically create 741 00:32:59,940 --> 00:33:01,740 a design that just has some 742 00:33:01,740 --> 00:33:04,040 simple gates and uses switches and LEDs. 743 00:33:04,620 --> 00:33:05,140 And 744 00:33:06,020 --> 00:33:07,540 one of the most important things 745 00:33:07,540 --> 00:33:09,720 when you're designing this is to 746 00:33:10,880 --> 00:33:11,580 take into 747 00:33:11,580 --> 00:33:13,600 consideration what pins are connected 748 00:33:13,600 --> 00:33:15,160 where, like he was talking about the netlist. 749 00:33:16,560 --> 00:33:17,600 So, for 750 00:33:17,900 --> 00:33:19,620 example, in our case, we're using a demo kit board, 751 00:33:19,700 --> 00:33:20,960 not a custom design board. 752 00:33:21,180 --> 00:33:23,620 So they have all that stuff already mapped out 753 00:33:23,620 --> 00:33:24,760 for you, which is kind of nice. 754 00:33:25,000 --> 00:33:27,040 So we can just go here and say, okay, 755 00:33:27,140 --> 00:33:28,660 I wanna use the switches, 756 00:33:29,420 --> 00:33:30,540 the slide switches, 757 00:33:31,020 --> 00:33:33,120 and the UCF 758 00:33:33,120 --> 00:33:35,460 location constraints. And it actually will give you 759 00:33:35,460 --> 00:33:37,640 right the nets that you need. 760 00:33:38,640 --> 00:33:39,700 And you can just select 761 00:33:39,700 --> 00:33:41,660 those and copy and paste them into your files. 762 00:33:42,000 --> 00:33:43,760 So we'll be going back 763 00:33:43,760 --> 00:33:45,540 to that later. We're gonna start a new 764 00:33:45,540 --> 00:33:45,920 project. 765 00:33:47,900 --> 00:33:49,220 And we'll just call it 766 00:33:50,300 --> 00:33:51,240 Simple Def Con. 767 00:33:56,380 --> 00:33:57,740 And it looks like 768 00:33:57,740 --> 00:33:59,820 this is all set okay. Spartan 3E. 769 00:34:00,620 --> 00:34:01,860 That is all actually 770 00:34:01,860 --> 00:34:03,560 written on the board. Whatever 771 00:34:03,560 --> 00:34:05,660 demo board you have, you can just kind of take a look 772 00:34:05,660 --> 00:34:07,560 at it. Take a look at the FPGA 773 00:34:07,560 --> 00:34:09,420 in the center, and it has all this timing information 774 00:34:09,420 --> 00:34:10,300 and stuff like that. 775 00:34:12,780 --> 00:34:13,740 And we're gonna create 776 00:34:13,740 --> 00:34:14,560 a new source file. 777 00:34:15,140 --> 00:34:17,460 And we're just gonna call it Simple LED. 778 00:34:19,980 --> 00:34:21,860 And that will be a VHDL 779 00:34:21,860 --> 00:34:22,180 module. 780 00:34:23,800 --> 00:34:25,120 And we'll add that to the project. 781 00:34:25,360 --> 00:34:27,820 And this is where you tell it basically what 782 00:34:27,820 --> 00:34:29,820 is coming in this module 783 00:34:29,820 --> 00:34:30,860 and out of this module. 784 00:34:31,380 --> 00:34:33,800 And in our case, we're gonna have switches 785 00:34:33,800 --> 00:34:35,480 that are gonna be inputs. 786 00:34:36,140 --> 00:34:37,500 And they're gonna be a bus. 787 00:34:38,740 --> 00:34:39,940 And this is the most 788 00:34:39,940 --> 00:34:41,480 significant bit. We'll say three 789 00:34:41,480 --> 00:34:43,520 down to zero. So there's 790 00:34:43,520 --> 00:34:45,620 basically a vector of four inputs 791 00:34:45,620 --> 00:34:47,760 that are switches. And we can address 792 00:34:47,900 --> 00:34:49,540 them as like SW0, 793 00:34:50,280 --> 00:34:50,780 SW1. 794 00:34:52,220 --> 00:34:53,560 And our LEDs 795 00:34:53,560 --> 00:34:54,600 are gonna be our output. 796 00:34:55,060 --> 00:34:56,680 So we say direction out. 797 00:34:57,500 --> 00:34:59,420 And a bus. There's eight of those. 798 00:34:59,700 --> 00:35:00,880 So we'll say seven 799 00:35:00,880 --> 00:35:02,300 down to zero. 800 00:35:08,300 --> 00:35:09,940 It's asking me if it exists. 801 00:35:10,300 --> 00:35:11,480 It doesn't exist. 802 00:35:11,660 --> 00:35:12,320 Do I want to create it? 803 00:35:13,640 --> 00:35:15,080 No existing sources. 804 00:35:16,240 --> 00:35:17,720 I'll create a project. 805 00:35:24,580 --> 00:35:25,220 Okay. 806 00:35:25,600 --> 00:35:27,640 And the next most important 807 00:35:27,640 --> 00:35:28,880 thing is to create the 808 00:35:29,620 --> 00:35:31,520 netlist file, the constraints 809 00:35:31,520 --> 00:35:33,680 file. So we say new source. 810 00:35:34,720 --> 00:35:35,360 And 811 00:35:37,080 --> 00:35:37,720 pick 812 00:35:37,720 --> 00:35:39,260 implementation constraints file. 813 00:35:39,720 --> 00:35:41,500 And I'm just gonna call it constraints. 814 00:35:44,360 --> 00:35:45,000 And 815 00:35:47,900 --> 00:35:48,640 it's gonna pop up here. 816 00:35:50,200 --> 00:35:51,440 And I'm gonna say 817 00:35:51,440 --> 00:35:53,680 they have like a built-in constraint 818 00:35:53,680 --> 00:35:55,640 editor, but it's easier to just do this in text. 819 00:35:56,380 --> 00:35:57,840 Since Sidelinks already gives 820 00:35:57,840 --> 00:35:59,680 them to you. So you can say edit 821 00:35:59,680 --> 00:36:01,580 constraints. And we can just 822 00:36:01,580 --> 00:36:02,720 copy this 823 00:36:03,400 --> 00:36:05,460 right from here. The switches. 824 00:36:07,100 --> 00:36:07,580 And 825 00:36:07,580 --> 00:36:08,700 paste it right in there. 826 00:36:09,460 --> 00:36:11,060 Since we called them the same thing. 827 00:36:11,300 --> 00:36:13,020 It's really important that your ports 828 00:36:13,840 --> 00:36:15,660 in your VHDL file 829 00:36:15,660 --> 00:36:17,500 have the same names 830 00:36:17,500 --> 00:36:19,380 as the nets in your constraints file. 831 00:36:19,540 --> 00:36:21,520 Because it uses those to 832 00:36:21,520 --> 00:36:23,540 map the two together. So it knows that they're 833 00:36:23,540 --> 00:36:24,120 the same thing. 834 00:36:27,220 --> 00:36:29,380 So then we're gonna add the LEDs to that too. 835 00:36:31,460 --> 00:36:33,340 So we have discrete LEDs. 836 00:36:34,820 --> 00:36:35,340 UCF 837 00:36:35,340 --> 00:36:37,400 location constraints. And then we're just gonna 838 00:36:37,400 --> 00:36:38,200 select all these. 839 00:36:40,840 --> 00:36:42,000 And we'll copy. 840 00:36:43,640 --> 00:36:44,760 And paste them. 841 00:36:46,520 --> 00:36:47,560 So now we have our 842 00:36:47,560 --> 00:36:49,280 constraints file. These are the only things that 843 00:36:49,280 --> 00:36:51,140 we're gonna interact with on the board at this point. 844 00:36:51,820 --> 00:36:53,500 And now we can go ahead 845 00:36:53,500 --> 00:36:55,160 and write our VHDL file. 846 00:36:55,660 --> 00:36:57,360 It already kind of created an 847 00:36:57,360 --> 00:36:59,420 outline for us. And it 848 00:37:00,180 --> 00:37:01,280 added in the libraries 849 00:37:01,280 --> 00:37:03,360 that we're gonna need automatically. 850 00:37:03,800 --> 00:37:05,380 If you had any like custom 851 00:37:05,380 --> 00:37:07,280 libraries that other people write online. 852 00:37:07,580 --> 00:37:09,520 Like you can go look up VHDL 853 00:37:09,520 --> 00:37:11,520 code online. And there's a lot 854 00:37:11,520 --> 00:37:13,120 of other libraries you can add them in there. 855 00:37:14,960 --> 00:37:15,400 And 856 00:37:16,060 --> 00:37:17,180 we're just gonna write 857 00:37:17,180 --> 00:37:18,920 very simple VHDL code. 858 00:37:19,680 --> 00:37:21,480 Not even gonna put a process 859 00:37:21,480 --> 00:37:23,380 in here. Because it's kind of 860 00:37:23,380 --> 00:37:25,480 implied. We're just gonna directly map 861 00:37:25,480 --> 00:37:26,500 hardware. So basically 862 00:37:26,500 --> 00:37:29,240 what we're gonna say now is 863 00:37:29,240 --> 00:37:30,020 LED 864 00:37:30,020 --> 00:37:33,460 0. We're addressing 865 00:37:33,460 --> 00:37:35,120 LED 0. We're saying 866 00:37:35,440 --> 00:37:37,060 that's gonna be mapped directly to. 867 00:37:37,360 --> 00:37:39,680 And then we can do whatever we want 868 00:37:39,680 --> 00:37:41,080 here. So I can say 869 00:37:41,880 --> 00:37:42,860 switch 0. 870 00:37:43,220 --> 00:37:45,400 And I can actually give it a 871 00:37:45,660 --> 00:37:47,220 hardware gate. So I can say 872 00:37:47,220 --> 00:37:49,300 switch 0 and 873 00:37:49,300 --> 00:37:50,080 switch 1. 874 00:37:55,980 --> 00:37:57,060 Let's find out. 875 00:38:08,820 --> 00:38:09,900 Is that better? 876 00:38:16,360 --> 00:38:17,040 Okay. 877 00:38:17,120 --> 00:38:17,360 So 878 00:38:17,360 --> 00:38:21,180 you can 879 00:38:21,180 --> 00:38:22,440 put in any kind of gate. 880 00:38:22,640 --> 00:38:24,720 You're basically telling it exactly what 881 00:38:25,340 --> 00:38:26,940 this is direct hardware mapping. 882 00:38:27,200 --> 00:38:29,380 So LED 1 is gonna be connected to a 883 00:38:29,380 --> 00:38:31,520 gate of switch 0 884 00:38:31,520 --> 00:38:32,680 or switch 1. 885 00:38:37,600 --> 00:38:39,460 LED 3 will say 886 00:38:41,400 --> 00:38:42,200 switch 0 887 00:38:44,020 --> 00:38:45,160 exclusive or. 888 00:38:46,900 --> 00:38:47,940 Switch 1. 889 00:38:50,560 --> 00:38:51,240 Switch 1. 890 00:38:51,240 --> 00:38:52,540 4. 891 00:38:53,780 --> 00:38:55,100 Let's make this 2. 892 00:38:55,820 --> 00:38:56,500 3. 893 00:39:05,600 --> 00:39:06,700 Switch 1. 894 00:39:08,980 --> 00:39:11,380 And these last four I'm just gonna directly 895 00:39:11,380 --> 00:39:12,840 map. So 896 00:39:13,420 --> 00:39:14,680 we'll just say LED 897 00:39:15,660 --> 00:39:15,820 4 898 00:39:17,540 --> 00:39:18,840 is the same as 899 00:39:18,840 --> 00:39:19,420 switch 0. 900 00:39:22,860 --> 00:39:23,420 LED 901 00:39:23,420 --> 00:39:23,740 5 902 00:39:28,020 --> 00:39:29,140 is switch 903 00:39:29,140 --> 00:39:29,420 1. 904 00:39:31,740 --> 00:39:33,120 Is it case sensitive? 905 00:39:34,320 --> 00:39:34,880 No. 906 00:39:35,040 --> 00:39:36,560 It's not really case sensitive. 907 00:39:37,300 --> 00:39:39,000 I'm just trying to make them look the same. 908 00:39:39,420 --> 00:39:41,160 I'm not sure about Verilog but 909 00:39:41,160 --> 00:39:43,160 VHDL is insensitive. 910 00:39:43,400 --> 00:39:43,920 Yeah. 911 00:39:48,400 --> 00:39:48,840 . 912 00:39:54,360 --> 00:39:54,800 . 913 00:39:55,560 --> 00:39:56,000 . 914 00:39:56,000 --> 00:39:56,320 . 915 00:39:56,320 --> 00:39:56,540 . 916 00:39:56,540 --> 00:39:56,760 . 917 00:39:56,760 --> 00:39:56,780 . 918 00:39:56,780 --> 00:39:57,240 . 919 00:39:57,240 --> 00:39:57,260 . 920 00:40:04,620 --> 00:40:05,060 . 921 00:40:05,060 --> 00:40:05,080 . 922 00:40:05,080 --> 00:40:05,100 . 923 00:40:05,100 --> 00:40:05,120 . 924 00:40:05,120 --> 00:40:05,140 . 925 00:40:05,140 --> 00:40:05,880 . 926 00:40:08,500 --> 00:40:09,580 . 927 00:40:09,580 --> 00:40:10,200 . 928 00:40:10,200 --> 00:40:10,520 . 929 00:40:10,520 --> 00:40:10,540 . 930 00:40:10,540 --> 00:40:11,460 . 931 00:40:11,460 --> 00:40:11,500 . 932 00:40:11,500 --> 00:40:11,960 . 933 00:40:16,520 --> 00:40:17,600 . 934 00:40:17,600 --> 00:40:17,620 . 935 00:40:17,620 --> 00:40:17,640 . 936 00:40:32,500 --> 00:40:33,580 . 937 00:40:33,580 --> 00:40:35,280 VGA controllers it can take a little bit 938 00:40:35,280 --> 00:40:39,200 longer to synthesize and place and route your design. 939 00:40:42,300 --> 00:40:43,580 It's already done with synthesis. 940 00:40:43,740 --> 00:40:46,360 It's moved on to the implement design phase. 941 00:40:50,680 --> 00:40:52,960 And there's actually subcategories in this so you can 942 00:40:52,960 --> 00:40:53,580 kind of take a look. 943 00:40:53,820 --> 00:40:55,020 It's done with translating. 944 00:40:55,340 --> 00:40:56,360 It's moved on to mapping. 945 00:40:58,280 --> 00:40:58,680 . 946 00:40:58,680 --> 00:41:00,760 What's the bottleneck in this process? 947 00:41:01,020 --> 00:41:04,000 Is it the speed of the FPGA or the processor? 948 00:41:04,680 --> 00:41:06,440 The processor, actually, yeah. 949 00:41:06,500 --> 00:41:09,360 The faster you have a computer, the better this process will go. 950 00:41:11,900 --> 00:41:18,280 Synthesis currently is mostly a single-threaded operation on the IS, 951 00:41:18,420 --> 00:41:21,740 at least the Xilinx software, and I believe so with Altera also. 952 00:41:21,740 --> 00:41:29,680 A Pentium, not so much anymore, but a year ago, Pentium 4 might have done better than a slower Core 2 953 00:41:29,680 --> 00:41:35,700 because it didn't take advantage of the second one, but now I think the i7 would kick its ass. 954 00:41:37,680 --> 00:41:42,140 So now basically it's telling me Xilinx has this thing called Impact Project Manager, 955 00:41:42,320 --> 00:41:49,620 which is basically a project to help you program through whatever means you have available. 956 00:41:50,400 --> 00:41:51,720 Here we're going to... 957 00:41:51,740 --> 00:41:52,760 We're going to do it through JTAG. 958 00:41:52,940 --> 00:41:59,060 It's like a USB to JTAG configuration, so it's going to scan and look for a download cable, 959 00:41:59,620 --> 00:42:04,280 and it finds the three devices that are on the Spartan 3 FPGA, 960 00:42:04,440 --> 00:42:09,180 so it knows there's a 3500 SE PROM chip on there and a CPLD, 961 00:42:10,260 --> 00:42:12,980 and you can see the FPGA is the first one, so we're going to say, 962 00:42:13,140 --> 00:42:15,660 okay, program with this bit file we just created, 963 00:42:16,320 --> 00:42:20,060 and we're just going to bypass the other two because we don't want to program them right now. 964 00:42:20,120 --> 00:42:21,220 We don't have any configuration. 965 00:42:22,220 --> 00:42:23,460 We're going to say, okay, that's okay. 966 00:42:23,960 --> 00:42:28,940 Now I'm going to click on this, the FPGA, and just click program, 967 00:42:29,880 --> 00:42:31,720 and it just programmed the FPGA, 968 00:42:31,820 --> 00:42:36,060 so now I'm going to actually switch this over so you can take a look at it, the video input. 969 00:42:37,320 --> 00:42:42,240 Those other three devices, those are the ones that you can use to have your FPGA program on startup. 970 00:42:43,500 --> 00:42:48,540 The first thing on the chip on the left is the one where you can just program it instantaneously, 971 00:42:48,660 --> 00:42:49,700 you know, while it's powered on. 972 00:42:53,400 --> 00:42:56,220 Okay, so this is our, this is our demo board here. 973 00:42:58,480 --> 00:42:59,620 It's a demo board here. 974 00:42:59,700 --> 00:43:03,620 I'm just going to flicker on these switches so you can kind of see the reaction of the LEDs, 975 00:43:03,740 --> 00:43:07,780 basically what we just wrote in VHDL. 976 00:43:14,200 --> 00:43:21,460 So these are the, so the two switches on the left are, 977 00:43:21,740 --> 00:43:24,780 switch three and switch four, and they were directly mapped, only the two LEDs, 978 00:43:24,980 --> 00:43:26,480 so you can see them turning on and off. 979 00:43:26,660 --> 00:43:30,280 And the first two are switch one and switch zero, which, or switch zero and one, 980 00:43:30,360 --> 00:43:32,120 which we had all of the gates hooked up to. 981 00:43:32,480 --> 00:43:37,360 So you can kind of see the LEDs react to the different gate configurations that we had. 982 00:43:38,240 --> 00:43:40,480 Earlier you talked about test benching it. 983 00:43:41,180 --> 00:43:44,280 Would you have done that in software prior to uploading? 984 00:43:44,880 --> 00:43:47,820 Yeah, you can actually write your test bench before you write the code. 985 00:43:48,940 --> 00:43:50,860 Right, so what you would want to do, 986 00:43:50,860 --> 00:43:56,260 if you wanted to do simulation, that's where the test bench would come into play. 987 00:43:56,600 --> 00:44:00,680 You need a test bench to look, to do a simulation, otherwise you don't have any input, 988 00:44:00,800 --> 00:44:03,240 so you're not going to see any output in simulation. 989 00:44:03,600 --> 00:44:06,920 You don't actually have to create a test bench if you just want to put it into hardware 990 00:44:06,920 --> 00:44:08,540 and check to see if it works. 991 00:44:09,020 --> 00:44:11,820 But when you start to get into more complex systems, 992 00:44:12,040 --> 00:44:15,840 it almost becomes essential to create some kind of test bench 993 00:44:15,840 --> 00:44:20,260 so you can test individual modules of your system without having the whole thing, 994 00:44:20,860 --> 00:44:21,660 hooked up in together. 995 00:44:22,020 --> 00:44:26,600 Other than, is it not working, would you damage the device? 996 00:44:28,340 --> 00:44:29,460 Usually not. 997 00:44:29,840 --> 00:44:36,460 He asked, can you damage the device if it's not working correctly or will it just not work? 998 00:44:37,060 --> 00:44:40,440 Most of the time, you really won't damage too many devices, 999 00:44:40,560 --> 00:44:46,960 but you could be connected to a component that takes a much lower voltage level 1000 00:44:46,960 --> 00:44:49,760 and if you're pumping, you know, you have a constraint wrong, 1001 00:44:49,760 --> 00:44:53,940 and you're pumping like three and a half volts into something that you know 1002 00:44:53,940 --> 00:44:57,300 isn't supposed to take three and a half volts you can potentially mess something 1003 00:44:57,300 --> 00:45:00,860 out but yeah I mean if you're just dealing with the FPGA it's pretty hard 1004 00:45:00,860 --> 00:45:05,760 to write code that destroys it you can make it warmer you do certain things but 1005 00:45:05,760 --> 00:45:09,460 I've never seen I mean if you saw our talk last year we actually did a 1006 00:45:09,460 --> 00:45:13,880 hardware Trojan basically making the processor hotter and colder based on 1007 00:45:13,880 --> 00:45:18,640 certain operations we were doing so you can definitely do things like that but 1008 00:45:18,640 --> 00:45:21,640 most of the time you get into trouble with interfacing things outside of the 1009 00:45:21,640 --> 00:45:26,980 FPGA with your FPGA and you're not taking all the proper IO considerations 1010 00:45:29,080 --> 00:45:33,840 okay so I'm going to show you one other really useful thing with the Xilinx ISC 1011 00:45:33,840 --> 00:45:40,140 I pulled some code off the internet a couple days ago just some like VHDL 1012 00:45:40,140 --> 00:45:47,800 example VGA example code that just uses a VGA port and a 50 megahertz clock so 1013 00:45:47,800 --> 00:45:48,580 I'm just going to do that 1014 00:45:48,580 --> 00:45:53,400 real quick I'm going to implement that I'm going to basically pull in the code 1015 00:45:53,400 --> 00:45:57,640 that I got off the internet and put it into ISE and make it work with the 1016 00:45:57,640 --> 00:46:03,780 Spartan 3e board and this was actually just written for the the pins on a VGA 1017 00:46:03,780 --> 00:46:07,600 connector all you need is a VGA connector and a 50 megahertz clock and an 1018 00:46:07,600 --> 00:46:11,500 FPGA so you you could do this on any board that has those three things not 1019 00:46:11,500 --> 00:46:17,800 just the Spartan 3e so we're going to go through the same process and 1020 00:46:18,680 --> 00:46:24,680 I'm going to add in that source file here and put it here it's called squares 1021 00:46:24,680 --> 00:46:29,860 dot VHD and it's going to copy it to this project 1022 00:46:42,120 --> 00:46:46,240 yep there's Linux and used to be Solaris 1023 00:46:48,580 --> 00:46:54,100 yes if there's Linux version actually the EDK runs better under Linux because 1024 00:46:54,100 --> 00:47:05,400 it when you install the EDK under Windows and installs on sigwin the 1025 00:47:05,400 --> 00:47:11,700 Spartan through 149 and if any of you are still in school or educators you can 1026 00:47:11,700 --> 00:47:18,460 get discounts from Xilinx so giving away these boards actually so 1027 00:47:18,580 --> 00:47:23,000 you can win it for free right now so obviously the first the most important 1028 00:47:23,000 --> 00:47:26,940 thing to do is to create a constraints file first and we have to have a 1029 00:47:26,940 --> 00:47:30,380 constraints file that includes all of these inputs and outputs that are there 1030 00:47:30,380 --> 00:47:36,120 in this VHDL module that was that I we got off the internet so I'm going to 1031 00:47:36,120 --> 00:47:37,320 create another constraints file 1032 00:47:42,680 --> 00:47:47,200 you said there's a Linux version because I have to go out on the x86 and the x7 1033 00:47:53,760 --> 00:48:01,740 I'm pretty sure it's it's a binary so it whether it runs on x86 only the Linux 1034 00:48:01,740 --> 00:48:08,800 version so we're going to go back to the Spartan 3 again user guide and we're 1035 00:48:08,800 --> 00:48:14,220 going to go to just the VGA DisplayPort and pull down those constraints now the 1036 00:48:14,220 --> 00:48:16,820 interesting thing here is that these are named differently 1037 00:48:18,720 --> 00:48:23,220 because this is just code that's off the internet so I'm going to dump this 1038 00:48:23,860 --> 00:48:29,040 the Spartan 3 constraints in here but you can see that or not see because it's 1039 00:48:30,320 --> 00:48:38,240 like gray or something but it says VGA red VGA green whereas in our VHDL module 1040 00:48:38,240 --> 00:48:43,760 it's called red out green out so basically if I compile this right now it 1041 00:48:43,760 --> 00:48:46,960 would not know that those are the same signal that we're talking about and it 1042 00:48:46,960 --> 00:48:48,460 wouldn't map them to the 1043 00:48:48,580 --> 00:48:52,300 the FPGA so I have to make sure that those are named the same so basically I 1044 00:48:52,300 --> 00:48:59,520 have to say this is red out here that we're talking about so I'm going to 1045 00:48:59,520 --> 00:49:04,040 copy and paste right out into there and green out into the next one 1046 00:49:13,480 --> 00:49:13,920 yeah 1047 00:49:13,920 --> 00:49:17,820 those are specific 1048 00:49:18,900 --> 00:49:25,160 he asked what slew and drive are those those kind of fields are basically very 1049 00:49:25,680 --> 00:49:33,560 specific tweaks to IO standards so the slew would affect like how the the rise 1050 00:49:33,560 --> 00:49:40,120 in the fall from a zero to a one transition would look like what's the 1051 00:49:40,120 --> 00:49:41,720 units or drive current 1052 00:49:48,580 --> 00:49:54,880 so last thing we have to add in here is the clock the Spartan 3 has 50 megahertz 1053 00:49:54,880 --> 00:50:00,540 oscillator on it the FPGA can pretty much take anything I think there's a 1054 00:50:00,540 --> 00:50:05,600 certain there's like a it maxes out at some point in megahertz what clock 1055 00:50:05,600 --> 00:50:11,120 signal you can you can drive in into it but you can you can pretty much drive 1056 00:50:11,120 --> 00:50:18,340 any clocks or you want so anything like 13 to 25 megahertz if you want and the 1057 00:50:18,340 --> 00:50:21,660 interesting thing about this is where we're feeding in a 50 megahertz clock 1058 00:50:21,660 --> 00:50:27,940 because that's what the Spartan 3 has but the VGA standard actually uses a 25 1059 00:50:27,940 --> 00:50:35,900 megahertz clock so this is clock 50 megahertz so I'm just going to make this 1060 00:50:35,900 --> 00:50:36,260 the same 1061 00:50:40,200 --> 00:50:43,740 so I'm going to save that constraints file but you'll notice in this in this 1062 00:50:43,740 --> 00:50:48,000 VHDL file we have a signal here it's it's 1063 00:50:48,340 --> 00:50:52,720 that we created it's kind of like a variable called clock 25 and then we 1064 00:50:52,720 --> 00:50:57,500 have this process here so this kind of runs in parallel with the other and with 1065 00:50:57,500 --> 00:51:01,820 any other processes that are going on and this process takes the 50 megahertz 1066 00:51:01,820 --> 00:51:07,400 clock and turns it into 25 megahertz clock basically that that this VGA 1067 00:51:07,400 --> 00:51:13,560 process needs in order to you know operate it the the speed that the 1068 00:51:13,560 --> 00:51:18,320 projector can take in so we're done here because this is a pre-made model 1069 00:51:18,340 --> 00:51:23,360 module and I'm just going to configure this a while but if you take a look here 1070 00:51:23,960 --> 00:51:28,380 this is what BHGL is really good at it's really good at taking things that needs 1071 00:51:28,380 --> 00:51:35,100 specific timing where timing is crucial and and you can kind of write in a very 1072 00:51:35,840 --> 00:51:43,200 easy to understand language so like if the fifty megahertz clock 50 megahertz 1073 00:51:43,200 --> 00:51:48,320 clock event happens and the fifty megahertz clock is at a lot a lot 1074 00:51:48,340 --> 00:51:57,000 signal one so basically if if we see a rising edge then do this and likewise 1075 00:51:57,000 --> 00:52:03,020 you can see below you just say if this signal is at logic zero now do this so 1076 00:52:03,020 --> 00:52:06,300 that's where BHTL comes in and really handy that you can't really guarantee 1077 00:52:06,300 --> 00:52:10,720 timing with a microprocessor when you have want to do several things at once 1078 00:52:10,720 --> 00:52:14,560 because you've got kind of this multi threading and you're never guaranteed to 1079 00:52:14,560 --> 00:52:23,280 get specific timing down and the cool thing about these processes there 1080 00:52:23,280 --> 00:52:27,360 there's no scheduler they're always on the CPU they're always ready to trigger 1081 00:52:27,360 --> 00:52:31,120 there's no starvation you basically have the entire resources of the board ready 1082 00:52:31,120 --> 00:52:36,880 to trigger at any moment based on your design so in that sense it blows away a 1083 00:52:36,880 --> 00:52:42,480 single threaded CPU for timing that real world real-time programming is a joke 1084 00:52:42,480 --> 00:52:43,940 compared to writing HDL 1085 00:52:46,560 --> 00:52:51,780 so I'm going to program the the FPGA again real quick and I'll actually plug 1086 00:52:51,780 --> 00:52:55,160 this signal in so you can see what it what it outputs 1087 00:53:04,940 --> 00:53:08,420 so that's this this code that I downloaded off the internet this is what 1088 00:53:08,420 --> 00:53:13,980 it outputs on the VGA port so it's basically just a bunch of squares it's 1089 00:53:13,980 --> 00:53:14,420 like a test 1090 00:53:14,420 --> 00:53:19,240 signal but you can see I mean that's that's you know probably a page and a 1091 00:53:19,240 --> 00:53:26,900 half of code to put that out on your VGA port so it's you can see how 1092 00:53:26,900 --> 00:53:34,240 useful the ISE can be yeah for example using this VGA imagine what you can do 1093 00:53:34,840 --> 00:53:41,840 you can basically write a game code for example and run it from your just Spartan 1094 00:53:41,840 --> 00:53:44,400 3 board like this is a basic style of programming that you can do and you can 1095 00:53:44,400 --> 00:53:49,780 play it on any other board and play it without having any other like peripherals or other 1096 00:53:49,780 --> 00:53:56,040 things yeah we actually do that in our senior design course all the students 1097 00:53:56,040 --> 00:54:00,800 wrote their video game I mean most of them are varying degrees more comp more 1098 00:54:00,800 --> 00:54:06,660 complicated than pong you know less complicated than Mario but that's that's 1099 00:54:06,660 --> 00:54:14,040 the kind of stuff you can do with these boards it's in the fall the senior year 1100 00:54:18,300 --> 00:54:30,200 just one so this is this is the end of the demo for the ISE and I believe we 1101 00:54:30,200 --> 00:54:43,440 have contest winners and another contest so Corey's gonna come back up okay so we went 1102 00:54:43,440 --> 00:54:43,880 through and 1103 00:54:45,300 --> 00:54:50,760 found out the who got questions right and wrong and we separated out the right 1104 00:54:50,760 --> 00:54:55,060 answers and we're going to draw some right answers I'm going to have two of 1105 00:54:55,060 --> 00:55:00,640 my colleagues Steve and Mike come up here and help us out the right answer is 1106 00:55:00,640 --> 00:55:05,800 approximately 400 terahertz the human eye has about a 400 terahertz bandwidth 1107 00:55:05,800 --> 00:55:09,860 it's quite impressive but we accepted anything that was kind of close to that 1108 00:55:09,860 --> 00:55:13,120 or at least within the band up to think about 1109 00:55:13,880 --> 00:55:17,780 that is a 90 terahertz yeah but we we had to reject things like 60 1110 00:55:17,780 --> 00:55:24,220 Hertz and bits per second and nanometers so just because google says that it's 10 1111 00:55:24,220 --> 00:55:27,260 million bits per second doesn't mean it was what we're looking for google isn't 1112 00:55:27,260 --> 00:55:34,220 always right but Wikipedia is so these guys are going to draw the answers and 1113 00:55:34,220 --> 00:55:39,740 call out names and then you'll come up to me and give me your password and we'll 1114 00:55:39,740 --> 00:55:40,840 give you some prizes 1115 00:55:41,380 --> 00:55:42,580 all right who's ready 1116 00:55:43,200 --> 00:55:43,820 come on 1117 00:55:43,880 --> 00:55:51,580 guys wake up all right you ready let's get a little anticipation first person 1118 00:55:51,580 --> 00:55:56,100 is this is for the Spartan three board we're gonna get that one knocked out 1119 00:55:56,100 --> 00:56:08,060 right now Tom this is why we have the password all right come on do we have 1120 00:56:08,060 --> 00:56:17,980 the is Tom here raise your hand if you're Tom no close I mean this is a 1121 00:56:17,980 --> 00:56:27,000 highly brute forcible password here we're gonna draw another one but uh this 1122 00:56:27,000 --> 00:56:33,860 wouldn't make it past Jack the Ripper sorry let's hope for a better cheese 1123 00:56:35,720 --> 00:56:36,320 burrito 1124 00:56:39,580 --> 00:56:44,180 cheese burritos here all right he wins the Spartan three let's give him a round 1125 00:56:44,180 --> 00:56:54,180 of applause all right Cory will authenticate him all right what's uh 1126 00:56:54,180 --> 00:56:59,680 what do we have next core all right we're giving away some mugs all right 1127 00:56:59,680 --> 00:57:07,920 ready sighting here we go these are official from Intel the winner is Votman 1128 00:57:07,920 --> 00:57:15,400 all right come on up we need another one all right let's give him a round of 1129 00:57:15,400 --> 00:57:21,240 applause see this is great you guys come out early get to learn about FPGAs take 1130 00:57:21,240 --> 00:57:34,580 some cool prizes home that's a win-win all right next guy Matt a Matt a going 1131 00:57:34,580 --> 00:57:36,120 once going twice 1132 00:57:40,280 --> 00:57:40,800 Chris. 1133 00:57:45,520 --> 00:57:47,560 Alright, alright, we need, what? 1134 00:57:50,500 --> 00:57:53,760 Looks like a two? Alright, alright, maybe. 1135 00:57:55,300 --> 00:57:57,380 Cry two? I'm sorry. 1136 00:58:08,820 --> 00:58:11,560 Alright, let's see, we got two Intel t-shirts. 1137 00:58:13,340 --> 00:58:14,380 Dave King? 1138 00:58:16,540 --> 00:58:17,340 Dave King. 1139 00:58:18,080 --> 00:58:22,120 Alright, coming on up. Alright, round of applause. 1140 00:58:24,740 --> 00:58:27,880 Last but not least, ooh, that was a good one. 1141 00:58:28,060 --> 00:58:31,400 Joel Voss? Joel, are you here? 1142 00:58:31,560 --> 00:58:31,880 Alright. 1143 00:58:34,740 --> 00:58:37,540 Alright, we got three more contests coming up. 1144 00:58:37,540 --> 00:58:41,260 Plenty of demos. We're trying to make the three hours go by a little smoother, 1145 00:58:41,460 --> 00:58:44,740 but please, for your passwords, let's make them a little bit stronger. 1146 00:58:46,560 --> 00:58:48,620 Hello does not count as a good password. 1147 00:58:49,280 --> 00:58:53,480 Alright, thank you. Okay, that's one contest down, 1148 00:58:53,700 --> 00:58:57,300 but fear not, because we got another one coming right up now. 1149 00:58:58,460 --> 00:59:01,400 So, we're giving away more prizes. We got another FPGA board, 1150 00:59:01,560 --> 00:59:04,380 we got some Intel bobbleheads, ooh, and some more t-shirts. 1151 00:59:04,860 --> 00:59:07,340 So, the question for number two, and same rules apply. 1152 00:59:07,540 --> 00:59:11,860 Guys, look around for, raise your hand if you need a slip, and give them to the C board. 1153 00:59:11,940 --> 00:59:13,940 You don't even know what the question is yet. What are you raising your hands for? 1154 00:59:15,000 --> 00:59:18,220 It might be, anyone raising their hands gives me ten dollars right now. 1155 00:59:19,620 --> 00:59:22,160 Actually, this is not really a question, but 1156 00:59:23,080 --> 00:59:26,400 you see some VHDL code right up here. What does it do? 1157 00:59:26,820 --> 00:59:31,760 And keep it simple. I don't want paragraphs of text. Although, if you make me laugh, 1158 00:59:31,900 --> 00:59:33,660 I might consider putting it in the drawing. 1159 00:59:34,780 --> 00:59:37,020 Yeah, one word should be sufficient. 1160 00:59:37,260 --> 00:59:38,920 One word should do it. 1161 00:59:58,080 --> 01:00:01,620 While people are passing things out, does anyone have any questions for Tyrell, 1162 01:00:01,900 --> 01:00:03,640 or Ryan over here about anything? 1163 01:00:03,660 --> 01:00:06,860 Anything ISE related? Just kind of stand up and shout it out. 1164 01:00:09,900 --> 01:00:13,320 There he is. Funny. 1165 01:00:15,040 --> 01:00:23,880 Okay, well actually, VHDL, 1166 01:00:24,040 --> 01:00:27,220 probably most of the market uses Verilog actually. 1167 01:00:27,640 --> 01:00:31,780 But we learned in VHDL, Verilog's pretty similar. 1168 01:00:31,940 --> 01:00:33,560 The reason you use VHDL 1169 01:00:33,560 --> 01:00:35,880 is if you do anything for the government, they require it, 1170 01:00:35,900 --> 01:00:36,720 generally speaking. 1171 01:00:39,080 --> 01:00:41,640 And Verilog, some people say it's easier to learn the 1172 01:00:42,060 --> 01:00:42,420 syntax. 1173 01:00:42,660 --> 01:00:44,740 They find it easier, but it's pretty much the same. 1174 01:00:50,160 --> 01:00:53,160 If you don't have a slip and don't feel like waiting for 1175 01:00:53,160 --> 01:00:55,520 one, and you just have scrap paper, feel free to just write 1176 01:00:55,520 --> 01:00:57,240 it down with name, password. 1177 01:00:58,580 --> 01:01:01,020 I know the software that you actually pay for has 1178 01:01:01,020 --> 01:01:05,820 very, very vast libraries of pre-created hardware. 1179 01:01:06,000 --> 01:01:08,040 I mean, is this software kind of new mode? 1180 01:01:08,600 --> 01:01:13,460 Yeah, it has some IP, what they call IP, intellectual 1181 01:01:13,460 --> 01:01:14,440 property with it. 1182 01:01:15,980 --> 01:01:19,940 Some stuff you can actually use non-commercially for free. 1183 01:01:20,600 --> 01:01:26,500 Some stuff you can buy, like M-EG-4 encoders, or you could 1184 01:01:27,000 --> 01:01:27,620 find it online. 1185 01:01:28,220 --> 01:01:30,440 Actually, a good source for libraries is 1186 01:01:30,440 --> 01:01:31,000 OpenCore. 1187 01:01:31,000 --> 01:01:32,360 It's opencores.org, I believe. 1188 01:01:32,600 --> 01:01:35,920 They have tons of HDL code that you can just download and 1189 01:01:36,260 --> 01:01:37,820 load up on your favorite FPGA. 1190 01:01:42,240 --> 01:01:45,080 When is incremental synthesis going to work well? 1191 01:01:47,560 --> 01:01:50,100 When NP-complete problems get easy, I guess. 1192 01:01:50,220 --> 01:01:50,480 I don't know. 1193 01:01:57,640 --> 01:02:00,020 What's your recommended best way for someone just 1194 01:02:00,020 --> 01:02:00,900 getting into the hardware? 1195 01:02:01,000 --> 01:02:02,080 I mean, I don't know if you've ever done a lot of 1196 01:02:02,080 --> 01:02:03,040 software in your life. 1197 01:02:04,680 --> 01:02:05,780 I don't know if you've ever done a lot of software. 1198 01:02:05,780 --> 01:02:07,860 Any particular test for it that you recommend before? 1199 01:02:08,960 --> 01:02:11,940 He asked how to get started with this kind of stuff, if 1200 01:02:11,940 --> 01:02:13,000 mainly you've done software. 1201 01:02:13,240 --> 01:02:18,980 I mean, if you've done parallel coding, you'll suddenly realize 1202 01:02:18,980 --> 01:02:20,700 that a lot of the problems are very similar. 1203 01:02:21,120 --> 01:02:23,600 If you wrote single-predate programs, you might start 1204 01:02:23,600 --> 01:02:26,660 beating your head against the wall, because you need to have 1205 01:02:26,660 --> 01:02:28,840 control over when things happen. 1206 01:02:29,060 --> 01:02:29,220 So. 1207 01:02:31,760 --> 01:02:34,260 Writing VHDL, it's completely parallelized. 1208 01:02:34,360 --> 01:02:36,300 You need to have signals for when things happen. 1209 01:02:36,460 --> 01:02:38,760 You need to have locks if you're having multiple things 1210 01:02:38,760 --> 01:02:40,180 access the same resource. 1211 01:02:41,400 --> 01:02:44,180 So these boards are fine to get started. 1212 01:02:44,680 --> 01:02:47,820 I would recommend having a project that you want to do. 1213 01:02:47,960 --> 01:02:51,320 I've seen YouTube videos of people programming FPGA so it 1214 01:02:51,320 --> 01:02:52,660 plays Guitar Hero automatically. 1215 01:02:57,380 --> 01:03:00,120 If you want to get started without any hardware, we're 1216 01:03:00,120 --> 01:03:02,600 going to be talking about GHDL soon. 1217 01:03:03,640 --> 01:03:07,040 But I think the really way to get interested is to say, I 1218 01:03:08,420 --> 01:03:11,520 have this little thing that I want to do that I think I can 1219 01:03:11,520 --> 01:03:13,660 actually pretty much draw out how it should work. 1220 01:03:14,980 --> 01:03:17,700 The way you actually really complex stuff, a lot of 1221 01:03:17,700 --> 01:03:19,480 computer science guys know it, because it's 1222 01:03:19,480 --> 01:03:20,160 finite state machines. 1223 01:03:20,600 --> 01:03:23,780 You need to have good state machines. 1224 01:03:24,180 --> 01:03:26,760 You should not have lots of nested if statements. 1225 01:03:26,880 --> 01:03:29,740 You should have basically a state 1226 01:03:29,740 --> 01:03:32,140 variable that kind of keeps you where you are in the 1227 01:03:32,140 --> 01:03:32,760 current operation. 1228 01:03:33,040 --> 01:03:35,440 Anything big like an AES core is going to use 1229 01:03:35,440 --> 01:03:36,180 something like that. 1230 01:03:37,240 --> 01:03:42,120 A lot of the old rules with a lot of the kind of behind the 1231 01:03:42,120 --> 01:03:45,120 scenes stuff and writing C kind of comes out to play when 1232 01:03:45,120 --> 01:03:46,580 you're writing very complicated systems. 1233 01:03:48,200 --> 01:03:51,920 As for actually purchasing hardware, the two major 1234 01:03:52,520 --> 01:03:54,900 manufacturers of FPGAs are Xilinx and Altera. 1235 01:03:56,260 --> 01:03:58,420 One of our sponsors, Digilent. 1236 01:03:58,420 --> 01:04:02,440 Digilent actually makes a variety of various FPGA boards 1237 01:04:03,800 --> 01:04:07,740 of various complexities and whatnot that you could get. 1238 01:04:11,380 --> 01:04:16,800 So I think we're finishing up with questions or? 1239 01:04:19,920 --> 01:04:21,720 Yeah, actually, we just installed it. 1240 01:04:22,140 --> 01:04:26,000 We don't like how it, well, for the version we have it, it 1241 01:04:26,000 --> 01:04:26,980 requires a network license. 1242 01:04:27,120 --> 01:04:28,360 But if you get download the 1243 01:04:28,360 --> 01:04:29,320 free version, it doesn't. 1244 01:04:30,980 --> 01:04:32,800 It makes a lot of improvements. 1245 01:04:33,060 --> 01:04:35,040 I haven't had a lot of sit down time with it to see what 1246 01:04:35,040 --> 01:04:37,040 breaks from the other version. 1247 01:04:37,240 --> 01:04:41,620 But overall, it looks like a nice, solid incremental build. 1248 01:04:42,660 --> 01:04:44,980 Right now, we're sticking with 10 for a while. 1249 01:04:45,100 --> 01:04:47,500 But we're still on 11 on some machines. 1250 01:04:50,520 --> 01:04:51,840 You said there are software 1251 01:04:51,840 --> 01:04:54,140 simulators that don't have any hardware? 1252 01:04:54,520 --> 01:04:56,540 Yeah, we'll cover that, actually. 1253 01:04:56,600 --> 01:04:57,000 Is that next? 1254 01:04:58,360 --> 01:04:58,720 Yeah. 1255 01:04:59,560 --> 01:05:00,900 So that's, where is it? 1256 01:05:00,940 --> 01:05:01,040 Yeah. 1257 01:05:01,620 --> 01:05:02,620 So we'll get to that. 1258 01:05:03,060 --> 01:05:06,800 Does anyone need to see the thing up there anymore? 1259 01:05:07,780 --> 01:05:08,720 Can we move on? 1260 01:05:10,480 --> 01:05:11,920 I want to check you. 1261 01:05:12,000 --> 01:05:12,700 Can you feel? 1262 01:05:13,180 --> 01:05:13,740 All right. 1263 01:05:13,840 --> 01:05:14,120 It's . 1264 01:05:15,100 --> 01:05:15,840 All right. 1265 01:05:16,340 --> 01:05:17,700 Cory's working his way back up here. 1266 01:05:17,800 --> 01:05:18,780 It's actually his talk. 1267 01:05:20,500 --> 01:05:24,500 And Steve is back there. 1268 01:05:25,640 --> 01:05:26,080 Thank you. 1269 01:05:26,200 --> 01:05:26,380 Bye. 1270 01:05:26,380 --> 01:05:26,600 Bye. 1271 01:05:27,260 --> 01:05:27,700 Bye. 1272 01:05:27,700 --> 01:05:28,140 Bye. 1273 01:05:28,140 --> 01:05:28,340 Bye. 1274 01:05:29,620 --> 01:05:33,180 Okay, so I'm actually going to not talk about something contest-related this time, which 1275 01:05:33,180 --> 01:05:34,980 I'm sorry about, but we'll get back to it. 1276 01:05:36,140 --> 01:05:39,500 GHDL is a GNU VHDL simulator. 1277 01:05:40,260 --> 01:05:44,080 If you don't have the money to shell out for a board, but you want to start playing around 1278 01:05:44,080 --> 01:05:45,980 with VHDL, it's a great way to get started. 1279 01:05:46,200 --> 01:05:48,060 It uses the GCC compiler technology. 1280 01:05:48,900 --> 01:05:50,080 It's a command line interface. 1281 01:05:50,180 --> 01:05:54,600 There's the URL for it if you want to download it, completely free. 1282 01:05:54,600 --> 01:05:58,040 The current version, I believe, is .26 or .27. 1283 01:05:59,080 --> 01:06:00,540 We use .25. 1284 01:06:00,960 --> 01:06:02,480 Don't ask me why, we just do. 1285 01:06:04,440 --> 01:06:11,260 The beauty of this is, as it was explained, VHDL, DoD approved language, GHDL, coded in 1286 01:06:11,260 --> 01:06:14,920 Ada, another DoD language, so you're going to be doing a lot of compiling. 1287 01:06:15,280 --> 01:06:19,060 Sorry about that, but there's a lot of binary packages out there, so just a heads up. 1288 01:06:21,760 --> 01:06:23,200 So why use VHDL? 1289 01:06:23,320 --> 01:06:24,100 Obviously it's free. 1290 01:06:24,600 --> 01:06:25,600 It's easy to download and use. 1291 01:06:26,300 --> 01:06:32,380 If you have Linux, people have tried to compile it for Cygwin, and it just fails miserably. 1292 01:06:32,500 --> 01:06:33,000 I don't know why. 1293 01:06:33,440 --> 01:06:35,620 But there is a Windows version of it. 1294 01:06:36,340 --> 01:06:39,560 I couldn't get it working, but you guys might do better than I did. 1295 01:06:39,740 --> 01:06:42,700 And there's no FPGA required, so it's literally free. 1296 01:06:42,820 --> 01:06:45,080 You don't need to shell out any money whatsoever. 1297 01:06:46,980 --> 01:06:50,300 I'm also going to talk a little about the MIPS architecture, which probably most people 1298 01:06:50,300 --> 01:06:50,760 know about. 1299 01:06:50,980 --> 01:06:53,240 It's a simple 32-bit RISC architecture. 1300 01:06:53,240 --> 01:06:57,080 It's used all over the place to teach basics of computer architecture. 1301 01:06:57,460 --> 01:06:59,960 A common simulator is called SPIM. 1302 01:07:00,540 --> 01:07:06,720 It's primarily used in embedded systems, TiVo, Cisco routers, and a lot of game consoles. 1303 01:07:07,060 --> 01:07:11,560 PlayStation, PlayStation 2, PlayStation Portable, N64, you know. 1304 01:07:12,140 --> 01:07:15,900 So it's a fairly commonly used architecture. 1305 01:07:17,220 --> 01:07:23,220 And for one of the courses at University of Delaware, we actually designed a computer. 1306 01:07:23,220 --> 01:07:30,040 And coded in VHDL a 32-bit MIPS multi-cycle CPU using a finite state machine controller, 1307 01:07:30,340 --> 01:07:31,360 five-stage data path. 1308 01:07:31,840 --> 01:07:35,460 We didn't program the full ISA, but about six instructions. 1309 01:07:35,720 --> 01:07:38,560 If you want to add more, obviously, it's just a matter of coding more. 1310 01:07:41,340 --> 01:07:43,660 Test benches are a big thing in GHDL. 1311 01:07:43,720 --> 01:07:50,720 Because you don't use an FPGA in order to see if your code works, you need to write 1312 01:07:50,720 --> 01:07:51,700 a test bench for it. 1313 01:07:51,760 --> 01:07:52,520 Give it inputs. 1314 01:07:52,520 --> 01:07:53,600 And try and program. 1315 01:07:54,320 --> 01:07:55,740 See if it gives you the right outputs. 1316 01:07:56,140 --> 01:08:00,780 So it will basically, a test bench will create an instance of the code you want to test. 1317 01:08:00,980 --> 01:08:02,020 Create a running clock. 1318 01:08:02,280 --> 01:08:06,040 And then run it against input and assert correct output. 1319 01:08:06,240 --> 01:08:08,300 And hopefully what you assert is right. 1320 01:08:09,840 --> 01:08:12,260 So GHDL, like I said, is a command line program. 1321 01:08:12,680 --> 01:08:14,300 There are a bunch of flags up there. 1322 01:08:14,440 --> 01:08:17,600 You don't need to memorize them because there's the manual page for it. 1323 01:08:18,440 --> 01:08:20,500 But you know, you have to analyze your code. 1324 01:08:20,660 --> 01:08:21,940 You have to create your executable. 1325 01:08:21,940 --> 01:08:22,780 Of your test bench. 1326 01:08:22,880 --> 01:08:23,860 You have to run your executable. 1327 01:08:24,020 --> 01:08:27,820 That last little function down there is for a program called GTKWave, which we'll talk 1328 01:08:27,820 --> 01:08:29,900 about, Steve's going to talk about later. 1329 01:08:32,000 --> 01:08:37,540 So this is, you know, the series that you have to run in order to run something. 1330 01:08:38,000 --> 01:08:38,700 You compile. 1331 01:08:39,040 --> 01:08:43,740 You analyze your, if you want to make a shift register, you write your shift register program. 1332 01:08:43,980 --> 01:08:45,660 And then you write your test bench for it. 1333 01:08:46,580 --> 01:08:47,840 You analyze both of them. 1334 01:08:47,880 --> 01:08:49,380 Create your executable of your test bench. 1335 01:08:49,460 --> 01:08:50,240 And run the test bench. 1336 01:08:50,340 --> 01:08:51,680 And hopefully it doesn't say error. 1337 01:08:52,580 --> 01:08:56,000 Which, more often than not, it will say error, especially when you're just getting started. 1338 01:08:58,100 --> 01:09:00,920 GTKWave is very similar to the ISC waveform simulator. 1339 01:09:01,820 --> 01:09:03,120 But again, it's open source. 1340 01:09:03,180 --> 01:09:03,960 It uses GTK. 1341 01:09:04,460 --> 01:09:05,080 Who'd a thunk? 1342 01:09:06,040 --> 01:09:09,620 It can view, you can view any of the signals in any of the code that you're running. 1343 01:09:09,780 --> 01:09:14,500 And you can view it as binary, hex, integers, anything that's useful for you. 1344 01:09:14,820 --> 01:09:15,980 For the vectors. 1345 01:09:16,200 --> 01:09:18,440 You can also see for signals, it just gives you a waveform. 1346 01:09:19,820 --> 01:09:21,480 So we're going to give you a quick demonstration. 1347 01:09:21,940 --> 01:09:27,040 Of a MIPS microprocessor that we wrote, a multi-cycle 32-bit like we talked about earlier. 1348 01:09:28,260 --> 01:09:33,540 Steve's going to run through it and just show you some code and show you it running, hopefully. 1349 01:09:33,780 --> 01:09:35,120 And then show you GTKWave. 1350 01:09:41,420 --> 01:09:42,140 All right. 1351 01:09:42,260 --> 01:09:43,800 So a couple things. 1352 01:09:44,760 --> 01:09:48,980 Now I've heard some people, they've talked to me before and they've said, well, I don't 1353 01:09:48,980 --> 01:09:49,860 know VHDL. 1354 01:09:49,940 --> 01:09:51,400 And that's really the, you know. 1355 01:09:51,940 --> 01:09:53,800 It's a long block from getting me playing with that stuff. 1356 01:09:54,360 --> 01:09:57,580 And I don't want to go out and spend the initial money to get the FPGA. 1357 01:09:58,100 --> 01:10:00,240 Well, I didn't either until I found this. 1358 01:10:00,400 --> 01:10:01,600 It's very easy. 1359 01:10:01,760 --> 01:10:05,600 And as you're going to see as we walk you through our little virtual machine that it's 1360 01:10:06,180 --> 01:10:07,860 really not as hard as it may seem. 1361 01:10:09,240 --> 01:10:13,140 So here we have our CPU that, as he said, was done by a team of three. 1362 01:10:13,340 --> 01:10:14,160 We were undergrads. 1363 01:10:14,180 --> 01:10:20,240 We had no knowledge about the processor and how to make it, how to code VHDL. 1364 01:10:20,240 --> 01:10:23,800 So let's see if we can zoom in. 1365 01:10:24,660 --> 01:10:25,580 Control-Alt. 1366 01:10:27,200 --> 01:10:28,400 Can we make it bigger? 1367 01:10:29,280 --> 01:10:30,240 Let's go full screen. 1368 01:10:30,420 --> 01:10:31,400 Let's full screen it. 1369 01:10:32,140 --> 01:10:33,160 Does that help at all? 1370 01:10:33,980 --> 01:10:34,440 No. 1371 01:10:34,760 --> 01:10:35,640 No, no, no. 1372 01:10:35,640 --> 01:10:36,800 It's exactly the same size. 1373 01:10:36,800 --> 01:10:37,220 Great. 1374 01:10:37,680 --> 01:10:38,140 Yeah. 1375 01:10:39,420 --> 01:10:40,360 Let's try this. 1376 01:10:45,120 --> 01:10:45,680 Tip up. 1377 01:10:47,380 --> 01:10:48,000 Let's see. 1378 01:10:48,200 --> 01:10:48,660 And. 1379 01:10:49,760 --> 01:10:50,220 Okay. 1380 01:10:50,680 --> 01:10:51,080 Hopefully. 1381 01:10:51,440 --> 01:10:51,720 Better? 1382 01:10:52,740 --> 01:10:53,140 Better. 1383 01:10:53,160 --> 01:10:53,460 Better. 1384 01:10:53,740 --> 01:10:55,280 I know it's not perfect. 1385 01:10:56,520 --> 01:10:59,160 We'll post this code up if you want. 1386 01:10:59,280 --> 01:10:59,940 You want to do that? 1387 01:11:00,000 --> 01:11:00,120 Sure. 1388 01:11:00,140 --> 01:11:00,340 Why not? 1389 01:11:00,340 --> 01:11:03,460 We'll put the code up on the website so if you want to pull it down later and 1390 01:11:03,460 --> 01:11:03,960 take a look. 1391 01:11:04,560 --> 01:11:06,000 I'll go over the basic flow. 1392 01:11:06,640 --> 01:11:10,560 So basically as, basically there's a bunch of VHDL files. 1393 01:11:10,780 --> 01:11:15,360 Each time you make an entity, kind of like how you might make an object in coding, you'll 1394 01:11:15,360 --> 01:11:18,400 make it its own VHDL file and you'll make it its own entity. 1395 01:11:18,400 --> 01:11:24,300 So, for instance, when we wanted to register, we would make the reg.vhdl file. 1396 01:11:24,580 --> 01:11:27,700 Now you can make these things generic and all that fun stuff. 1397 01:11:27,960 --> 01:11:30,800 All those details that are wonderfully documented online. 1398 01:11:31,540 --> 01:11:36,260 But what we're going to look at right now is the part that brings it all together, the 1399 01:11:36,260 --> 01:11:38,000 super CPU as we called it. 1400 01:11:43,640 --> 01:11:44,340 Do we? 1401 01:11:45,120 --> 01:11:45,940 All right. 1402 01:11:47,000 --> 01:11:47,520 Disclaimer. 1403 01:11:47,520 --> 01:11:50,420 I did not make this VM, so he can't yell at me. 1404 01:11:52,260 --> 01:11:55,260 Emacs, VI, I know, I don't want to start the war, so. 1405 01:11:56,060 --> 01:11:56,460 Emacs. 1406 01:11:56,680 --> 01:11:56,960 Nano. 1407 01:11:58,840 --> 01:12:03,740 Nano I know comes default on Gen 2, so when all else fails, I go drop down the nano. 1408 01:12:03,980 --> 01:12:06,800 You know, pico for those who want to go even older. 1409 01:12:08,280 --> 01:12:13,680 So like they've gone over, you know, you've got your library, your includes, build the 1410 01:12:13,680 --> 01:12:15,460 CPU, bring it all together. 1411 01:12:15,540 --> 01:12:17,500 As you can see in here, we've got stuff like this. 1412 01:12:17,500 --> 01:12:20,760 Like the ALU, all the stuff that we coded individually, right? 1413 01:12:20,980 --> 01:12:26,520 But none of this really makes sense to us, at least from analyzing it, because all this 1414 01:12:26,520 --> 01:12:28,000 is done is actually glued it together. 1415 01:12:28,200 --> 01:12:31,020 Imagine you have a circuit, all this is done is connected the wires. 1416 01:12:32,380 --> 01:12:40,000 So now what we have is, as Corey was pointing out, the test bench, okay? 1417 01:12:40,420 --> 01:12:42,480 Now the test bench has a certain format. 1418 01:12:42,660 --> 01:12:44,440 I'll be honest, I never memorized it. 1419 01:12:44,520 --> 01:12:47,060 We were given a test bench and I just kept editing it. 1420 01:12:47,500 --> 01:12:51,680 So it makes sense eventually, but it's not something I've memorized. 1421 01:12:53,620 --> 01:12:55,880 However, what you do is basically this. 1422 01:12:56,020 --> 01:12:57,640 You've got a black box at this point. 1423 01:12:57,820 --> 01:12:59,740 You've got all the connectors to the outside. 1424 01:13:00,080 --> 01:13:02,420 What you do is you start hooking up inputs to them. 1425 01:13:02,560 --> 01:13:07,880 For instance, here we might set the signal for the reset to one, the clock to one, and 1426 01:13:07,880 --> 01:13:08,660 the done to zero. 1427 01:13:09,180 --> 01:13:09,660 Right? 1428 01:13:09,740 --> 01:13:11,640 So these are the initial states we'll set it to. 1429 01:13:12,560 --> 01:13:15,380 Then after this, we start beginning a process. 1430 01:13:16,100 --> 01:13:16,700 Let's see. 1431 01:13:16,700 --> 01:13:18,240 It's a little bit down further. 1432 01:13:18,540 --> 01:13:19,500 There it is. 1433 01:13:19,620 --> 01:13:20,440 Right here. 1434 01:13:20,620 --> 01:13:25,780 Where we actually start driving input into our black box, all right? 1435 01:13:26,060 --> 01:13:28,300 And we start hoping that output comes out. 1436 01:13:28,580 --> 01:13:33,680 If you were to want to actually test the functionality, let's look at the register. 1437 01:13:36,540 --> 01:13:37,060 Okay. 1438 01:13:40,880 --> 01:13:42,120 What's got a test bench? 1439 01:13:43,920 --> 01:13:45,380 Do we have any test benches? 1440 01:13:45,520 --> 01:13:45,640 No. 1441 01:13:45,780 --> 01:13:46,200 Oh. 1442 01:13:46,200 --> 01:13:46,400 Well. 1443 01:13:46,800 --> 01:13:47,420 All right. 1444 01:13:47,440 --> 01:13:48,120 Sorry about that. 1445 01:13:48,580 --> 01:13:49,720 We'll go back to this one. 1446 01:13:49,900 --> 01:13:54,720 If you wanted to actually test the functionality of something, you can do things just like 1447 01:13:54,720 --> 01:13:59,340 in C. You can assert the states and stuff like that and have it print out wonderfulness 1448 01:13:59,340 --> 01:14:01,160 like this isn't right. 1449 01:14:02,820 --> 01:14:05,440 Usually you'll find out it's due to things like timing. 1450 01:14:05,560 --> 01:14:09,980 So it gives a nice, wonderful output telling you at what millisecond or what exact clock 1451 01:14:09,980 --> 01:14:11,140 cycle it failed. 1452 01:14:13,440 --> 01:14:14,980 And that's basically it. 1453 01:14:14,980 --> 01:14:17,280 It's just like getting the output from a C compiler. 1454 01:14:17,620 --> 01:14:20,080 You get a bunch of stuff and you got to hope you understand it. 1455 01:14:21,100 --> 01:14:25,220 So what we have over here is what's known as GTK wave. 1456 01:14:28,440 --> 01:14:29,680 Let's full screen this. 1457 01:14:30,660 --> 01:14:31,360 All right. 1458 01:14:31,500 --> 01:14:36,620 Now GTK wave takes a special output file that's generated by GHDL. 1459 01:14:36,880 --> 01:14:42,220 Think of it more as the sort of like it took snapshots along the way of what was happening 1460 01:14:42,220 --> 01:14:42,960 at every instance. 1461 01:14:43,080 --> 01:14:44,260 And it records that in a file. 1462 01:14:44,260 --> 01:14:46,400 And then this allows you to visualize it. 1463 01:14:46,560 --> 01:14:50,740 So here we have different inputs from our CPU actually inside it. 1464 01:14:50,780 --> 01:14:53,620 Remember before I said the test bench can't test the internals. 1465 01:14:53,640 --> 01:14:54,900 It'll test the externals. 1466 01:14:55,620 --> 01:14:59,520 GTK wave allows you to view the internals, view every signal inside of it. 1467 01:14:59,640 --> 01:15:04,320 We were so excited when we found out we could see inside our CPU and didn't have to keep 1468 01:15:04,320 --> 01:15:06,840 guessing based on it was just not working. 1469 01:15:07,620 --> 01:15:11,400 So over here on the left, you'll get a wonderful list. 1470 01:15:16,340 --> 01:15:17,480 We're going to ignore that. 1471 01:15:17,780 --> 01:15:18,700 Moving right along. 1472 01:15:18,980 --> 01:15:21,780 It'll give you all your signals broken down from every component. 1473 01:15:21,980 --> 01:15:22,700 For instance, the memory. 1474 01:15:22,920 --> 01:15:26,300 You can look at the clock cycle that's going into the memory to find out there's one point 1475 01:15:26,300 --> 01:15:28,960 that we somehow inverted the clock going into our memory. 1476 01:15:29,580 --> 01:15:30,280 Wasn't fun. 1477 01:15:30,680 --> 01:15:35,880 Over here, you can then drag these signals that'll show up down here from the components 1478 01:15:36,320 --> 01:15:36,960 over here. 1479 01:15:37,120 --> 01:15:40,120 And it'll give you in terms of the time unit. 1480 01:15:41,200 --> 01:15:42,960 Here we've got our clock going. 1481 01:15:43,220 --> 01:15:44,240 We've got some data. 1482 01:15:44,240 --> 01:15:44,580 Data output. 1483 01:15:44,960 --> 01:15:46,020 We've got different stuff. 1484 01:15:46,240 --> 01:15:47,240 I think we had a component. 1485 01:15:47,520 --> 01:15:48,680 Is this the super CPU? 1486 01:15:48,920 --> 01:15:49,180 Yeah. 1487 01:15:49,300 --> 01:15:49,740 Okay. 1488 01:15:49,920 --> 01:15:52,020 So we've got some operations occurring. 1489 01:15:52,260 --> 01:15:54,960 And as you can see here, you can see them in hex. 1490 01:15:55,240 --> 01:15:57,780 We can blow this up and view them in binary. 1491 01:15:58,080 --> 01:16:00,840 We could look at them in any type of format you want. 1492 01:16:00,960 --> 01:16:03,900 So if you've got ASCII characters going through, you can look at that. 1493 01:16:04,540 --> 01:16:08,840 Now you'll notice here at the top you see PS for picoseconds. 1494 01:16:09,360 --> 01:16:10,400 This is simulation. 1495 01:16:10,840 --> 01:16:14,060 We called it the super CPU because we could set whatever time. 1496 01:16:14,060 --> 01:16:14,600 We wanted. 1497 01:16:14,760 --> 01:16:16,320 And our processor ran at it. 1498 01:16:16,460 --> 01:16:21,580 So do not take this literally and translate it into hardware because it will fail. 1499 01:16:23,060 --> 01:16:27,560 As Rodney was pointing out, there's a stage in the actual ISE step that'll show you where 1500 01:16:27,560 --> 01:16:30,340 that simulation goes into reality and takes into those effects. 1501 01:16:32,060 --> 01:16:39,440 No matter how much you want, you will not design a 500 gigahertz CPU with your FPGA. 1502 01:16:40,260 --> 01:16:41,620 You can do it on this, though. 1503 01:16:41,720 --> 01:16:42,340 It's fun. 1504 01:16:45,020 --> 01:16:50,740 Although our processor was 2 gigahertz, somehow we were able to simulate 500 gigahertz. 1505 01:16:50,880 --> 01:16:51,800 The beauty of simulation. 1506 01:16:54,200 --> 01:16:56,800 So within here, you'll see that we have 32-bit. 1507 01:16:56,920 --> 01:16:58,440 Right here it says 31 to 0. 1508 01:16:58,620 --> 01:17:02,400 That means we have 32 bits wide, and we can decode all those lines. 1509 01:17:02,520 --> 01:17:05,620 We can even expand them and look at the individual lines if we wanted to. 1510 01:17:06,020 --> 01:17:09,960 You can look at any of the clock intervals and do wonderful things like that, search, 1511 01:17:10,120 --> 01:17:10,640 set markers. 1512 01:17:10,900 --> 01:17:14,040 All the stuff you might do if you were doing, say, a... 1513 01:17:14,040 --> 01:17:16,280 A GDB trace through your source code. 1514 01:17:16,400 --> 01:17:17,360 So you can think of it that way. 1515 01:17:18,660 --> 01:17:21,040 Again, it's available across all the platforms. 1516 01:17:21,420 --> 01:17:22,560 We've run it on OSX. 1517 01:17:22,640 --> 01:17:23,440 We've run it on Linux. 1518 01:17:23,580 --> 01:17:24,420 We've run it on Windows. 1519 01:17:24,560 --> 01:17:26,360 So it's easy to get into. 1520 01:17:26,600 --> 01:17:30,360 Not so much GHDL running on all those, but GTK wave. 1521 01:17:31,280 --> 01:17:37,900 And kind of a forewarning, there's two outputs that you can create off GHDL. 1522 01:17:38,000 --> 01:17:40,960 One will say that it's the GTK wave format. 1523 01:17:41,080 --> 01:17:42,580 One that says it's the Verilog format. 1524 01:17:42,580 --> 01:17:43,860 Avoid the Verilog one. 1525 01:17:44,040 --> 01:17:47,600 It's not fully compatible, and you'll only get to see some of your things. 1526 01:17:48,300 --> 01:17:53,000 So when you go back and look at the slides, Corey gave the proper argument for that. 1527 01:17:53,260 --> 01:17:54,340 So that's it. 1528 01:17:54,460 --> 01:17:56,540 And I think that about wraps it up. 1529 01:17:59,320 --> 01:18:00,900 So I'm going to... 1530 01:18:00,900 --> 01:18:05,140 Now that you guys sat through our lovely little discussion about that, I'm going to set this 1531 01:18:05,140 --> 01:18:07,280 back to the right screen size, hopefully. 1532 01:18:10,420 --> 01:18:11,320 Cross the finger. 1533 01:18:11,400 --> 01:18:11,840 Yeah. 1534 01:18:12,120 --> 01:18:12,560 Yeah. 1535 01:18:12,580 --> 01:18:13,820 Oh, that's nice. 1536 01:18:14,300 --> 01:18:15,840 And yup, you guessed it. 1537 01:18:15,920 --> 01:18:17,260 It's contest time again. 1538 01:18:20,320 --> 01:18:21,980 So we're going to announce our winners. 1539 01:18:22,760 --> 01:18:24,740 Again, we're giving away another FPGA board. 1540 01:18:24,940 --> 01:18:26,460 We're giving away some bobbleheads and some t-shirts. 1541 01:18:26,620 --> 01:18:28,600 So we're going to do the same thing we did last time. 1542 01:18:28,680 --> 01:18:33,540 And hopefully Bob or Chris or whoever shows up this time. 1543 01:18:38,600 --> 01:18:39,040 Okay. 1544 01:18:39,140 --> 01:18:41,540 So we saw some pretty interesting answers this time. 1545 01:18:41,540 --> 01:18:44,920 Some people thought that the code was a port scanner for some reason. 1546 01:18:46,440 --> 01:18:48,940 I'd love to see someone implement that on FPGA. 1547 01:18:49,060 --> 01:18:49,760 I'm sure it's been done. 1548 01:18:49,960 --> 01:18:51,260 But no, it wasn't. 1549 01:18:51,260 --> 01:18:54,160 It was actually a MUX, and quite a few people got it right this time. 1550 01:18:54,260 --> 01:18:57,740 So it should be interesting who gets the Spartan this time. 1551 01:18:58,080 --> 01:19:00,020 So for the Spartan 3E... 1552 01:19:01,440 --> 01:19:03,080 Using true random numbers? 1553 01:19:04,240 --> 01:19:05,000 Pseudo-random. 1554 01:19:05,200 --> 01:19:05,380 Yep. 1555 01:19:05,520 --> 01:19:05,960 I'm sorry. 1556 01:19:06,040 --> 01:19:06,660 Pseudo-random. 1557 01:19:07,240 --> 01:19:07,680 Okay. 1558 01:19:07,980 --> 01:19:09,160 Michael Bringle. 1559 01:19:10,260 --> 01:19:10,880 Hey, hey. 1560 01:19:10,880 --> 01:19:11,680 All right. 1561 01:19:11,740 --> 01:19:12,100 Congratulations. 1562 01:19:13,320 --> 01:19:13,840 All right. 1563 01:19:17,600 --> 01:19:20,100 Apparently we have some Intel bobbleheads. 1564 01:19:20,300 --> 01:19:21,040 This should be good. 1565 01:19:23,460 --> 01:19:24,860 We'll show off these guys. 1566 01:19:27,360 --> 01:19:27,880 Ooh. 1567 01:19:29,660 --> 01:19:30,880 That's some nice swag. 1568 01:19:30,900 --> 01:19:31,760 Have to run over with that. 1569 01:19:34,300 --> 01:19:35,340 Mike Johnson. 1570 01:19:37,820 --> 01:19:38,340 Oh. 1571 01:19:38,620 --> 01:19:39,340 Gave us... 1572 01:19:39,340 --> 01:19:39,800 All right. 1573 01:19:39,800 --> 01:19:40,120 All right. 1574 01:19:40,340 --> 01:19:40,860 All right. 1575 01:19:40,880 --> 01:19:41,500 Congratulations. 1576 01:19:44,800 --> 01:19:46,080 All right. 1577 01:19:48,460 --> 01:19:50,500 And the other bobblehead. 1578 01:19:53,960 --> 01:19:54,600 AGL. 1579 01:19:56,140 --> 01:19:57,580 There it is. 1580 01:19:58,360 --> 01:19:59,000 Congratulations. 1581 01:20:00,420 --> 01:20:00,720 All right. 1582 01:20:02,780 --> 01:20:03,740 Feeling lucky. 1583 01:20:03,740 --> 01:20:04,280 Yeah, yeah. 1584 01:20:04,280 --> 01:20:04,880 Feeling lucky. 1585 01:20:04,960 --> 01:20:05,520 All right. 1586 01:20:06,040 --> 01:20:06,680 Oh. 1587 01:20:06,820 --> 01:20:07,400 Okay. 1588 01:20:07,480 --> 01:20:08,400 For the T-shirt. 1589 01:20:09,240 --> 01:20:09,880 Jesse. 1590 01:20:10,220 --> 01:20:10,860 Jesse. 1591 01:20:10,880 --> 01:20:12,300 Is there a few Jesses? 1592 01:20:14,900 --> 01:20:15,740 All right. 1593 01:20:15,760 --> 01:20:18,200 I'm going to check the password. 1594 01:20:22,360 --> 01:20:23,520 Sorry, other Jesse. 1595 01:20:24,980 --> 01:20:25,620 It's okay. 1596 01:20:25,980 --> 01:20:27,140 Maybe I'll pick yours next. 1597 01:20:28,300 --> 01:20:28,720 Okay. 1598 01:20:28,740 --> 01:20:30,320 And for the last T-shirt. 1599 01:20:30,980 --> 01:20:32,140 Kai of the Sky. 1600 01:20:32,280 --> 01:20:33,280 I think I pronounced it right. 1601 01:20:33,420 --> 01:20:34,080 Kai of the Sky. 1602 01:20:34,220 --> 01:20:34,620 Yeah. 1603 01:20:34,700 --> 01:20:35,080 Oh, whoa. 1604 01:20:35,160 --> 01:20:35,780 Right here in the front. 1605 01:20:36,720 --> 01:20:37,140 Oh. 1606 01:20:37,160 --> 01:20:37,460 Oh. 1607 01:20:37,680 --> 01:20:38,100 Oh. 1608 01:20:38,100 --> 01:20:38,500 Oh. 1609 01:20:39,380 --> 01:20:39,800 Oh. 1610 01:20:39,800 --> 01:20:40,140 Oh. 1611 01:20:40,480 --> 01:20:40,760 Oh. 1612 01:20:41,660 --> 01:20:42,380 Uh-oh. 1613 01:20:42,380 --> 01:20:43,680 He's forgot the password. 1614 01:20:44,920 --> 01:20:46,040 Doesn't have the password. 1615 01:20:46,600 --> 01:20:52,300 Well, does anybody else have Kai of the Sky in this room that would contest this winner? 1616 01:20:56,520 --> 01:20:58,340 I don't see another one, so. 1617 01:21:02,120 --> 01:21:02,740 Bagel Monster. 1618 01:21:03,100 --> 01:21:03,960 That's a strong one. 1619 01:21:04,080 --> 01:21:04,520 All right. 1620 01:21:04,540 --> 01:21:04,940 Well, thank you. 1621 01:21:04,980 --> 01:21:07,160 And we got two more contests coming up. 1622 01:21:09,840 --> 01:21:10,540 There you go. 1623 01:21:10,620 --> 01:21:10,860 Thank you. 1624 01:21:11,500 --> 01:21:14,480 So, by now, I think you guys got the general idea. 1625 01:21:14,680 --> 01:21:18,800 This time, we're going to give away another, yeah, another board and some T-shirts. 1626 01:21:19,900 --> 01:21:24,320 And after this, we're but one contest away from giving away the netbook, so I hope people 1627 01:21:24,320 --> 01:21:25,120 stay around for that. 1628 01:21:26,140 --> 01:21:33,360 The third question this time around, what is the largest on-chip memory? 1629 01:21:34,100 --> 01:21:35,820 Actually, we haven't done that part yet. 1630 01:21:35,860 --> 01:21:37,900 We haven't done this yet, apparently. 1631 01:21:38,380 --> 01:21:38,820 So. 1632 01:21:40,040 --> 01:21:40,780 I don't know. 1633 01:21:40,780 --> 01:21:41,300 We don't know what we want to do. 1634 01:21:42,300 --> 01:21:43,780 We'll just do the talk, and then. 1635 01:21:43,920 --> 01:21:46,040 We'll do the talk and have the question after that. 1636 01:21:46,160 --> 01:21:51,800 So if anyone just read that and they're starting to think, just, just. 1637 01:21:52,620 --> 01:21:52,900 No. 1638 01:21:52,960 --> 01:21:53,600 Keep an ear out. 1639 01:21:53,820 --> 01:21:54,100 No. 1640 01:21:54,100 --> 01:21:54,320 No. 1641 01:21:54,600 --> 01:21:54,880 Okay. 1642 01:21:55,760 --> 01:21:56,660 Keep an ear out. 1643 01:21:56,740 --> 01:21:57,640 It has something to do with memory. 1644 01:21:58,320 --> 01:21:58,600 So. 1645 01:22:05,900 --> 01:22:06,680 I don't know. 1646 01:22:07,440 --> 01:22:08,520 Are you doing it right here? 1647 01:22:08,580 --> 01:22:08,780 No. 1648 01:22:08,940 --> 01:22:09,120 I'm doing it here. 1649 01:22:09,120 --> 01:22:09,180 No. 1650 01:22:09,420 --> 01:22:10,040 I'm doing it here. 1651 01:22:10,140 --> 01:22:10,240 No. 1652 01:22:10,480 --> 01:22:10,760 No. 1653 01:22:11,980 --> 01:22:12,460 Okay. 1654 01:22:15,640 --> 01:22:16,120 Okay. 1655 01:22:19,420 --> 01:22:26,680 So, I'm Dr. K. Actually, I teach the, some of the VHDL courses at University of Delaware, 1656 01:22:26,700 --> 01:22:29,260 and all the guys here have taken these courses. 1657 01:22:29,340 --> 01:22:34,740 We have, just to share with you, we have three courses in this. 1658 01:22:34,860 --> 01:22:39,980 The first course, they come in and just learn the language, VHDL language, and run GHDL. 1659 01:22:39,980 --> 01:22:44,580 Second course, they come in and they run a lot of Xilinx programs, build a small video 1660 01:22:44,580 --> 01:22:46,340 game, do EDK stuff. 1661 01:22:46,660 --> 01:22:52,860 The third course, we actually build, they design and build their PCB, send it to FAB, 1662 01:22:52,920 --> 01:22:58,020 it comes back, they solder on the FPGA, the DDR RAM, and then they actually build their 1663 01:22:58,020 --> 01:22:58,540 own box. 1664 01:22:58,680 --> 01:23:02,040 It could be a game, it could be a wireless LAN or something like that. 1665 01:23:02,200 --> 01:23:03,440 So it's a lot of fun. 1666 01:23:04,240 --> 01:23:06,800 So I'm going to give you a background on EDK. 1667 01:23:07,860 --> 01:23:10,380 EDK is very powerful stuff. 1668 01:23:10,620 --> 01:23:12,060 It's kind of the next level. 1669 01:23:12,880 --> 01:23:18,060 You know, we're starting to see so complex systems now, you know, with all kinds of functions, 1670 01:23:18,240 --> 01:23:21,720 and when you're building these things, you don't want to start from scratch, right? 1671 01:23:21,760 --> 01:23:25,900 You want to sort of bring in a lot of components, a lot of, it's called IP, intellectual property 1672 01:23:25,900 --> 01:23:28,440 on, and that's what the EDK allows you to do. 1673 01:23:29,680 --> 01:23:36,580 So the embedded development kit is a piece of software from Xilinx, and that enables 1674 01:23:36,800 --> 01:23:38,420 you to develop embedded systems. 1675 01:23:38,840 --> 01:23:47,800 It includes all the tools, documentation, and IP components that you need to build pretty 1676 01:23:47,800 --> 01:23:48,920 reasonable systems. 1677 01:23:50,120 --> 01:23:55,440 And it enables you to integrate both hardware, which is your design, hardware design, with 1678 01:23:55,440 --> 01:23:55,920 the software. 1679 01:23:56,140 --> 01:23:57,560 And I'll show you how to do that. 1680 01:23:59,100 --> 01:24:01,640 Now unfortunately, EDK is not free. 1681 01:24:01,820 --> 01:24:04,520 It is $495 to buy. 1682 01:24:04,940 --> 01:24:06,780 And you can buy it from these two designs. 1683 01:24:06,780 --> 01:24:07,180 These two distributors. 1684 01:24:07,320 --> 01:24:11,280 And there is a 30-day evaluation that you can get from Xilinx. 1685 01:24:12,080 --> 01:24:17,960 And there's also a link at the bottom for manuals and application notes if you're interested 1686 01:24:17,960 --> 01:24:19,340 to learn more about EDK. 1687 01:24:20,840 --> 01:24:21,480 All right. 1688 01:24:21,520 --> 01:24:26,140 So this is going to be a little bit of repeat of what Rodney did in the very beginning. 1689 01:24:26,420 --> 01:24:31,160 So if you want to build an embedded system, something that has a fixed function, not a 1690 01:24:31,160 --> 01:24:34,540 general purpose computer, you have a number of choices today. 1691 01:24:34,660 --> 01:24:35,840 You can, you know. 1692 01:24:36,540 --> 01:24:38,000 Take a microcontroller. 1693 01:24:38,100 --> 01:24:40,200 And the DEF CON badge is a good example, right? 1694 01:24:40,280 --> 01:24:43,360 If you were here last year, the badge had a microcontroller. 1695 01:24:43,520 --> 01:24:46,460 And now this year, the DEF CON badge has a DSP. 1696 01:24:46,620 --> 01:24:48,180 So that's another way to do it. 1697 01:24:48,980 --> 01:24:56,720 If you have a very large volume and you have a very low-cost target per unit, then you 1698 01:24:56,720 --> 01:24:58,840 might actually consider building your own ASIC. 1699 01:24:59,000 --> 01:25:01,200 You know, basically a custom integrated circuit. 1700 01:25:01,600 --> 01:25:02,580 Costs a lot of money. 1701 01:25:02,660 --> 01:25:05,740 There's a lot of, you know. 1702 01:25:05,800 --> 01:25:05,820 I don't know. 1703 01:25:05,840 --> 01:25:07,100 A lot of upfront cost. 1704 01:25:07,320 --> 01:25:11,380 But this is the way to get parts at 10 cents a part or something like that. 1705 01:25:11,880 --> 01:25:16,080 And then the fourth way, which I'm going to be talking about here with you, is using FPGAs 1706 01:25:16,080 --> 01:25:17,500 using the EDK. 1707 01:25:17,740 --> 01:25:18,320 All right. 1708 01:25:18,340 --> 01:25:22,180 And hopefully I can illustrate to you why you would want to consider an FPGA for an 1709 01:25:22,180 --> 01:25:22,800 embedded system. 1710 01:25:23,900 --> 01:25:28,600 So the steps that you need to take when you're designing embedded systems in an FPGA are 1711 01:25:28,600 --> 01:25:29,040 the following. 1712 01:25:29,260 --> 01:25:31,100 You first develop your hardware design. 1713 01:25:31,360 --> 01:25:31,660 Okay. 1714 01:25:31,720 --> 01:25:33,540 Your hardware design is, okay. 1715 01:25:33,600 --> 01:25:35,120 Am I going to use a CPU? 1716 01:25:35,120 --> 01:25:37,080 What type of CPU I'm going to have? 1717 01:25:37,180 --> 01:25:39,700 Is it going to have an instruction cache, data cache? 1718 01:25:40,120 --> 01:25:41,700 Then am I going to use memory? 1719 01:25:41,880 --> 01:25:44,880 Is it going to be DDR RAM, SDR, is it going to be flash? 1720 01:25:45,320 --> 01:25:47,140 What IP components do I need? 1721 01:25:47,220 --> 01:25:48,540 Do I need an Ethernet controller? 1722 01:25:48,880 --> 01:25:50,980 Do I need a PCI interface? 1723 01:25:51,620 --> 01:25:56,180 Once you've done with your hardware design, the next step would be to generate the drivers 1724 01:25:56,180 --> 01:25:56,800 and libraries. 1725 01:25:57,020 --> 01:26:00,060 So it's, in essence, you've built a custom computer for yourself. 1726 01:26:00,360 --> 01:26:03,940 And now whoever is going to write the software will need the library files. 1727 01:26:03,940 --> 01:26:06,040 And we'll need the include files. 1728 01:26:06,220 --> 01:26:07,980 And you need to generate that. 1729 01:26:08,080 --> 01:26:09,300 That's what we'll show you how to do. 1730 01:26:09,500 --> 01:26:14,120 Once that's generated, you can actually hand this thing over to somebody who knows very 1731 01:26:14,120 --> 01:26:17,820 little about FPGAs, is more at an application software level. 1732 01:26:17,980 --> 01:26:21,540 And they can develop the code that implements your application. 1733 01:26:23,100 --> 01:26:26,340 So what I'm showing here is a typical embedded system. 1734 01:26:26,860 --> 01:26:29,960 This is for the boards that we have right now. 1735 01:26:30,140 --> 01:26:33,820 And what you can see there is that the, at the heart of it all. 1736 01:26:33,820 --> 01:26:35,300 Is a Micro Blaze processor. 1737 01:26:35,760 --> 01:26:36,920 It's a 32-bit processor. 1738 01:26:37,340 --> 01:26:40,840 And then you would select, this is a soft processor. 1739 01:26:41,000 --> 01:26:41,760 You would select it. 1740 01:26:41,800 --> 01:26:43,820 You would configure it with the options you like. 1741 01:26:44,120 --> 01:26:47,460 And it would be compiled and thrown onto the FPGA. 1742 01:26:47,860 --> 01:26:52,180 And then with that processor, you would select whatever IP you need. 1743 01:26:52,320 --> 01:26:56,540 So whatever your embedded system needs, you would pick the components that you need and 1744 01:26:56,540 --> 01:26:57,560 add them to your design. 1745 01:26:59,600 --> 01:27:03,300 And the Micro Blaze is one of two processors. 1746 01:27:03,300 --> 01:27:09,740 That Xilinx provides for this particular board that we're giving away today. 1747 01:27:09,980 --> 01:27:11,280 That's the only option. 1748 01:27:11,900 --> 01:27:16,900 But their more powerful Vertex devices can do a PowerPC type of processor. 1749 01:27:17,460 --> 01:27:19,840 So the Micro Blaze is a 32-bit processor. 1750 01:27:20,140 --> 01:27:21,320 It's soft configurable. 1751 01:27:21,420 --> 01:27:22,420 There's lots of options. 1752 01:27:22,560 --> 01:27:25,100 You can configure it to be a three stage or a five stage. 1753 01:27:25,300 --> 01:27:26,820 You can have instruction data cache. 1754 01:27:27,120 --> 01:27:29,500 You can have a floating point unit if you wish. 1755 01:27:29,680 --> 01:27:32,480 You can also have virtual memory. 1756 01:27:34,540 --> 01:27:38,660 You have 32-bit general purpose registers, 32 of them. 1757 01:27:38,840 --> 01:27:43,080 And you have two different instruction types. 1758 01:27:43,240 --> 01:27:45,660 And this shows you some assembly language code for them. 1759 01:27:47,120 --> 01:27:51,960 Now I said that one of the keys to embedded system development is these IP cores. 1760 01:27:52,120 --> 01:27:54,900 Because you've got to get your system built really fast. 1761 01:27:55,340 --> 01:27:57,760 And it's got to follow all these standards. 1762 01:27:58,000 --> 01:28:02,020 And the fastest way to do it is rather than writing your own code, pull in these components 1763 01:28:02,020 --> 01:28:02,980 that are pre-made. 1764 01:28:03,200 --> 01:28:07,860 And so Xilinx has created a wide variety of IP cores. 1765 01:28:08,340 --> 01:28:12,280 And you will see in the demo, you can just pull them and drop them into your design. 1766 01:28:12,700 --> 01:28:17,540 You can also go to opensource.org and get the source code for these cores. 1767 01:28:17,800 --> 01:28:22,200 The stuff you get from Xilinx, about half of it is free and you can use it on a royalty 1768 01:28:22,200 --> 01:28:22,780 free basis. 1769 01:28:23,160 --> 01:28:28,480 And I believe the other half is actually either from Xilinx or from other vendors, third party 1770 01:28:28,480 --> 01:28:28,860 vendors. 1771 01:28:29,120 --> 01:28:30,280 You can try it. 1772 01:28:30,280 --> 01:28:31,260 If you like it. 1773 01:28:32,120 --> 01:28:36,720 I've never gone to that level, but I believe you'll have to pay royalties for usage. 1774 01:28:37,820 --> 01:28:43,060 Now one thing I want to say is this whole design is based on memory mapped IO. 1775 01:28:43,340 --> 01:28:48,560 In other words, when you write code for your microprocessor, the memory space, the 32-bit 1776 01:28:48,560 --> 01:28:51,540 address space, is basically going to be partitioned. 1777 01:28:51,540 --> 01:28:55,320 And you're going to have, you know, your main memory is going to be in there. 1778 01:28:55,500 --> 01:28:59,780 And then your peripherals will actually be mapped into the address space, okay? 1779 01:28:59,780 --> 01:29:05,100 So, when you read and write in your code to the memory locations, you might be actually 1780 01:29:05,100 --> 01:29:07,900 writing to RAM or you might be talking to your peripherals. 1781 01:29:08,080 --> 01:29:11,020 You may be, you know, sending stuff over the Ethernet controller. 1782 01:29:11,320 --> 01:29:15,580 And the thing I want to make you aware of is that there's different latencies and penalties. 1783 01:29:15,780 --> 01:29:20,340 You know, from the code point of view, it's the same C or assembly language instruction 1784 01:29:20,340 --> 01:29:21,360 that does the write. 1785 01:29:21,540 --> 01:29:27,680 But if you're writing to a DDR RAM, your latency might be five clock cycles, but I know that 1786 01:29:27,680 --> 01:29:29,760 if you're writing to a USB. 1787 01:29:29,780 --> 01:29:35,400 If you're writing to a UART or a USB device that is sitting on a bus, then the latency 1788 01:29:35,400 --> 01:29:37,640 is going to be at least 50 clock cycles. 1789 01:29:37,820 --> 01:29:41,260 And if the bus is busy with other transactions, it might take longer. 1790 01:29:45,060 --> 01:29:52,600 So you might wonder, well, why should I use FPGAs to build embedded systems, right? 1791 01:29:52,700 --> 01:29:59,000 So the main thing, in my opinion, is that it allows you to trade off between hardware 1792 01:29:59,000 --> 01:29:59,920 and software, right? 1793 01:30:00,040 --> 01:30:04,820 I mean, let's say you write some function on a CPU and you run it and you find it's 1794 01:30:04,820 --> 01:30:05,940 not fast enough, right? 1795 01:30:06,040 --> 01:30:07,640 It's not fast enough for your application. 1796 01:30:07,900 --> 01:30:13,280 So then what you have is you have this thing called fast simplex links. 1797 01:30:13,420 --> 01:30:18,040 And fast simplex links is basically if you have something, it doesn't work fast enough, 1798 01:30:18,240 --> 01:30:24,660 you go off to the side and you write a piece of VHDL code using what Ryan just showed you, 1799 01:30:24,700 --> 01:30:26,540 VHDL ISC. 1800 01:30:26,820 --> 01:30:28,680 And that accelerates that. 1801 01:30:28,680 --> 01:30:31,600 That by 1,000, maybe 100,000 times. 1802 01:30:31,880 --> 01:30:38,280 And then you use a fast simplex link to actually put it inside the processor pipeline. 1803 01:30:39,180 --> 01:30:48,600 And so then you basically execute, you can dispatch work for your custom functions from 1804 01:30:48,600 --> 01:30:53,260 the processor and the latency penalty is only a few clock cycles, okay? 1805 01:30:53,400 --> 01:30:57,060 So you can literally trade off hardware and software. 1806 01:30:57,200 --> 01:30:58,480 And you can sort of move that. 1807 01:30:58,680 --> 01:30:59,180 That's a boundary. 1808 01:30:59,440 --> 01:31:01,260 And that's what the power of EDK is. 1809 01:31:01,440 --> 01:31:05,660 And those functions are actually implemented in hardware, the ones that you want to accelerate. 1810 01:31:05,920 --> 01:31:08,960 And you can have multiple accelerators in your design. 1811 01:31:11,800 --> 01:31:15,560 The FSL bus is implemented using a FIFO. 1812 01:31:15,620 --> 01:31:18,900 So you basically write inside of your processor. 1813 01:31:19,560 --> 01:31:23,820 As soon as you get instructions to the FSL, they go into a FIFO and they come out on the 1814 01:31:23,820 --> 01:31:24,780 FIFO on the other end. 1815 01:31:24,940 --> 01:31:27,000 So if your accelerator is... 1816 01:31:27,000 --> 01:31:28,660 Has a latency of one clock cycle. 1817 01:31:28,660 --> 01:31:31,080 You will get that result on the next clock cycle. 1818 01:31:31,280 --> 01:31:31,980 It's really fast. 1819 01:31:32,960 --> 01:31:38,540 So for example, for our project where the students build a video game, they design their 1820 01:31:38,540 --> 01:31:39,740 own graphics card, right? 1821 01:31:39,880 --> 01:31:43,300 They design their graphics accelerator that drives the VGA. 1822 01:31:43,600 --> 01:31:46,820 That graphic accelerator runs on the FSL bus. 1823 01:31:47,060 --> 01:31:52,040 And you can imagine if you did it on a PLB bus where you have 50 clock cycle latency, 1824 01:31:52,260 --> 01:31:54,240 the video game would be very stuttery. 1825 01:31:55,600 --> 01:31:57,540 So now I want to talk about the tools. 1826 01:31:57,540 --> 01:32:02,800 So there are actually three tools that are in the play when you do embedded development. 1827 01:32:03,240 --> 01:32:06,860 The tool over here is basically what Ryan showed you. 1828 01:32:06,900 --> 01:32:08,840 That's the standard ISE stuff. 1829 01:32:09,520 --> 01:32:12,640 What we have on the left here is basically an SDK. 1830 01:32:12,920 --> 01:32:14,440 It's a software development environment. 1831 01:32:14,720 --> 01:32:15,840 You're just writing C code. 1832 01:32:16,080 --> 01:32:19,440 And in the middle here is the embedded design system. 1833 01:32:20,020 --> 01:32:21,240 So how does it work? 1834 01:32:21,760 --> 01:32:23,260 Well, you start out here. 1835 01:32:23,420 --> 01:32:24,760 You're the computer architect. 1836 01:32:25,120 --> 01:32:26,360 And you say, what do I need? 1837 01:32:26,540 --> 01:32:27,520 I'm going to need two products. 1838 01:32:27,540 --> 01:32:27,660 I'm going to need two processors. 1839 01:32:28,060 --> 01:32:31,460 I'm going to need an I-O controller, an Ethernet port, Wi-Fi controller. 1840 01:32:31,760 --> 01:32:33,940 So you specify that, what you want. 1841 01:32:34,600 --> 01:32:37,300 And then that creates a system netlist. 1842 01:32:37,620 --> 01:32:43,540 And then that netlist is actually hundreds of thousands of lines of VHDL code, yeah? 1843 01:32:43,700 --> 01:32:44,680 It's crazy. 1844 01:32:44,940 --> 01:32:45,720 It's just a lot of code. 1845 01:32:45,960 --> 01:32:49,960 Then that's dropped into ISE, and ISE runs compile. 1846 01:32:50,180 --> 01:32:56,100 So compile of hardware for EDK can take a very long time because you are compiling large 1847 01:32:56,100 --> 01:32:57,580 pieces of code. 1848 01:32:58,280 --> 01:33:02,260 Then that produces the bit file, okay? 1849 01:33:03,360 --> 01:33:08,280 And you can actually take that bit file and you can download it on an FPGA. 1850 01:33:08,400 --> 01:33:09,620 And many students do that. 1851 01:33:09,740 --> 01:33:11,760 And then they find out that it does nothing. 1852 01:33:11,960 --> 01:33:13,060 Why is that? 1853 01:33:14,060 --> 01:33:15,640 The software is not there, right? 1854 01:33:15,740 --> 01:33:22,000 So when you throw that onto the FPGA, your processor is probably executing a no-op loop. 1855 01:33:22,140 --> 01:33:23,840 And it's just going to sit there doing nothing. 1856 01:33:23,840 --> 01:33:29,520 So what we need is we have our embedded system, it's ready to go, but we haven't written 1857 01:33:29,520 --> 01:33:29,980 the software. 1858 01:33:30,340 --> 01:33:34,320 So the next step you do is you create a board support package. 1859 01:33:34,580 --> 01:33:36,040 This is done for you automatically. 1860 01:33:36,220 --> 01:33:42,080 And this is a bunch of libraries, header files that the software needs so you can write your 1861 01:33:42,080 --> 01:33:43,960 C code for your hardware, okay? 1862 01:33:44,400 --> 01:33:48,940 Then you go into this SDK environment, which basically has nothing to do with FPGAs, and 1863 01:33:48,940 --> 01:33:51,760 you write your code, all right? 1864 01:33:51,880 --> 01:33:53,820 And that produces a link file. 1865 01:33:54,420 --> 01:33:59,980 And the final step is this application called Data2Mem, which takes your hardware image, 1866 01:34:00,220 --> 01:34:05,420 takes your software image, brings them together into one unified bit file, and then that gets 1867 01:34:05,420 --> 01:34:08,460 downloaded onto the FPGA and then you're up and running, okay? 1868 01:34:08,560 --> 01:34:13,740 Then you download that and you've got your iPod or a video game or whatever it is that 1869 01:34:13,740 --> 01:34:14,180 you're building. 1870 01:34:15,480 --> 01:34:18,800 So to summarize, the flow consists of these steps. 1871 01:34:18,980 --> 01:34:22,720 First you develop the hardware, decide what pieces you want. 1872 01:34:23,200 --> 01:34:26,820 Next step is to develop the embedded software, okay? 1873 01:34:27,080 --> 01:34:29,720 And then you operate in hardware, okay? 1874 01:34:31,580 --> 01:34:32,060 Yes? 1875 01:34:32,580 --> 01:34:37,340 Is there, like, a flash bank inside the FPGA that all the code is stored on the 1876 01:34:37,340 --> 01:34:37,620 ? 1877 01:34:37,620 --> 01:34:39,380 You could do it that way. 1878 01:34:39,500 --> 01:34:41,640 Or you could have it hard-coded right into the CPU. 1879 01:34:42,600 --> 01:34:45,920 You can actually have a file system where you load programs. 1880 01:34:47,320 --> 01:34:49,320 Then you start to get an operating system land. 1881 01:34:49,500 --> 01:34:50,860 So you very... 1882 01:34:50,860 --> 01:34:51,060 I have a question. 1883 01:34:51,220 --> 01:34:51,920 I guess... 1884 01:34:52,720 --> 01:34:52,980 How many... 1885 01:34:52,980 --> 01:34:56,320 How much space does it take to actually take off gates within the other CPU? 1886 01:34:56,320 --> 01:34:56,760 Okay. 1887 01:34:56,940 --> 01:34:57,140 Yes. 1888 01:34:57,560 --> 01:34:58,040 Yeah. 1889 01:34:58,860 --> 01:35:00,700 Well, can you repeat the question, please? 1890 01:35:01,020 --> 01:35:03,320 So you're writing code that's micro-placed or what? 1891 01:35:03,700 --> 01:35:06,840 You know, where inside the FPGA does it go? 1892 01:35:06,880 --> 01:35:08,360 Does it take off microcells? 1893 01:35:08,560 --> 01:35:08,900 Okay. 1894 01:35:09,000 --> 01:35:12,240 Let me repeat for the rest of the audience your question. 1895 01:35:12,320 --> 01:35:13,660 The question is, you're writing code. 1896 01:35:14,060 --> 01:35:15,580 Where does that code go? 1897 01:35:16,200 --> 01:35:16,680 Okay. 1898 01:35:16,940 --> 01:35:19,300 There are lots of options. 1899 01:35:19,580 --> 01:35:22,380 The FPGA itself has an onboard memory. 1900 01:35:22,380 --> 01:35:28,200 As you will see, the device we have on this board has 32 kilobytes of onboard memory. 1901 01:35:28,420 --> 01:35:30,340 It's incredibly fast because it's onboard. 1902 01:35:31,820 --> 01:35:33,960 Now, so you can put your program there. 1903 01:35:34,120 --> 01:35:40,240 But if your program is pretty big, on our particular board, we have a 64-megabyte DDR RAM chip. 1904 01:35:40,480 --> 01:35:42,560 So you can have it loaded there. 1905 01:35:43,300 --> 01:35:45,440 We also have parallel flash. 1906 01:35:45,760 --> 01:35:47,020 You can put your program there. 1907 01:35:47,180 --> 01:35:48,220 We have serial flash. 1908 01:35:48,560 --> 01:35:50,040 You can put your program there. 1909 01:35:50,040 --> 01:35:52,520 The FPGA supports many different options. 1910 01:35:52,680 --> 01:35:55,480 When the students design their board in a class, they choose. 1911 01:35:55,800 --> 01:35:59,340 You know, they put some people put SD card and they put the code there. 1912 01:35:59,540 --> 01:36:01,960 The EDK supports that. 1913 01:36:02,300 --> 01:36:05,400 And you specify where you want your code to go. 1914 01:36:05,580 --> 01:36:08,680 And it kind of automatically manages all that, which is really nice. 1915 01:36:08,820 --> 01:36:10,320 You know all that memory mapped I.O.? 1916 01:36:10,320 --> 01:36:11,100 It's done for you. 1917 01:36:11,600 --> 01:36:12,060 Yeah. 1918 01:36:12,160 --> 01:36:13,080 And you'll see that in the demo. 1919 01:36:13,580 --> 01:36:14,420 Other questions? 1920 01:36:14,760 --> 01:36:19,220 That's actually one of the biggest things that the EDK does for you is hide that complexity 1921 01:36:19,220 --> 01:36:21,080 and manage all that mapping. 1922 01:36:21,260 --> 01:36:23,900 And from the C point of view, you're just writing to memory. 1923 01:36:26,720 --> 01:36:27,560 I have a question. 1924 01:36:28,000 --> 01:36:34,300 When I was writing a program, an embedded GUI program, would I do the GUI from the software side or from the VHDL side? 1925 01:36:35,040 --> 01:36:41,320 The question is, if I was writing an embedded system that has a GUI, would I do the GUI on the software side 1926 01:36:41,320 --> 01:36:44,380 or would I do the GUI on the VHDL or hardware side? 1927 01:36:45,580 --> 01:36:49,200 I think the answer to that, in my opinion, would be that, you know, 1928 01:36:49,220 --> 01:36:53,020 if you want to do accelerated GUI functions like putting up windows, 1929 01:36:53,280 --> 01:36:57,280 you could actually write some cool VHDL to really do that fast. 1930 01:36:57,540 --> 01:37:00,960 And then on the software side, you would call those hardware functions. 1931 01:37:02,060 --> 01:37:04,660 Does VHDL support a GUI framework? 1932 01:37:06,300 --> 01:37:07,860 Can somebody else answer? 1933 01:37:08,080 --> 01:37:11,160 The question was, does VHDL support a GUI framework? 1934 01:37:12,940 --> 01:37:18,660 In VHDL, I mean, you're writing in hardware, so you're kind of creating your own driver 1935 01:37:18,660 --> 01:37:19,200 and assembly. 1936 01:37:19,220 --> 01:37:22,180 It doesn't make a lot of sense for VGA or whatever you're outputting to. 1937 01:37:22,640 --> 01:37:28,500 So, I mean, whatever functionality you wanted to include, you write, you know? 1938 01:37:28,740 --> 01:37:33,520 The other thing I would probably say about this is, and also kind of an aside, 1939 01:37:33,720 --> 01:37:36,680 I think the reason why this software still costs money is because it's fairly, 1940 01:37:37,260 --> 01:37:40,060 well, it's been around for a while, but it just started to come into its own. 1941 01:37:40,180 --> 01:37:43,680 And the Linux kernel actually, a couple major revisions ago, 1942 01:37:43,800 --> 01:37:47,300 just added the micro blaze processor as one of its supported architectures. 1943 01:37:47,300 --> 01:37:56,700 So a lot of these questions are kind of open because you can run Linux on the FPGA. 1944 01:37:56,980 --> 01:38:01,460 So if you got Linux and you got your VGA controller, you don't need to write a GUI framework. 1945 01:38:02,560 --> 01:38:05,340 If you, you know, theoretically, could you write your own? 1946 01:38:05,400 --> 01:38:12,300 I think that you're quickly, you, I think where this is going is there's going to be a lot of Linux 1947 01:38:12,300 --> 01:38:16,840 and there's going to be a lot of reusing of code because you don't want to reinvent the wheel. 1948 01:38:16,840 --> 01:38:18,960 You don't want to code an entire operating system. 1949 01:38:19,160 --> 01:38:23,480 The idea is that you can do the hardware parts that you want to do that are very specific to your application 1950 01:38:23,480 --> 01:38:26,820 and then reuse a bunch of code that's already been written by other people. 1951 01:38:26,900 --> 01:38:27,560 That's good code. 1952 01:38:28,960 --> 01:38:33,480 So I think that we haven't done GUI programs yet on ours. 1953 01:38:33,940 --> 01:38:38,840 We're kind of in the Commodore 64 era, if you will, with our development of this stuff, 1954 01:38:38,980 --> 01:38:44,740 but I think that it's quickly going to, it's going to vary over the next couple of years on the complexity of this. 1955 01:38:45,600 --> 01:38:46,000 Okay. 1956 01:38:46,000 --> 01:38:47,120 So let's do a demo. 1957 01:38:47,260 --> 01:38:48,600 So here's my board. 1958 01:38:48,680 --> 01:38:50,460 It's all hooked up to the PC. 1959 01:38:50,600 --> 01:38:51,720 I've got the power cable. 1960 01:38:52,020 --> 01:38:59,160 I have a serial port that I'm going to, one of the peripherals I'm going to show you that I'm going to instantiate is a serial port. 1961 01:38:59,400 --> 01:39:01,560 So that's my serial port cable here. 1962 01:39:01,700 --> 01:39:07,940 The other peripheral I'm using, there's a USB port here, and it's used for programming the FPGA. 1963 01:39:08,040 --> 01:39:09,260 That's how we send the bit file. 1964 01:39:09,640 --> 01:39:15,420 And I'll show you also, we'll run a hardware debugger and actually step through the processor step-by-step 1965 01:39:15,420 --> 01:39:15,980 through instructions. 1966 01:39:16,000 --> 01:39:19,280 And the debugging is done over the USB port. 1967 01:39:19,480 --> 01:39:27,800 So I'm going to set that down and launch the SDK for you, the EDK. 1968 01:39:27,940 --> 01:39:39,120 So yeah, I'll try to increase the font size. 1969 01:39:39,220 --> 01:39:45,780 So the EDK, I'm going to use a wizard, you know, to sort of speed things up. 1970 01:39:47,340 --> 01:39:49,360 And I'm going to give it a directory. 1971 01:39:52,280 --> 01:39:55,360 Is it, it is really small, huh? 1972 01:39:56,360 --> 01:39:57,740 Can I see it on the back? 1973 01:40:01,020 --> 01:40:02,320 Oh, hold on. 1974 01:40:02,380 --> 01:40:03,680 Yeah, we'll change that. 1975 01:40:04,880 --> 01:40:07,560 It really, ah, that's annoying. 1976 01:40:09,380 --> 01:40:10,200 Here we go. 1977 01:40:13,000 --> 01:40:13,520 Yes. 1978 01:40:13,520 --> 01:40:13,740 Yes. 1979 01:40:14,320 --> 01:40:14,760 Okay. 1980 01:40:15,640 --> 01:40:16,300 Out now. 1981 01:40:18,440 --> 01:40:19,060 All right. 1982 01:40:20,280 --> 01:40:24,180 So I'm going to create a new design for this particular board. 1983 01:40:25,100 --> 01:40:27,680 So I'm going to create, say, create a new design. 1984 01:40:28,360 --> 01:40:31,440 And this board is made by Xilinx. 1985 01:40:32,040 --> 01:40:34,060 And they make a number of different boards. 1986 01:40:34,180 --> 01:40:35,640 I know that this is this board. 1987 01:40:35,920 --> 01:40:37,620 And I know that it's revision D. 1988 01:40:37,680 --> 01:40:38,740 So I'm going to select that. 1989 01:40:39,480 --> 01:40:40,100 All right. 1990 01:40:40,100 --> 01:40:47,600 So the wizard actually knows that this board is, got this FPGA Spartan 3. 1991 01:40:47,720 --> 01:40:49,580 And it knows all the various parts on it. 1992 01:40:49,680 --> 01:40:55,020 So now it's basically offering me to configure peripherals on this board for my design. 1993 01:40:55,380 --> 01:40:58,420 So the first thing I'm going to do is I'm going to configure a processor. 1994 01:40:58,640 --> 01:40:59,720 I'm going to use the Micro Blaze. 1995 01:41:01,040 --> 01:41:03,040 And I can choose a different speed. 1996 01:41:03,120 --> 01:41:04,620 I'm going to run it at 50 megahertz. 1997 01:41:04,680 --> 01:41:10,080 As I said, in order to have real-time debugging capability, as we write software, 1998 01:41:10,100 --> 01:41:12,880 we need to include the on-chip hardware debug module. 1999 01:41:13,200 --> 01:41:18,560 And I said earlier that the maximum on-chip memory we can use is 32 kilobytes. 2000 01:41:18,700 --> 01:41:20,160 I'm just going to go with 16 here. 2001 01:41:20,440 --> 01:41:26,180 And if our program is larger than that, you'll see there's an option later to use other memory. 2002 01:41:26,520 --> 01:41:27,880 We're not going to use a cache. 2003 01:41:28,100 --> 01:41:29,620 We're not going to use a floating point unit. 2004 01:41:29,760 --> 01:41:35,520 And, in fact, Micro Blaze has about two dozen other options that you can drill down later on. 2005 01:41:35,680 --> 01:41:37,980 The wizard is kind of for simple use. 2006 01:41:38,200 --> 01:41:39,740 You know, it doesn't expose all those. 2007 01:41:40,900 --> 01:41:42,580 This is the peripherals. 2008 01:41:42,600 --> 01:41:46,220 Basically, what peripherals on your board do you want to use in your embedded design? 2009 01:41:46,580 --> 01:41:49,980 I'm just going to use one peripheral, and that is the RS-232 port. 2010 01:41:50,140 --> 01:41:51,380 That's the cable I showed you. 2011 01:41:51,900 --> 01:41:53,820 And so I'm going to uncheck the LEDs. 2012 01:41:54,020 --> 01:41:55,040 I'm not going to use them. 2013 01:41:55,900 --> 01:41:56,300 Buttons. 2014 01:41:56,340 --> 01:42:01,400 And when I uncheck that, that means there's actually not going to be hardware generated on the FPGA 2015 01:42:01,400 --> 01:42:03,340 to interface with those components. 2016 01:42:04,320 --> 01:42:07,820 So you can see that DDRS DRAM, I'm not going to use that. 2017 01:42:07,920 --> 01:42:09,860 And that will actually save a lot of FPGA. 2018 01:42:10,380 --> 01:42:14,560 On the other hand, if your program is very large, you would want that probably. 2019 01:42:14,840 --> 01:42:16,340 There is an Ethernet interface. 2020 01:42:16,700 --> 01:42:18,840 I'm not going to use it, so I'm going to uncheck that. 2021 01:42:19,460 --> 01:42:20,120 All right. 2022 01:42:20,160 --> 01:42:24,700 So at this point, I have my, I'm sort of at the end of this. 2023 01:42:24,940 --> 01:42:30,360 And what it's telling me here is that my standard I.O. will go to the RS-232 port. 2024 01:42:30,980 --> 01:42:35,520 And so to see it, we'll actually run TerraTerm and see it in the TerraTerm window. 2025 01:42:36,200 --> 01:42:39,780 And then my boot memory, that was a question earlier. 2026 01:42:39,780 --> 01:42:42,900 Where is your code coming, executing from the FPGA? 2027 01:42:43,320 --> 01:42:47,900 That's basically where you say, okay, my code will run from ILMB controller, 2028 01:42:48,180 --> 01:42:50,360 which is the local memory on the FPGA. 2029 01:42:51,300 --> 01:42:53,280 Here I'm going to pick an application. 2030 01:42:53,500 --> 01:42:56,060 It's actually going to make me an application, self-test application. 2031 01:42:56,500 --> 01:42:58,400 So it's going to have, okay. 2032 01:42:58,500 --> 01:43:04,040 And this screen here is telling me where do you want your instructions, data, stack, and heap. 2033 01:43:04,180 --> 01:43:08,040 So again, you can put all these in different types of memories in your device. 2034 01:43:08,040 --> 01:43:08,480 Okay. 2035 01:43:08,920 --> 01:43:10,000 Here's your memory map. 2036 01:43:10,800 --> 01:43:13,280 You have the UART. 2037 01:43:13,340 --> 01:43:14,520 This is your serial port. 2038 01:43:14,700 --> 01:43:16,620 This is the base address for the serial port. 2039 01:43:16,860 --> 01:43:20,420 This is the hardware debugger, and it has a different base address. 2040 01:43:21,200 --> 01:43:24,580 Here's your local memory, all 32 kilobytes of local memory. 2041 01:43:24,740 --> 01:43:32,380 This, by the way, is your, one of them is your instruction memory, and the other one is your data. 2042 01:43:32,520 --> 01:43:34,540 And they basically share the same space. 2043 01:43:35,060 --> 01:43:36,360 And now I hit generate. 2044 01:43:36,360 --> 01:43:41,260 And once I hit generate, it'll come back. 2045 01:43:41,500 --> 01:43:43,980 And here's my architecture, basically. 2046 01:43:44,160 --> 01:43:45,880 So let's look at this. 2047 01:43:45,940 --> 01:43:50,380 This is kind of my, you know, main screen into the EDK. 2048 01:43:51,140 --> 01:43:54,600 What you see here, I can draw a block diagram. 2049 01:43:55,320 --> 01:43:57,820 And you'll see this is my design. 2050 01:43:59,040 --> 01:44:00,800 It kind of looks like an iPod. 2051 01:44:02,380 --> 01:44:03,760 But this is my processor. 2052 01:44:03,760 --> 01:44:06,860 And this is my memory. 2053 01:44:07,280 --> 01:44:09,300 And so this is one view. 2054 01:44:09,440 --> 01:44:10,640 This is kind of a graphical view. 2055 01:44:11,100 --> 01:44:14,360 I can also go here, and I can see the system view. 2056 01:44:14,500 --> 01:44:16,520 So you can see it's probably small font. 2057 01:44:16,680 --> 01:44:18,860 But these, all of these things are your components. 2058 01:44:19,420 --> 01:44:21,760 And remember I told you about the IP components. 2059 01:44:21,980 --> 01:44:26,860 If I click here on the IP catalog, you can see it's, again, I apologize for the small font. 2060 01:44:26,980 --> 01:44:28,760 But there is lots of different components. 2061 01:44:28,980 --> 01:44:32,000 So you can go here and look at PCI. 2062 01:44:32,500 --> 01:44:33,780 Here's a PCI arbiter. 2063 01:44:34,020 --> 01:44:40,080 And if I want to include that in my design, all I have to do is drag it here and drop it into my hardware design. 2064 01:44:40,620 --> 01:44:41,480 And it appears. 2065 01:44:41,660 --> 01:44:45,360 Now, I don't think I want to do that in my case right now. 2066 01:44:46,820 --> 01:44:48,380 So I'm going to delete it. 2067 01:44:51,260 --> 01:44:51,700 . 2068 01:44:54,740 --> 01:44:57,500 Yeah, 495, you get, yeah, you get everything. 2069 01:44:57,720 --> 01:45:00,540 And if I click here on some of these things. 2070 01:45:00,540 --> 01:45:01,640 Where is that? 2071 01:45:01,780 --> 01:45:05,300 You will see that the ones that have a green star are free. 2072 01:45:05,540 --> 01:45:07,540 And you can use them to your heart's content. 2073 01:45:07,940 --> 01:45:10,620 But there is some paid stuff somewhere here. 2074 01:45:10,880 --> 01:45:11,340 Okay. 2075 01:45:11,620 --> 01:45:15,120 So you can see like this, right, with a dollar sign and a lock. 2076 01:45:15,320 --> 01:45:16,500 You can use that. 2077 01:45:17,000 --> 01:45:20,540 But I think if you start selling it, you need to pay. 2078 01:45:21,220 --> 01:45:21,880 All right. 2079 01:45:21,940 --> 01:45:24,000 So let's move on here. 2080 01:45:24,100 --> 01:45:25,960 So you've built your hardware. 2081 01:45:26,220 --> 01:45:26,700 Right? 2082 01:45:26,780 --> 01:45:27,900 These are the components. 2083 01:45:28,180 --> 01:45:29,020 You can add components. 2084 01:45:29,020 --> 01:45:30,880 You can go into your processor. 2085 01:45:31,020 --> 01:45:31,800 You can right click. 2086 01:45:32,000 --> 01:45:33,740 And you can configure your processor. 2087 01:45:34,120 --> 01:45:37,360 You know, so as I said, there are tons of options for a microbrace. 2088 01:45:37,500 --> 01:45:38,500 You have a barrel shifter. 2089 01:45:38,540 --> 01:45:40,400 You know, just configure whatever you like. 2090 01:45:41,760 --> 01:45:45,860 You can, once you're happy with this, you can change your address space. 2091 01:45:46,180 --> 01:45:50,140 What you would do is you would go to the hardware and you would generate netlist. 2092 01:45:51,260 --> 01:45:51,700 Okay. 2093 01:45:51,800 --> 01:45:57,920 And what that would do is it would go and grab the VHDL or Verilog for all these different components. 2094 01:45:57,920 --> 01:46:05,180 And stuff that you pay for probably is going to be encrypted, Verilog or VHDL, because they typically don't want to show the source code. 2095 01:46:05,480 --> 01:46:09,880 And it's going to create this one netlist, which is, I don't know, 100,000 lines. 2096 01:46:10,200 --> 01:46:11,620 And it's going to run a compile. 2097 01:46:11,840 --> 01:46:12,920 And so it's a very long compile. 2098 01:46:13,240 --> 01:46:15,500 You can see this arrow here spinning. 2099 01:46:15,760 --> 01:46:19,080 So what I'm going to do is I'm actually going to interrupt this process. 2100 01:46:20,200 --> 01:46:26,420 And I'm going to load something that, the same thing that's already been compiled so we can just move on quickly. 2101 01:46:26,620 --> 01:46:26,820 Okay. 2102 01:46:28,900 --> 01:46:30,980 So here is a design. 2103 01:46:32,020 --> 01:46:35,320 And it's the same design but except that I've already compiled it. 2104 01:46:36,140 --> 01:46:36,620 Alright. 2105 01:46:36,860 --> 01:46:38,060 So it's been compiled. 2106 01:46:38,460 --> 01:46:42,280 And what I normally would do after generating the netlist, I would generate the bitstream. 2107 01:46:43,260 --> 01:46:43,740 Okay. 2108 01:46:44,380 --> 01:46:46,980 And again, nothing to do because it's already been done. 2109 01:46:47,140 --> 01:46:52,720 Now if I, I can send that to this board and nothing would happen because my software isn't done yet. 2110 01:46:53,000 --> 01:46:55,920 My software is under here, under the applications tab. 2111 01:46:56,320 --> 01:46:56,800 Okay. 2112 01:46:56,820 --> 01:46:57,860 So I have a default project. 2113 01:46:58,280 --> 01:47:00,920 And here is my source code here. 2114 01:47:01,160 --> 01:47:01,360 Oops. 2115 01:47:02,100 --> 01:47:03,660 So here's my source code. 2116 01:47:05,480 --> 01:47:05,980 Alright. 2117 01:47:10,120 --> 01:47:10,620 Okay. 2118 01:47:10,700 --> 01:47:13,000 So what I would do is I'd go under software. 2119 01:47:13,420 --> 01:47:17,340 And I would generate all, build all user applications. 2120 01:47:19,460 --> 01:47:19,960 Alright. 2121 01:47:20,080 --> 01:47:21,480 And again, that's already been compiled. 2122 01:47:21,680 --> 01:47:23,740 So it's telling me that, you know, everything is cool. 2123 01:47:24,120 --> 01:47:25,820 The, remember this thing I mentioned. 2124 01:47:25,820 --> 01:47:28,560 That you combine your software image with your hardware image. 2125 01:47:28,760 --> 01:47:30,400 That's the update bitstream part. 2126 01:47:32,560 --> 01:47:36,980 And then once that's done, you download the bitstream onto the FPGA. 2127 01:47:37,220 --> 01:47:41,480 And as it's downloading, I'm going to quickly switch to this TerraTerm window. 2128 01:47:41,960 --> 01:47:45,440 And what we'll hopefully see is actually our program. 2129 01:47:45,720 --> 01:47:46,340 So there it is. 2130 01:47:46,400 --> 01:47:50,100 If I reset the board, it just brings this message. 2131 01:47:50,320 --> 01:47:52,320 And that's basically this test application. 2132 01:47:52,640 --> 01:47:55,240 And just to show you that it is really our test application. 2133 01:47:55,240 --> 01:47:56,800 Let's go in there. 2134 01:47:57,480 --> 01:48:01,240 And let's do something like print hello world. 2135 01:48:05,920 --> 01:48:08,920 So let's, it's okay for now. 2136 01:48:10,220 --> 01:48:10,920 Alright. 2137 01:48:11,160 --> 01:48:13,200 So let's just go like this. 2138 01:48:13,980 --> 01:48:21,200 And we'll say hello world. 2139 01:48:28,760 --> 01:48:29,240 Alright. 2140 01:48:29,340 --> 01:48:30,140 We're going to save that. 2141 01:48:30,580 --> 01:48:32,460 And we're going to generate the application. 2142 01:48:38,000 --> 01:48:38,480 Okay. 2143 01:48:38,560 --> 01:48:40,660 And then we're going to update the bitstream. 2144 01:48:43,760 --> 01:48:45,800 And then we're going to download the bitstream. 2145 01:48:46,020 --> 01:48:47,820 And I'm going to go back to this. 2146 01:48:55,240 --> 01:48:55,380 Okay. 2147 01:48:55,460 --> 01:48:57,760 And you should see a bunch of hello worlds come up. 2148 01:48:59,180 --> 01:49:00,400 And maybe reset it. 2149 01:49:01,760 --> 01:49:02,160 Oh. 2150 01:49:02,940 --> 01:49:03,860 Oh, it's there. 2151 01:49:05,040 --> 01:49:05,720 There it is. 2152 01:49:07,280 --> 01:49:07,680 Right? 2153 01:49:08,020 --> 01:49:08,600 It didn't come up. 2154 01:49:08,660 --> 01:49:08,900 Try it. 2155 01:49:09,020 --> 01:49:09,780 Oh, it didn't. 2156 01:49:09,820 --> 01:49:10,060 Okay. 2157 01:49:10,940 --> 01:49:11,340 What? 2158 01:49:13,940 --> 01:49:14,340 Oh. 2159 01:49:14,720 --> 01:49:15,120 Okay. 2160 01:49:15,600 --> 01:49:16,460 Did you save it? 2161 01:49:16,960 --> 01:49:17,600 Yeah, maybe. 2162 01:49:17,820 --> 01:49:18,480 No, I did. 2163 01:49:20,480 --> 01:49:25,220 But one thing you want to notice is that when you change the software, it doesn't 2164 01:49:25,240 --> 01:49:26,540 have to recompile all the hardware. 2165 01:49:26,800 --> 01:49:31,180 So if you need to change one line, the hardware is the part that takes like 30 minutes to 2166 01:49:31,180 --> 01:49:32,580 compile depending on the complexity. 2167 01:49:32,880 --> 01:49:37,920 And so if you change a couple lines in the C, it doesn't, it only takes as long as it 2168 01:49:37,920 --> 01:49:42,300 does to compile however long your complicated your C is, which usually isn't that complicated. 2169 01:49:46,420 --> 01:49:47,860 Is it still misbehaving? 2170 01:49:47,980 --> 01:49:48,260 Okay. 2171 01:49:49,060 --> 01:49:50,220 Oh, it's not. 2172 01:49:50,400 --> 01:49:50,640 Okay. 2173 01:49:50,740 --> 01:49:52,140 Well, we'll move on. 2174 01:49:52,240 --> 01:49:53,020 Sorry about that. 2175 01:49:53,740 --> 01:49:54,220 Alright. 2176 01:49:55,240 --> 01:50:01,960 So what I want to show you next is basically you don't have to program your C from this 2177 01:50:01,960 --> 01:50:02,680 platform. 2178 01:50:02,920 --> 01:50:11,000 What you can do is you can launch a software development kit, which is SDK, and at that 2179 01:50:11,000 --> 01:50:15,740 point, you can hand this design over to somebody who is just doing C programming. 2180 01:50:17,080 --> 01:50:24,200 And at the SDK level, they'll just be writing C programs that will run on the FPGA. 2181 01:50:26,380 --> 01:50:29,140 And hopefully, we'll get that hello world working there. 2182 01:50:38,280 --> 01:50:38,800 Alright. 2183 01:50:39,340 --> 01:50:45,220 So we're going to create a new application project here, and I'm going to say test program. 2184 01:50:47,660 --> 01:50:48,180 Alright. 2185 01:50:48,280 --> 01:50:50,520 And let's try the hello world again here. 2186 01:50:51,580 --> 01:50:52,100 Print. 2187 01:50:54,580 --> 01:50:55,580 Hello world. 2188 01:50:57,700 --> 01:50:58,200 Okay. 2189 01:50:58,300 --> 01:51:04,580 And when I save it, it should automatically generate a link file. 2190 01:51:05,000 --> 01:51:07,260 And now I'm going to run it on the device. 2191 01:51:08,420 --> 01:51:08,920 Alright. 2192 01:51:09,040 --> 01:51:10,560 So I'm going to run the debugger. 2193 01:51:10,580 --> 01:51:14,200 Remember when we configured the hardware, we made a hardware debugger? 2194 01:51:14,260 --> 01:51:19,860 So we're actually going to step through this program in C on the hardware. 2195 01:51:20,020 --> 01:51:21,180 So I'm going to debug on hardware. 2196 01:51:21,180 --> 01:51:24,680 And if you notice, there was actually an option to debug it on the simulator. 2197 01:51:24,960 --> 01:51:29,300 So if you don't have the board, you can actually run an instruction simulator in software to 2198 01:51:29,300 --> 01:51:29,660 do this. 2199 01:51:30,280 --> 01:51:31,560 So this is my program. 2200 01:51:31,880 --> 01:51:37,000 Let me bring the terra term here, and let's clear the screen. 2201 01:51:39,220 --> 01:51:39,660 Yeah. 2202 01:51:41,120 --> 01:51:45,760 Clear the buffer, and then this little icon here is to run the program. 2203 01:51:46,460 --> 01:51:50,960 So if I hit it here, and I go back to the terra term, there's my hello world. 2204 01:51:51,180 --> 01:51:51,420 Okay. 2205 01:51:51,940 --> 01:51:53,440 So this is an SDK. 2206 01:51:53,740 --> 01:51:57,500 It's probably something familiar to you if you write a lot of C++ or SQL. 2207 01:51:57,960 --> 01:52:03,780 And you can basically write your software on for the embedded system from the SDK. 2208 01:52:04,240 --> 01:52:06,640 So that concludes this part of the talk. 2209 01:52:07,280 --> 01:52:08,020 All right. 2210 01:52:12,280 --> 01:52:13,480 Thank you. 2211 01:52:18,420 --> 01:52:19,320 Contest time. 2212 01:52:19,640 --> 01:52:20,240 Okay. 2213 01:52:20,300 --> 01:52:21,160 Now we're going to do this. 2214 01:52:21,180 --> 01:52:21,300 This contest. 2215 01:52:22,380 --> 01:52:23,120 I promise. 2216 01:52:24,120 --> 01:52:26,720 So are we doing contest three and four in parallel? 2217 01:52:28,200 --> 01:52:28,600 No. 2218 01:52:28,800 --> 01:52:29,200 Okay. 2219 01:52:30,520 --> 01:52:32,100 I don't even want to think about that. 2220 01:52:32,160 --> 01:52:33,280 I'm not a parallel programmer. 2221 01:52:33,420 --> 01:52:34,400 I haven't taken that course yet. 2222 01:52:34,500 --> 01:52:35,940 So I don't even want to think that way. 2223 01:52:36,560 --> 01:52:37,140 So yeah. 2224 01:52:37,240 --> 01:52:38,380 We're going to do the... 2225 01:52:38,380 --> 01:52:39,480 That's not even running. 2226 01:52:39,640 --> 01:52:39,900 Okay. 2227 01:52:40,440 --> 01:52:41,500 That's not even helpful. 2228 01:52:43,840 --> 01:52:48,740 So like I said before, we're going to give away another Spartan board and some more 2229 01:52:48,740 --> 01:52:49,200 T-shirts. 2230 01:52:49,900 --> 01:52:55,840 So the question, if you were paying attention last time, what is the largest on-chip memory 2231 01:52:55,840 --> 01:52:58,580 size that can be used on the Spartan 3 e-board? 2232 01:52:59,720 --> 01:53:01,420 So same rules apply as before. 2233 01:53:04,180 --> 01:53:06,920 Answer questions and we'll get back. 2234 01:53:07,020 --> 01:53:11,880 We're actually going to have Furkan demonstrate his Linux on FPGA. 2235 01:53:12,040 --> 01:53:16,640 And right after that, before we do the Altera demo, we'll have our netbook question up. 2236 01:53:16,820 --> 01:53:19,000 So best of luck to everyone on that. 2237 01:53:27,460 --> 01:53:28,960 Anybody have any questions? 2238 01:53:29,260 --> 01:53:33,420 And if anyone has any questions for Dr. K about any of the EDK stuff you just saw, 2239 01:53:33,560 --> 01:53:35,780 feel free to stand up, shout it out. 2240 01:53:38,860 --> 01:53:39,860 I have a question. 2241 01:53:40,380 --> 01:53:40,840 Sure. 2242 01:53:43,280 --> 01:53:44,620 So OpenCourt is free. 2243 01:53:45,100 --> 01:53:48,980 I can run web apps on your Linux on all of my devices? 2244 01:53:48,980 --> 01:53:49,680 That's great. 2245 01:53:49,940 --> 01:53:50,420 Yeah. 2246 01:53:51,260 --> 01:53:57,300 Do I have to have EDK to use MicroBlades or any corner I get on OpenCourt? 2247 01:53:57,740 --> 01:54:01,120 And what's the hard way to do it, let's say . 2248 01:54:04,040 --> 01:54:05,240 Is there a hard way? 2249 01:54:05,420 --> 01:54:13,820 So the question was that OpenCourt is free and I can imply from that, I can jump from 2250 01:54:13,820 --> 01:54:17,600 that, that you could probably get a processor source code for a processor. 2251 01:54:17,600 --> 01:54:19,940 And you can roll your own EDK. 2252 01:54:20,280 --> 01:54:21,860 So save $500. 2253 01:54:22,380 --> 01:54:22,940 Yeah. 2254 01:54:23,000 --> 01:54:23,980 The answer is yes. 2255 01:54:24,080 --> 01:54:26,680 You can save money and roll your own. 2256 01:54:26,800 --> 01:54:32,200 What the EDK does is it integrates all these things together and it gives you all these 2257 01:54:32,200 --> 01:54:33,340 IP peripherals. 2258 01:54:33,420 --> 01:54:34,460 They all plug in. 2259 01:54:34,680 --> 01:54:35,980 The bus is compatible. 2260 01:54:36,320 --> 01:54:37,740 So it's a convenience. 2261 01:54:38,760 --> 01:54:43,480 Actually, going along with what Dr. K just said, in preparing for this presentation, 2262 01:54:43,780 --> 01:54:47,580 I went online and actually found the VHDL source code for OpenCourt. 2263 01:54:47,580 --> 01:54:51,820 You can go for an HC11 Motorola microprocessor online for free. 2264 01:54:52,100 --> 01:54:56,440 So you don't really have to look that hard in order to find these things. 2265 01:54:58,260 --> 01:55:03,120 Apparently, Nintendo is online, too, if you want an FPGA Nintendo. 2266 01:55:03,720 --> 01:55:04,480 NES, Steve? 2267 01:55:05,500 --> 01:55:07,680 I only saw the original one. 2268 01:55:07,780 --> 01:55:08,040 Yeah. 2269 01:55:08,160 --> 01:55:08,520 NES. 2270 01:55:08,700 --> 01:55:09,140 There you go. 2271 01:55:09,240 --> 01:55:11,080 Who doesn't want an NES on an FPGA? 2272 01:55:12,040 --> 01:55:12,900 That's what I thought. 2273 01:55:19,500 --> 01:55:23,460 By the way, the answer to this contest question was in the talk twice. 2274 01:55:24,120 --> 01:55:26,100 Does anyone else need the question up there? 2275 01:55:26,200 --> 01:55:28,060 Otherwise, we're going to switch over to another. 2276 01:55:29,100 --> 01:55:29,480 Okay. 2277 01:55:29,520 --> 01:55:30,600 I hear no shouts. 2278 01:55:40,360 --> 01:55:41,640 Oh, you're actually on here. 2279 01:55:42,940 --> 01:55:43,320 Okay. 2280 01:55:43,800 --> 01:55:44,300 Oh, wait. 2281 01:55:44,340 --> 01:55:44,980 We can do this. 2282 01:55:45,160 --> 01:55:45,940 We can do this. 2283 01:55:45,980 --> 01:55:46,260 We can do this. 2284 01:55:46,260 --> 01:55:46,520 It's where you're here. 2285 01:55:47,900 --> 01:55:48,280 Okay. 2286 01:55:54,020 --> 01:55:55,480 I was going to bring Steve down. 2287 01:55:55,620 --> 01:55:56,820 You're going to do the game demo? 2288 01:55:56,920 --> 01:55:57,240 Yeah. 2289 01:55:57,320 --> 01:55:58,080 And then talk about Linux. 2290 01:55:58,140 --> 01:55:58,800 And then stop. 2291 01:55:58,820 --> 01:55:59,740 And then I'll do the contest. 2292 01:56:00,340 --> 01:56:00,720 Okay. 2293 01:56:00,840 --> 01:56:01,180 And then you can do- 2294 01:56:02,060 --> 01:56:02,440 Okay. 2295 01:56:02,640 --> 01:56:02,940 You get on? 2296 01:56:03,040 --> 01:56:03,460 Sound good? 2297 01:56:03,800 --> 01:56:04,180 Yeah. 2298 01:56:04,440 --> 01:56:04,820 Cool. 2299 01:56:05,140 --> 01:56:05,520 Okay. 2300 01:56:11,560 --> 01:56:11,940 So, we're going to do the game, then stop. 2301 01:56:11,940 --> 01:56:12,200 You know what? 2302 01:56:12,200 --> 01:56:12,500 Cool. 2303 01:56:12,860 --> 01:56:13,240 Okay. 2304 01:56:14,540 --> 01:56:14,920 We're going to stop. 2305 01:56:14,920 --> 01:56:15,940 Do you have a question for it? 2306 01:56:16,060 --> 01:56:16,240 Yeah. 2307 01:56:37,000 --> 01:56:40,100 Do you want to do it over there or do it over here? 2308 01:57:00,360 --> 01:57:02,360 I wonder what happened to this. 2309 01:57:02,400 --> 01:57:02,860 It's okay. 2310 01:57:22,840 --> 01:57:23,220 It's okay. 2311 01:58:02,980 --> 01:58:07,000 Yeah, it is the same board, yep. 2312 01:58:16,580 --> 01:58:19,640 Why don't you start with the slides over there and give it over here so we can start. 2313 01:58:22,860 --> 01:58:25,360 But, Ron, you mess with that one and do the other slides. 2314 01:58:26,260 --> 01:58:28,620 Why don't you try and get that working while he does the slides? 2315 01:58:28,760 --> 01:58:28,940 Okay. 2316 01:58:28,940 --> 01:58:29,480 I'm just going to test it. 2317 01:58:46,760 --> 01:58:47,400 Okay. 2318 01:58:54,360 --> 01:58:55,000 Okay. 2319 01:58:55,000 --> 01:58:55,680 Whatever you want to do. 2320 01:58:55,980 --> 01:58:56,980 No, we can't go over here. 2321 01:58:59,820 --> 01:59:00,460 Okay. 2322 01:59:05,220 --> 01:59:06,380 Whatever you say. 2323 01:59:06,460 --> 01:59:07,220 Keep it going. 2324 01:59:07,260 --> 01:59:07,620 Okay. 2325 01:59:09,320 --> 01:59:09,960 Okay. 2326 01:59:10,880 --> 01:59:10,900 Okay. 2327 01:59:11,880 --> 01:59:12,520 Okay. 2328 01:59:14,080 --> 01:59:14,720 Okay. 2329 01:59:14,820 --> 01:59:15,460 Okay. 2330 01:59:16,260 --> 01:59:16,520 Okay. 2331 01:59:16,520 --> 01:59:21,600 We talk about this game demo that everybody talks about, like, game, game, game, and 2332 01:59:21,600 --> 01:59:24,580 you're wondering what this might be. 2333 01:59:24,980 --> 01:59:26,080 It's up on the screen. 2334 01:59:26,280 --> 01:59:30,100 It's just running on this small board here . 2335 01:59:31,620 --> 01:59:37,280 I don't know, have you ever played Roadrunner, I believe was its name. 2336 01:59:37,680 --> 01:59:42,800 Just like cars coming down and then the red car is yours and then you're just trying to 2337 01:59:42,800 --> 01:59:43,680 escape from the cars. 2338 01:59:44,320 --> 01:59:45,500 Basically, like that. 2339 01:59:46,380 --> 01:59:53,680 this stuff here yeah so you know you're trying to escape the cars and after 2340 01:59:53,680 --> 02:00:00,080 some time it's gonna get like the speed is gonna increase so like you know and 2341 02:00:00,080 --> 02:00:09,840 then so yeah you can do this kind of stuff like you know with an FPGA using a 2342 02:00:09,840 --> 02:00:18,720 VGA cable basically what it does is like just you write like the VGA 2343 02:00:18,720 --> 02:00:26,820 code in VHDL and then you pass you pass some arguments from C code you like 2344 02:00:26,820 --> 02:00:33,180 keep track of speed and the button movements and stuff in C and then you 2345 02:00:33,180 --> 02:00:39,500 pass the code to VHDL and then you know 2346 02:00:39,840 --> 02:00:41,520 yeah pretty nice game over there 2347 02:00:44,960 --> 02:00:46,460 there's a problem here 2348 02:01:10,240 --> 02:01:16,760 hi everybody again my name is Furkan I'm one of the C work members here I'm a 2349 02:01:16,760 --> 02:01:21,940 graduate student at the University of Delaware I would like to talk about 2350 02:01:22,520 --> 02:01:33,120 Linux on Spartan three so first of all what we need to run Linux on this board 2351 02:01:34,660 --> 02:01:39,820 of course we need an FPGA board in this case we use Xilinx Spartan 3 2352 02:01:39,820 --> 02:01:47,960 than three, five hundred, and the software is ZionX ISE EDK, you can download from zionx.com. 2353 02:01:48,260 --> 02:01:56,080 And for Linux that we run, there are some others, some Linux distributions that you 2354 02:01:56,080 --> 02:01:56,540 can use. 2355 02:01:57,220 --> 02:02:04,840 One of them is like Petal Linux, which is one of the good ones, and then it's free also, 2356 02:02:04,980 --> 02:02:06,880 and mostly it's like GPL. 2357 02:02:06,880 --> 02:02:14,820 So there are some other solutions like BlueCat or like MontaVista maybe. 2358 02:02:15,540 --> 02:02:20,400 So you can download the Petal Linux from petalogix.com. 2359 02:02:20,740 --> 02:02:25,960 The version 0.4 is out, I think, the latest version. 2360 02:02:26,200 --> 02:02:35,260 And for the, like the machine, you just, you can run it on Linux, as someone asked, is 2361 02:02:35,260 --> 02:02:36,860 ISE and EDK compatible? 2362 02:02:36,860 --> 02:02:37,840 Can we run it on Linux? 2363 02:02:37,940 --> 02:02:41,780 Yeah, we can, you can install it on Linux and then you can run it. 2364 02:02:41,980 --> 02:02:45,320 So in this particular case, I use HLinux and Pardos. 2365 02:02:47,100 --> 02:02:52,000 So what are the steps to just, you know, keep you updated? 2366 02:02:53,500 --> 02:02:57,540 So the step one is like to prepare the workaround. 2367 02:02:58,380 --> 02:03:06,180 First of all, we would need to install ZionX ISE EDK software, and then install the ZionX 2368 02:03:06,180 --> 02:03:06,840 USB cable. 2369 02:03:07,720 --> 02:03:14,760 Installing the ZionX USB cable is, in Linux, is a little bit like hard. 2370 02:03:14,960 --> 02:03:20,200 You need to do some hacks, maybe, on like Windows version. 2371 02:03:21,360 --> 02:03:27,500 ZionX gives support, like official support to Red Hat Enterprise, I think. 2372 02:03:28,420 --> 02:03:33,520 I mean, if you are using like CentOS and Red Hat Enterprise, maybe you would be fine. 2373 02:03:33,680 --> 02:03:36,100 But if you are using another, like distribution... 2374 02:03:36,100 --> 02:03:39,980 You would need to do some, like, hacks about USB thing. 2375 02:03:40,320 --> 02:03:46,540 So you can, well, it just doesn't seem right, but, okay. 2376 02:03:46,620 --> 02:03:50,160 You can find some information on my blog over there. 2377 02:03:50,300 --> 02:03:54,460 You can see the slides on, from our website. 2378 02:03:55,700 --> 02:04:02,880 And also, to download the image to the board, you would need a TFTP server up and running. 2379 02:04:03,120 --> 02:04:04,560 This is not a necessary step. 2380 02:04:04,920 --> 02:04:05,440 But... 2381 02:04:06,240 --> 02:04:11,300 It's a lot faster than downloading it on a serial line. 2382 02:04:11,460 --> 02:04:15,900 So, I mean, you can use, like, NFS share or stuff. 2383 02:04:16,820 --> 02:04:25,520 And also, you need a terminal to see this stuff, which, in Linux, you have, I think, 2384 02:04:26,100 --> 02:04:28,580 Kermit and Minicom solutions. 2385 02:04:28,840 --> 02:04:31,100 For that, you can go ahead and download them. 2386 02:04:31,320 --> 02:04:36,040 Also, the baud rate for this particular patch. 2387 02:04:36,080 --> 02:04:46,360 I think, it's like, $50. 2388 02:04:46,360 --> 02:04:47,940 I think it's like $150. 2389 02:04:47,940 --> 02:04:50,120 I think there's a lot of stuff in there. 2390 02:04:50,140 --> 02:04:52,280 But this is pretty simple. 2391 02:04:52,520 --> 02:04:54,680 So, you can just download it to your PC or whatever, but, you know, basically, if you 2392 02:04:54,680 --> 02:04:55,480 want to use it for things that are not, like, in Linux, you can download it. 2393 02:04:55,480 --> 02:04:59,100 But, again, if you want to use it for something that is, like, for your computer or something 2394 02:04:59,100 --> 02:05:02,760 like that, you have to go ahead and download it. 2395 02:05:02,860 --> 02:05:04,720 So, that's a little bit of a follow-up. 2396 02:05:04,720 --> 02:05:05,180 It's not that much of a challenge. 2397 02:05:05,180 --> 02:05:06,060 I think it's a little bit of a challenge to use. 2398 02:05:06,060 --> 02:05:16,840 like fixed baud rate to as like 11 5200 yeah so the second step is to prepare the software 2399 02:05:17,980 --> 02:05:23,300 after like downloading the code extract it to your home directory and then 2400 02:05:24,760 --> 02:05:30,060 open up a terminal and then go to your home directory change directory to petal linux 2401 02:05:30,060 --> 02:05:40,660 um version zero four i believe the latest one is uh rc4 and then after that there is a settings 2402 02:05:40,660 --> 02:05:47,260 file inside this uh directory you need to source it in order to uh like run the commands uh inside 2403 02:05:47,260 --> 02:05:52,600 the program there are just two versions of it one is for bash and the other is for c shell 2404 02:05:52,600 --> 02:05:59,320 so if you are using like z shell or another shell whatever you need to change to 2405 02:05:59,320 --> 02:05:59,880 bash 2406 02:06:00,060 --> 02:06:07,180 i mean it's good to change the bash so let's see some demos hopefully i'll not have 2407 02:06:41,960 --> 02:06:51,620 to change the bash so i'm just gonna go ahead and check this out 2408 02:06:51,620 --> 02:06:57,660 and i'll show you what i've done 2409 02:06:57,660 --> 02:06:58,860 so 2410 02:06:58,860 --> 02:07:00,040 so 2411 02:07:01,680 --> 02:07:14,040 having VGA issues well we're trying to figure out these problems we're actually 2412 02:07:14,040 --> 02:07:20,500 going to give out the next set of prizes so I'm pretty sure a lot of people got 2413 02:07:20,500 --> 02:07:26,300 this one right as dr. K did say it at least two times the answer is 32 2414 02:07:26,300 --> 02:07:32,440 kilobytes that's the maximum amount of memory so Steve's gonna draw some names 2415 02:07:32,980 --> 02:07:42,800 all right just to clarify kilobytes not kilobits and capital B so uh and real 2416 02:07:42,800 --> 02:07:48,740 quick I was alerted that to the fact that the real Leroy Jenkins is in the 2417 02:07:48,740 --> 02:07:56,280 audience so I wanted to just say hi to him and you know wave it out 2418 02:07:56,280 --> 02:08:04,140 but now we're gonna do the drawing all right and you want to give us a help 2419 02:08:04,140 --> 02:08:04,480 Nadia 2420 02:08:12,580 --> 02:08:16,100 yeah all right Corey Johnson 2421 02:08:21,720 --> 02:08:22,920 all right 2422 02:08:26,780 --> 02:08:28,320 yeah we're pulling on one here 2423 02:08:28,320 --> 02:08:31,520 I guess so 2424 02:08:31,520 --> 02:08:33,980 Tara Z 2425 02:08:35,940 --> 02:08:37,540 all right round of applause 2426 02:08:40,700 --> 02:08:42,440 let's shake them up a little bit more 2427 02:08:44,220 --> 02:08:44,740 Mikey 2428 02:08:48,380 --> 02:08:48,900 okay 2429 02:08:50,520 --> 02:08:51,040 applause 2430 02:08:53,520 --> 02:08:54,560 thank you 2431 02:08:57,500 --> 02:08:58,460 Patrick 2432 02:08:59,820 --> 02:09:00,780 Patrick 2433 02:09:00,780 --> 02:09:01,400 Patrick 2434 02:09:01,400 --> 02:09:01,880 applause 2435 02:09:06,800 --> 02:09:09,320 ready one more 2436 02:09:09,320 --> 02:09:11,060 we have one more right 2437 02:09:11,060 --> 02:09:12,460 all right 2438 02:09:12,460 --> 02:09:14,420 give me a picture 2439 02:09:15,820 --> 02:09:16,300 Jas 2440 02:09:18,060 --> 02:09:18,540 Jas 2441 02:09:18,540 --> 02:09:19,220 Jas 2442 02:09:21,900 --> 02:09:22,800 going up 2443 02:09:22,800 --> 02:09:25,180 all right let's give a round of applause 2444 02:09:29,940 --> 02:09:38,260 all right and while we're waiting for Corey to come up and give us the last question the Chuck up here just want to ask everyone to please give a round of applause to Dr. 2445 02:09:38,320 --> 02:09:54,820 Kiamlev up here not only did he get funding to bring us all out here and everything he got you all the prizes that were given away today so let's give him a round of applause thanks thanks a lot actually the students made me do it 2446 02:09:56,800 --> 02:09:58,260 but still we can thank him 2447 02:09:59,420 --> 02:10:07,760 all right and Corey's going to come up and give us the question and we're going to try to do that 2448 02:10:08,200 --> 02:10:17,140 okay guys this is the question I know you've been waiting for and you've been patient I know three hours is a long time so how about a round of applause for yourselves 2449 02:10:18,160 --> 02:10:22,380 just cause I've sat through lectures and I know how it can be so 2450 02:10:22,380 --> 02:10:24,800 applause for yourselves just cause I've sat through lectures and I know how it can be so 2451 02:10:27,860 --> 02:10:28,300 up 2452 02:10:29,600 --> 02:10:30,040 new 2453 02:10:30,040 --> 02:10:30,600 from 2454 02:10:30,600 --> 02:10:30,900 that 2455 02:10:30,900 --> 02:10:41,600 okay so like I said this is the one we've been waiting for we're going to give a way the ace her inspired notebook or net book six tumblers and a 2456 02:10:41,600 --> 02:10:54,780 couple T-shirts I know the other ones don't really seem all that throwing but trust me they are they are so we're going to give you probably about ten minutes this to figure this one out this is obviously going to awata 2457 02:10:54,800 --> 02:10:58,720 a little trickier and you know however you want to try and figure it out you 2458 02:10:58,720 --> 02:11:03,040 can try and figure it out so the question is not being shamelessly 2459 02:11:03,040 --> 02:11:08,940 plugging or anything how many 128-bit registers are in each core of the Intel 2460 02:11:08,940 --> 02:11:15,900 core i7 processor so again if you need some slips I we might be running low so 2461 02:11:15,900 --> 02:11:19,560 if you have just scrap paper you know raise your hand and good luck 2462 02:11:50,000 --> 02:11:52,080 does anyone need the question still up there 2463 02:12:05,440 --> 02:12:08,940 of course if anyone wants to try and bribe the contest manager 2464 02:12:17,920 --> 02:12:20,540 we'll verbally repeat it we're going to get this VGA thing working 2465 02:12:24,800 --> 02:12:25,340 sure 2466 02:12:47,210 --> 02:12:54,420 so once again the question is how many 128-bit registers are in each core of 2467 02:12:54,420 --> 02:12:54,780 the Intel processor and how many 128-bit hearts are in each column of the Intel� 2468 02:12:54,780 --> 02:12:57,180 of the Intel Core i7 processor 2469 02:13:01,180 --> 02:13:04,600 and this is either for a netbook or a lovely tumbler 2470 02:13:19,960 --> 02:13:23,160 I've been told to inform you that the netbook comes with a beautiful 2471 02:13:23,160 --> 02:13:24,480 Intel carrying case 2472 02:13:26,460 --> 02:13:28,140 so sweeten the deal a little bit 2473 02:13:30,440 --> 02:13:31,780 it's like a mug 2474 02:13:32,740 --> 02:13:34,420 kind of but without a handle 2475 02:13:53,300 --> 02:13:53,940 ha ha 2476 02:13:55,300 --> 02:14:00,020 and major props to anyone who chanced going on the DEF CON Network 2477 02:14:00,020 --> 02:14:00,860 to get this answer 2478 02:14:01,680 --> 02:14:03,480 hopefully the netbook will help 2479 02:14:03,480 --> 02:14:04,260 you know 2480 02:14:05,520 --> 02:14:09,500 reimburse you for getting whatever computer you use completely owned 2481 02:14:15,000 --> 02:14:20,060 another to repeat the question again it's how many 128 bit registers 2482 02:14:20,060 --> 02:14:23,140 are in each core of the Intel Core 7 processor? 2483 02:14:23,160 --> 02:14:24,440 i7 processor. 2484 02:14:47,800 --> 02:14:53,700 So, we'll let you keep working on this, and I believe Furcon has a demo for you. 2485 02:14:53,760 --> 02:14:54,040 So, 2486 02:14:54,440 --> 02:14:59,160 if you'll direct your attention up front, we have a Linux on an FPGA. 2487 02:15:09,300 --> 02:15:10,540 Sorry about that. 2488 02:15:10,600 --> 02:15:13,840 That was like VGA problems, and hopefully it's like solved. 2489 02:15:17,700 --> 02:15:20,020 Now, let's see a demo. 2490 02:15:22,960 --> 02:15:24,040 Can the phone 2491 02:15:24,040 --> 02:15:24,300 be 2492 02:15:24,300 --> 02:15:26,380 seen back from the back? 2493 02:15:27,140 --> 02:15:27,920 Is it okay? 2494 02:15:28,240 --> 02:15:28,960 The phone? 2495 02:15:31,720 --> 02:15:32,620 Yeah, I think so. 2496 02:15:33,700 --> 02:15:34,180 So, 2497 02:15:36,720 --> 02:15:37,420 this is 2498 02:15:38,160 --> 02:15:38,980 let's go to 2499 02:15:39,680 --> 02:15:41,940 so this is the code that we downloaded from 2500 02:15:42,600 --> 02:15:43,080 PetaLogix. 2501 02:15:44,500 --> 02:15:45,880 As you can see, there are like 2502 02:15:46,960 --> 02:15:48,080 three different stacks, 2503 02:15:48,300 --> 02:15:49,660 hardware, software, and tools. 2504 02:15:51,200 --> 02:15:52,140 The hardware 2505 02:15:52,140 --> 02:15:53,560 part is for 2506 02:15:53,560 --> 02:15:53,900 a 2507 02:15:56,160 --> 02:16:00,020 that you have seen from Dr. K's presentation. 2508 02:16:00,620 --> 02:16:07,640 The software side is the Linux side, where you can go ahead and compile the kernel. 2509 02:16:09,380 --> 02:16:20,340 And so, I'm using a ZShell, so I'm going to change it to Bash and source settings.sh. 2510 02:16:22,260 --> 02:16:23,880 Now, the XPG is running for 14 seconds. 2511 02:16:23,880 --> 02:16:36,920 have all the peta Linux like executables over there in my path so now I will go 2512 02:16:36,920 --> 02:16:40,780 to software and then 2513 02:16:46,280 --> 02:16:53,960 compile the kernel thing so in vendor products settings there are two options 2514 02:16:53,960 --> 02:16:58,760 here like there is one with petalini peta logics on it and the second one is 2515 02:16:58,760 --> 02:17:05,960 like Xilinx the petalini peta logic is basically like the some power PC or 2516 02:17:05,960 --> 02:17:10,160 micro blaze that you can do by yourself and 2517 02:17:10,160 --> 02:17:10,760 we are going to show you how to do that in just a few minutes so let's go ahead and 2518 02:17:10,760 --> 02:17:17,260 we're going to do the demo we are going to do the demo for our Spartan 3 500 so 2519 02:17:17,260 --> 02:17:26,420 we have a lot of different kinds of Spartan boards or ml-401 board here and 2520 02:17:27,080 --> 02:17:36,740 I choose the EDIX Xilinx Spartan 3 500 and then in kernel settings 2521 02:17:36,740 --> 02:17:40,420 we have two different stacks one is two point for the O stack 2522 02:17:40,420 --> 02:17:40,740 and A stack for the…" 2523 02:17:40,760 --> 02:17:43,220 on the two point things, the new stack. 2524 02:17:44,520 --> 02:17:49,420 And we are going to come back here later to examine the 2525 02:17:49,420 --> 02:17:51,180 customization settings. 2526 02:17:51,780 --> 02:17:55,780 Now we are just going to create the first project. 2527 02:17:56,840 --> 02:18:01,020 So after we do that, we are going to go to hardware side. 2528 02:18:01,820 --> 02:18:08,320 And then, as you can see in reference designs, Petalunix 2529 02:18:08,320 --> 02:18:13,380 made all these cool designs for us. 2530 02:18:17,180 --> 02:18:21,040 So there is our platform here. 2531 02:18:22,260 --> 02:18:24,280 Originally like EDK. 2532 02:18:25,340 --> 02:18:31,820 And so we are going to start a new EDK project. 2533 02:18:32,820 --> 02:18:36,960 EDK from Linux, if you want to run from command line, it's 2534 02:18:36,960 --> 02:18:37,560 XPS. 2535 02:18:37,560 --> 02:18:41,600 And we are going to do that, but we are not going to use a 2536 02:18:41,600 --> 02:18:41,840 GUI. 2537 02:18:42,020 --> 02:18:45,680 So it's no window with a no window option. 2538 02:18:46,160 --> 02:18:51,400 And then our project is system dot XMP. 2539 02:18:54,040 --> 02:18:58,060 So we are now in XPS shell. 2540 02:19:03,880 --> 02:19:06,160 So we are not going to do anything here. 2541 02:19:06,160 --> 02:19:14,100 because all the things are done for us we just save the file and then start 2542 02:19:14,100 --> 02:19:14,920 compiling it 2543 02:19:21,000 --> 02:19:30,480 so I compiled like like I think recently because it's going to take like some 2544 02:19:30,480 --> 02:19:38,600 time as you can remember from that case presentation so I pre compiled it so it 2545 02:19:38,600 --> 02:19:43,440 says like nothing to be done for bits you first go ahead and compile the bits 2546 02:19:43,440 --> 02:19:50,540 and for the bit files and then you go ahead and compile the libraries and also 2547 02:19:50,540 --> 02:19:59,660 this is also pre done and then you go ahead and program the FS boot 2548 02:19:59,660 --> 02:20:00,400 and 2549 02:20:00,400 --> 02:20:10,380 in order to like run a code there is a FS boot which is I think first stage boot 2550 02:20:10,380 --> 02:20:15,260 so you put that code inside the BRAM inside FPGA which Dr. K taught 2551 02:20:15,900 --> 02:20:22,780 like so you put that code and then this is the first boot loader and after this 2552 02:20:22,780 --> 02:20:29,100 boot loader like boots up you run you download the code to like a flash or 2553 02:20:29,100 --> 02:20:29,920 other place 2554 02:20:29,920 --> 02:20:37,900 micro boot so it boots the second boot loader which you can go ahead and then 2555 02:20:37,900 --> 02:20:43,420 start your program boot up your kernel so... 2556 02:20:45,700 --> 02:20:57,380 we are going to make it to initiate in BRAM and then so everything is done 2557 02:20:57,380 --> 02:20:57,660 here 2558 02:20:58,040 --> 02:20:59,900 basically these steps are gonna take like five or six hours so it's gonna take three or five minutes anyway. 2559 02:20:59,920 --> 02:21:01,960 10 minutes, depending on your processor speed. 2560 02:21:02,960 --> 02:21:06,560 And then, excuse me, no question. 2561 02:21:07,440 --> 02:21:22,360 So now, between the hardware and software projects, 2562 02:21:24,240 --> 02:21:29,200 Petalunix came up with a nice script that you can run, and 2563 02:21:29,200 --> 02:21:33,760 then after that, all the settings that you have done 2564 02:21:33,760 --> 02:21:36,440 with this hardware side are going to be transferred to the 2565 02:21:36,440 --> 02:21:39,140 software side, and then be written in 2566 02:21:39,140 --> 02:21:40,060 the configuration file. 2567 02:21:40,460 --> 02:21:42,500 And then you can go ahead and compile your kernel, 2568 02:21:42,580 --> 02:21:44,540 depending on those settings. 2569 02:21:45,620 --> 02:21:48,620 So the command is like, Petalunix copy, autoconfig. 2570 02:21:50,920 --> 02:21:52,760 So now it's doing that. 2571 02:22:00,580 --> 02:22:01,780 Yep, we are done. 2572 02:22:02,560 --> 02:22:05,520 Now the autoconfig file success will update it. 2573 02:22:05,800 --> 02:22:08,540 And then we are basically done here. 2574 02:22:08,720 --> 02:22:17,800 We are going to go to our software side and compile our kernel. 2575 02:22:18,820 --> 02:22:20,940 Now our vendor settings are the same. 2576 02:22:21,360 --> 02:22:23,880 So there are like four different things here. 2577 02:22:24,480 --> 02:22:28,740 Default all settings, customized kernel settings, customized vendor user settings. 2578 02:22:28,740 --> 02:22:29,180 All of them are the same. 2579 02:22:29,180 --> 02:22:30,440 Update default vendor settings. 2580 02:22:30,720 --> 02:22:34,460 Let's go ahead and customize kernel settings and the vendor user settings. 2581 02:22:38,240 --> 02:22:44,020 And hopefully, most of you are familiar with this part of the thing. 2582 02:22:44,880 --> 02:22:46,920 Basic kernel compilation. 2583 02:22:50,320 --> 02:22:57,200 So this is generally the basic kernel compilation stuff. 2584 02:22:57,640 --> 02:22:58,580 Like networking. 2585 02:23:00,780 --> 02:23:05,080 Bluetooth device, or SCIC device, or whatever. 2586 02:23:05,320 --> 02:23:07,320 I mean, you can choose what to compile. 2587 02:23:08,620 --> 02:23:10,900 And then, file systems. 2588 02:23:11,140 --> 02:23:12,480 There are different file systems here. 2589 02:23:12,620 --> 02:23:20,280 We are going to choose our file system as to be like, ROM read only. 2590 02:23:22,720 --> 02:23:24,920 So I'm not going to change any settings here. 2591 02:23:25,180 --> 02:23:28,180 And then the second step here is about... 2592 02:23:28,180 --> 02:23:29,160 Okay. 2593 02:23:29,160 --> 02:23:32,940 So the first step is mostly the first step is already done, I think. 2594 02:23:33,080 --> 02:23:35,520 Because you don't need to worry about that step. 2595 02:23:35,700 --> 02:23:37,620 But the second step is important here. 2596 02:23:38,100 --> 02:23:43,120 Because you choose what program you want to use on your FPGA. 2597 02:23:43,600 --> 02:23:47,880 So the first system settings are like network address here. 2598 02:23:48,600 --> 02:23:51,440 Here you can define your Ethernet MAC address. 2599 02:23:51,760 --> 02:23:58,520 And then you can choose to obtain IP address like dynamic, or you can choose to give a static 2600 02:23:58,520 --> 02:23:59,140 IP address. 2601 02:23:59,160 --> 02:24:01,720 And you define the server IP address. 2602 02:24:02,440 --> 02:24:04,460 Also to communicate with your board. 2603 02:24:05,580 --> 02:24:11,300 Basically after you download your code, or basically after you download the micro boot, 2604 02:24:12,120 --> 02:24:18,860 if you remember I said, I mentioned about TFTP server, you can get the kernel image 2605 02:24:19,240 --> 02:24:23,260 from TFTP via these IP addresses. 2606 02:24:23,660 --> 02:24:27,520 So just make sure that you know the IP addresses. 2607 02:24:27,640 --> 02:24:29,060 And you set them up. 2608 02:24:29,160 --> 02:24:29,860 Correctly. 2609 02:24:29,960 --> 02:24:37,140 And default host name, we are going to choose our default host name to be like DEFCON demo. 2610 02:24:38,760 --> 02:24:45,660 And default root password is going to be DEFCON. 2611 02:24:46,700 --> 02:24:54,840 So root file system types, different root file system types, you can choose from there. 2612 02:24:54,980 --> 02:24:56,980 Like copy file image to TFTP boot. 2613 02:24:59,160 --> 02:25:05,360 If you are familiar with TFTP server, there is a TFTP boot folder that you can go ahead 2614 02:25:05,360 --> 02:25:06,860 and pull up the files from there. 2615 02:25:07,100 --> 02:25:08,840 So this is basically that directory. 2616 02:25:09,040 --> 02:25:14,120 You define that directory to be whatever you want. 2617 02:25:14,360 --> 02:25:16,300 And then the core applications here. 2618 02:25:16,660 --> 02:25:18,280 You choose the core applications. 2619 02:25:18,720 --> 02:25:25,840 What like the executables do you want to like run on your machine. 2620 02:25:26,260 --> 02:25:29,140 So there are some cool stuff. 2621 02:25:29,140 --> 02:25:34,620 You have like libraries, which libraries you want to choose, and file stamp applications 2622 02:25:34,620 --> 02:25:44,460 like mount, unmount, or like some, if you want to run like Samba, you can choose it. 2623 02:25:45,020 --> 02:25:46,340 Also network applications. 2624 02:25:48,640 --> 02:25:52,960 So you might not, you know, ever seen like in this screen like where you pick what applications 2625 02:25:52,960 --> 02:25:53,560 you want. 2626 02:25:53,660 --> 02:25:57,580 And the reason why you would pick applications here is because these are actually applications 2627 02:25:57,580 --> 02:25:59,120 that are going to be built into TFTP. 2628 02:25:59,120 --> 02:26:01,680 So you can put them into the image that's put on the FPGA. 2629 02:26:01,820 --> 02:26:06,340 You could stick on an SD card, use a cross compiler, and compile whatever external applications 2630 02:26:06,340 --> 02:26:06,900 you want. 2631 02:26:07,000 --> 02:26:10,100 But these are ones that are going to be built in no matter what into the root boot file 2632 02:26:10,100 --> 02:26:10,540 system. 2633 02:26:12,380 --> 02:26:12,860 Yeah. 2634 02:26:15,100 --> 02:26:15,580 Yeah. 2635 02:26:18,560 --> 02:26:27,980 So, the ACP, some Ethernet tools, HTTP server, FTP server, net cat. 2636 02:26:28,620 --> 02:26:29,100 Yeah. 2637 02:26:36,100 --> 02:26:37,960 Open SSL, open VPN. 2638 02:26:41,180 --> 02:26:47,280 So, you know, pretty much cool stuff here, SSH, Telnet, TFTP. 2639 02:26:49,840 --> 02:26:51,560 Most of the stuff you can do. 2640 02:26:52,780 --> 02:26:58,280 So, other applications are like mobile applications like Perl, Python. 2641 02:26:58,580 --> 02:26:59,100 Yeah. 2642 02:27:00,100 --> 02:27:03,360 You can write like codes and then compile it. 2643 02:27:09,020 --> 02:27:18,220 So, and yeah, and three different games, Dungeon, if you ever played. 2644 02:27:22,040 --> 02:27:25,720 So, yeah, basically we are done here. 2645 02:27:26,660 --> 02:27:28,980 So we are just going to go ahead and just... 2646 02:27:30,080 --> 02:27:34,840 Run the process here. 2647 02:27:36,200 --> 02:27:38,760 Hopefully it's not going to take a lot of time. 2648 02:27:40,980 --> 02:27:43,220 It takes like four minutes for me. 2649 02:27:48,840 --> 02:27:49,460 Yeah. 2650 02:27:51,100 --> 02:27:53,900 We actually want to also... 2651 02:27:58,980 --> 02:28:01,240 We actually want to start the TFTP server, right? 2652 02:28:15,300 --> 02:28:16,380 Oh, we can go ahead there. 2653 02:28:17,600 --> 02:28:17,960 Okay. 2654 02:28:19,100 --> 02:28:19,460 Let's... 2655 02:28:23,880 --> 02:28:24,240 Yeah. 2656 02:28:24,640 --> 02:28:25,000 No. 2657 02:28:25,700 --> 02:28:26,060 Okay. 2658 02:28:26,180 --> 02:28:27,340 I'm going to interrupt it here. 2659 02:28:27,580 --> 02:28:28,960 I think it's going to take some time. 2660 02:28:28,960 --> 02:28:32,640 Let's go ahead and pre-build here. 2661 02:28:34,560 --> 02:28:36,240 So, after you... 2662 02:28:38,080 --> 02:28:38,900 Okay. 2663 02:28:39,040 --> 02:28:48,140 After you compile the kernel, you'll get some files inside your TFTP boot directory. 2664 02:28:48,520 --> 02:28:55,840 Some are like kernel images in different formats and some are like microboot things that you 2665 02:28:55,840 --> 02:28:57,640 want to download. 2666 02:28:57,640 --> 02:29:00,080 There are some... 2667 02:29:00,080 --> 02:29:05,400 For example, there is one you would extract here and then you would dash S extract here. 2668 02:29:05,580 --> 02:29:09,420 Dash S is basically if you want to like... 2669 02:29:10,100 --> 02:29:12,900 This is generally if you close the... 2670 02:29:12,900 --> 02:29:19,280 If you power off your board, your code is going to go away and you're not going to be 2671 02:29:19,280 --> 02:29:21,000 able to run it again if you power on. 2672 02:29:21,240 --> 02:29:23,140 So, what you want it... 2673 02:29:23,140 --> 02:29:23,520 You want to... 2674 02:29:23,520 --> 02:29:27,620 If you want to run it like initially, you can download it. 2675 02:29:27,620 --> 02:29:36,340 You can download the microboot dash S and then you can run it initially. 2676 02:29:38,760 --> 02:29:41,260 So, we are going to go ahead and... 2677 02:29:47,500 --> 02:29:48,140 Into... 2678 02:29:52,960 --> 02:29:54,360 Into serial port. 2679 02:29:56,020 --> 02:30:02,800 Before that, we should start our terminal here. 2680 02:30:03,400 --> 02:30:03,740 Yeah. 2681 02:30:04,180 --> 02:30:12,240 So, this is the serial port on our FPGA on the button and on top, I'm going to dump 2682 02:30:12,240 --> 02:30:16,260 the code inside the serial port and you are going to see hopefully... 2683 02:30:20,040 --> 02:30:22,520 Before that, we should... 2684 02:30:49,700 --> 02:30:52,500 We should take a look at this. 2685 02:30:52,500 --> 02:30:59,580 We generated the code, yeah. 2686 02:31:08,740 --> 02:31:15,200 Now if you remember, we generate the libraries, the bit files and the program, but we didn't 2687 02:31:15,200 --> 02:31:16,600 dump it to our FPGA. 2688 02:31:16,600 --> 02:31:25,520 So, we are going to go ahead and then download it to our FPGA. 2689 02:31:29,780 --> 02:31:30,940 Oh, there you go. 2690 02:31:32,680 --> 02:31:36,640 So, as you can see here, the first stage bootloader has started. 2691 02:31:36,860 --> 02:31:43,900 We dumped the code inside FPGA's BRAM, and then it's waiting for a SRAC image to be downloaded. 2692 02:31:44,200 --> 02:31:44,580 So. 2693 02:31:44,580 --> 02:31:53,400 So, now we are good to, yeah, we are good to download our microboot. 2694 02:31:53,660 --> 02:31:57,580 So, as you can see, it's spinning like a dash over there. 2695 02:31:57,920 --> 02:32:00,180 It's downloading code over serial line. 2696 02:32:01,080 --> 02:32:06,220 And what we are going to see is microboot loading up. 2697 02:32:10,100 --> 02:32:13,600 Well, comparing the size of the kernel and microboot, it's going to... 2698 02:32:14,580 --> 02:32:20,200 If you were to download the kernel, it was going to take, like, a lot of time, so... 2699 02:32:21,460 --> 02:32:28,300 It's pretty much, yeah. 2700 02:32:34,760 --> 02:32:43,820 So, it's like 300K versus 2.5 MB. 2701 02:32:44,160 --> 02:32:44,560 Yeah. 2702 02:32:45,080 --> 02:32:48,840 So, we are in prompt of microboot are here. 2703 02:32:48,980 --> 02:32:49,420 We can... 2704 02:32:49,420 --> 02:32:50,480 This is... 2705 02:32:53,440 --> 02:33:00,680 We have some commands that we can run, so there are some different kinds of options 2706 02:33:00,680 --> 02:33:01,940 here that we can use. 2707 02:33:02,420 --> 02:33:08,960 So, we have the TFTP server running. 2708 02:33:09,320 --> 02:33:09,820 Yeah. 2709 02:33:09,940 --> 02:33:11,700 We have the TFTP server running. 2710 02:33:11,840 --> 02:33:14,560 So, let's go ahead and download it. 2711 02:33:14,560 --> 02:33:14,600 Yeah. 2712 02:33:14,600 --> 02:33:15,020 So, let's go ahead and download our image. 2713 02:33:15,500 --> 02:33:16,220 As you... 2714 02:33:17,720 --> 02:33:18,200 Yeah. 2715 02:33:18,880 --> 02:33:24,980 As you can see here, I don't know if you can read over there, but, yeah, there is 2716 02:33:24,980 --> 02:33:31,700 a register over there, register address over there, like, that you can, like, microboot 2717 02:33:31,700 --> 02:33:36,620 starts, start, and there is a number over there. 2718 02:33:36,800 --> 02:33:43,300 So, what we want to do is we want to, like, pass that number and then write our image 2719 02:33:43,300 --> 02:33:44,120 over that number. 2720 02:33:44,120 --> 02:33:57,600 So, it's 8D, so we want to use, like, 8E, so TFTP, and 8E, it's not E, yeah. 2721 02:33:59,200 --> 02:34:06,860 And then our image is image.ub, yeah, it's loading the image. 2722 02:34:07,740 --> 02:34:08,680 What we did... 2723 02:34:08,680 --> 02:34:10,320 What we did is we are just... 2724 02:34:10,320 --> 02:34:13,260 We just downloaded our kernel image that we compiled. 2725 02:34:14,400 --> 02:34:19,380 It's now on our FPGA, we just wrote it, and now we are going to go ahead and execute 2726 02:34:19,380 --> 02:34:19,680 that. 2727 02:34:20,160 --> 02:34:21,400 So, in order to do... 2728 02:34:21,400 --> 02:34:24,040 Let's, first of all, check, yeah, that's correct. 2729 02:34:24,340 --> 02:34:32,560 So, we are going to go ahead and execute it with boot M8E. 2730 02:34:34,560 --> 02:34:36,060 0, 0, 0, 0, 0, 0. 2731 02:34:41,920 --> 02:34:42,720 Oh, sorry. 2732 02:34:42,900 --> 02:34:43,240 Sorry. 2733 02:34:48,100 --> 02:34:48,960 There you go. 2734 02:34:49,100 --> 02:34:56,300 Now we are loading up our Linux kernel, at least, at last, yeah. 2735 02:34:58,340 --> 02:34:58,860 Okay. 2736 02:35:14,320 --> 02:35:17,960 There we go, we see the DEF CON demo logging over there. 2737 02:35:21,200 --> 02:35:23,360 We go ahead... 2738 02:35:26,000 --> 02:35:26,980 Enter the password. 2739 02:35:27,980 --> 02:35:28,840 What was the password? 2740 02:35:28,840 --> 02:35:29,140 Password. 2741 02:35:35,660 --> 02:35:37,060 There you go. 2742 02:35:37,220 --> 02:35:37,780 Yeah. 2743 02:35:38,640 --> 02:35:41,580 We are now inside our FPGA box here. 2744 02:35:42,160 --> 02:35:48,640 So, you know, if we do a processor, just to make sure. 2745 02:35:48,880 --> 02:35:53,140 CPU family microblades, FPGA are Spartan 3E. 2746 02:35:53,700 --> 02:35:57,460 And then CPU version, like, 7.10 C. 2747 02:35:57,460 --> 02:36:09,520 C. So yeah, I hope we can also Telnet into it. 2748 02:36:20,600 --> 02:36:21,300 Yeah. 2749 02:36:21,300 --> 02:36:32,020 As you can see, it's running a Telnet server, so you can Telnet into it, or whatnot. 2750 02:36:32,880 --> 02:36:33,480 All right. 2751 02:36:33,600 --> 02:36:36,560 So give Farqan a round of a hand for doing this Linux stuff. 2752 02:36:41,140 --> 02:36:47,780 Well, the question I'm sure is on everyone's mind, will it run Vista? 2753 02:36:47,960 --> 02:36:48,180 Yep. 2754 02:36:48,560 --> 02:36:49,040 No. 2755 02:36:49,640 --> 02:36:50,520 It will not. 2756 02:36:50,800 --> 02:36:51,280 Yeah. 2757 02:36:51,300 --> 02:36:51,480 Never. 2758 02:36:51,720 --> 02:36:51,800 Wow. 2759 02:36:52,880 --> 02:36:56,720 I mean, that's a real advantage of Linux, is that it can run on pretty much any architecture, 2760 02:36:56,920 --> 02:36:57,420 as you can see. 2761 02:36:57,620 --> 02:37:00,700 The real question on all of our mind is, why would you want it to? 2762 02:37:01,320 --> 02:37:01,720 Yeah. 2763 02:37:01,840 --> 02:37:03,660 I wouldn't want it to run Vista. 2764 02:37:05,720 --> 02:37:06,360 All right. 2765 02:37:06,600 --> 02:37:08,220 So yeah. 2766 02:37:08,320 --> 02:37:10,720 I guess we're ready for the netbook then. 2767 02:37:11,040 --> 02:37:11,280 All right. 2768 02:37:11,340 --> 02:37:12,000 I'll tell you. 2769 02:37:12,100 --> 02:37:12,180 Yeah. 2770 02:37:12,180 --> 02:37:12,560 There's one. 2771 02:37:12,640 --> 02:37:14,660 Oh, one more thing, I guess. 2772 02:37:14,740 --> 02:37:15,120 One more thing. 2773 02:37:15,260 --> 02:37:15,640 We promise. 2774 02:37:16,980 --> 02:37:21,280 Just so we're not totally Xilinx idiots here, you can see that... 2775 02:37:21,280 --> 02:37:21,340 Yeah. 2776 02:37:21,800 --> 02:37:23,180 Altair has some software, too. 2777 02:37:23,780 --> 02:37:25,320 So on the... 2778 02:37:27,280 --> 02:37:27,840 Yeah. 2779 02:37:28,140 --> 02:37:30,200 If you can see, there's a cool board here. 2780 02:37:30,980 --> 02:37:32,160 It's an Altair board. 2781 02:37:32,300 --> 02:37:38,640 Altair is, by the way, the other company, other FPGA company on the market. 2782 02:37:40,100 --> 02:37:42,640 So they have different kinds of boards. 2783 02:37:43,100 --> 02:37:47,400 And this one is Cylon 2. 2784 02:37:47,780 --> 02:37:48,960 I know the pronunciation. 2785 02:37:49,000 --> 02:37:50,940 So it has... 2786 02:37:50,940 --> 02:37:51,260 Yeah. 2787 02:37:51,280 --> 02:37:53,360 It has a cool touch screen over the... 2788 02:37:53,360 --> 02:37:54,040 It's running. 2789 02:37:54,560 --> 02:37:56,020 We want to take a picture. 2790 02:37:56,440 --> 02:37:57,360 So yeah. 2791 02:37:57,540 --> 02:38:06,260 It has a touch screen over here, and then a five megapixel camera here, but it has 2792 02:38:06,260 --> 02:38:15,120 a lot of switches and LEDs over here, four buttons, and back on the board, there's an 2793 02:38:15,120 --> 02:38:15,720 SD card. 2794 02:38:16,100 --> 02:38:18,900 Over on the top, there is... 2795 02:38:20,260 --> 02:38:28,460 There's like microphone in and line out for speakers, and there's also a VGA port on this 2796 02:38:28,460 --> 02:38:28,880 FPGA. 2797 02:38:29,240 --> 02:38:30,160 It's pretty cool. 2798 02:38:30,300 --> 02:38:32,340 And there's also an LCD screen here. 2799 02:38:32,520 --> 02:38:35,560 You can put up some cool stuff on that. 2800 02:38:36,680 --> 02:38:37,720 And yeah. 2801 02:38:37,920 --> 02:38:41,000 Let me show you a cool demo about this board. 2802 02:38:42,940 --> 02:38:43,980 So camera. 2803 02:38:44,260 --> 02:38:44,480 Camera. 2804 02:38:44,660 --> 02:38:45,060 Okay. 2805 02:38:45,100 --> 02:38:46,060 Do you already have it loaded? 2806 02:38:46,200 --> 02:38:46,380 Yeah. 2807 02:38:48,900 --> 02:38:49,560 Let me first pull up here. 2808 02:38:50,180 --> 02:38:54,580 So this Quartus software is Altera's ISE. 2809 02:38:55,260 --> 02:38:56,520 You can download it. 2810 02:38:58,320 --> 02:39:01,660 And there is this NIOS software. 2811 02:39:01,780 --> 02:39:06,020 It's for embedded applications. 2812 02:39:06,440 --> 02:39:07,460 Also you can download. 2813 02:39:07,740 --> 02:39:10,000 It has Linux version, but it's pretty expensive. 2814 02:39:10,400 --> 02:39:13,360 Write them nasty letters so they make it free like the Windows version. 2815 02:39:13,580 --> 02:39:13,660 Yeah. 2816 02:39:13,800 --> 02:39:18,340 That's why I'm running it on VM over a... 2817 02:39:18,340 --> 02:39:18,880 Yeah. 2818 02:39:18,880 --> 02:39:19,580 Crappy XP. 2819 02:39:19,780 --> 02:39:29,800 So I will flop the demo for this board. 2820 02:39:31,180 --> 02:39:31,960 Yeah. 2821 02:39:32,540 --> 02:39:33,320 Yeah. 2822 02:39:39,120 --> 02:39:41,500 Try to start it again. 2823 02:39:41,520 --> 02:39:42,060 Yeah. 2824 02:39:43,320 --> 02:39:44,100 Yeah. 2825 02:39:47,280 --> 02:39:48,060 Yeah. 2826 02:39:48,060 --> 02:39:48,420 Yeah. 2827 02:39:48,420 --> 02:40:05,700 So, I didn't have so much time to examine all the stuff on that, so this is a demo from the Altera, thanks to Brian for his support. 2828 02:40:05,960 --> 02:40:10,540 So, here, as you can see, the interface is pretty much the same as I see. 2829 02:40:10,540 --> 02:40:21,260 You can see the files over here. I don't know if you can see it from the back, but, yeah. 2830 02:40:23,600 --> 02:40:31,220 So, yeah, the compilation process is here and the messages are on the button. 2831 02:40:31,720 --> 02:40:39,560 So, we are going to go ahead and start compilation. 2832 02:40:40,540 --> 02:40:41,940 It's already, again, pre-confiled. 2833 02:40:43,740 --> 02:40:46,440 So, full compilation was successful. 2834 02:40:47,100 --> 02:40:51,720 We are going to go ahead and swap the programmer. 2835 02:40:55,280 --> 02:40:57,540 It's like impact in Xilinx. 2836 02:40:59,380 --> 02:41:02,320 Yeah, I will. Let me show something. 2837 02:41:17,800 --> 02:41:19,780 So, it's downloading the code. 2838 02:41:25,080 --> 02:41:27,700 Yeah. So, I will. 2839 02:41:31,180 --> 02:41:32,680 Going to give you guys the camera. 2840 02:41:32,820 --> 02:41:37,660 Basically, the software demo in here actually does edge detection. 2841 02:41:37,940 --> 02:41:40,520 So, it takes the picture that it takes in via the camera. 2842 02:41:40,540 --> 02:41:43,580 And can actually detect, you know, like shapes that are different colors, 2843 02:41:43,700 --> 02:41:45,840 different brightnesses, and different things like that. 2844 02:41:46,060 --> 02:41:50,420 So, after we show this demo, we will announce the netbook winner. 2845 02:41:54,020 --> 02:41:55,520 So, this is touch screen. 2846 02:41:55,820 --> 02:42:01,480 When I touch the screen, it changes to normal mode. 2847 02:42:01,800 --> 02:42:03,040 You know, as you can see. 2848 02:42:05,540 --> 02:42:09,020 And, again, changes. 2849 02:42:09,020 --> 02:42:10,900 And, like, it swaps the colors. 2850 02:42:15,620 --> 02:42:16,660 So, yeah. 2851 02:42:21,180 --> 02:42:23,500 So, basically, that's it. 2852 02:42:24,080 --> 02:42:25,440 All right. Thanks, Virkan. 2853 02:42:39,020 --> 02:42:40,800 If you have any questions, let me know. 2854 02:42:44,560 --> 02:42:48,760 So, this is, I guess, what, well, everyone who chose to wait, 2855 02:42:48,820 --> 02:42:50,320 this is what you've all been waiting for. 2856 02:42:52,100 --> 02:42:55,020 And, once again, I'd like to thank everyone for sticking around 2857 02:42:55,020 --> 02:42:56,200 and hearing our talk. 2858 02:42:56,320 --> 02:42:58,400 I hope you learned something cool about FPGAs. 2859 02:42:58,740 --> 02:43:01,380 And, you know, once we're done, feel free to ask questions. 2860 02:43:01,480 --> 02:43:04,540 And if you see us throughout the rest of the con, ask us questions. 2861 02:43:04,700 --> 02:43:07,080 And we'll be happy to try and answer them. 2862 02:43:07,080 --> 02:43:14,620 So, Steve and Mike here are going to pull some names to see who wins. 2863 02:43:16,040 --> 02:43:16,440 Okay. 2864 02:43:17,700 --> 02:43:20,620 We'll do the answers as we, like, go over the questions. 2865 02:43:20,940 --> 02:43:24,260 But before we give the answer to this, I just want to ask, 2866 02:43:24,340 --> 02:43:28,800 is Rodney De Carataret, Rodney De Carataret, is he here? 2867 02:43:29,320 --> 02:43:29,720 Okay. 2868 02:43:29,780 --> 02:43:31,100 I just want to return his business card. 2869 02:43:31,140 --> 02:43:34,640 And I wouldn't want, you know, him to lose it knowing that it says 2870 02:43:34,640 --> 02:43:35,900 US Stratcom on it. 2871 02:43:35,900 --> 02:43:40,000 And Rodney.decaratet at JTFGNO.mil. 2872 02:43:40,120 --> 02:43:44,060 So, if anybody wanted to e-mail him and let him know how you feel about him 2873 02:43:44,060 --> 02:43:46,480 leaving his US Stratcom business card around, you can. 2874 02:43:46,740 --> 02:43:48,440 I'm going to just leave it right there. 2875 02:43:49,240 --> 02:43:50,460 We had to check the rules. 2876 02:43:50,580 --> 02:43:53,220 We found out we can't apply that for Spot the Fed. 2877 02:43:53,380 --> 02:43:54,120 So, yeah. 2878 02:43:54,420 --> 02:43:55,540 It was worth a shot. 2879 02:43:55,720 --> 02:43:56,380 Sorry, Rodney. 2880 02:43:57,280 --> 02:44:04,140 So, for the question, how many 128-bit registers are in each Intel Core i7 2881 02:44:04,140 --> 02:44:05,200 NEOHAM processor? 2882 02:44:05,200 --> 02:44:06,880 It was 16. 2883 02:44:07,660 --> 02:44:08,020 16. 2884 02:44:08,160 --> 02:44:08,300 16. 2885 02:44:08,300 --> 02:44:09,120 So, everybody got that right. 2886 02:44:09,180 --> 02:44:09,500 Good job. 2887 02:44:09,700 --> 02:44:10,020 Yeah. 2888 02:44:10,080 --> 02:44:13,840 When they first did the 128 registers, they did eight and then they doubled it. 2889 02:44:14,420 --> 02:44:16,280 Not in the i7, but in ones before it. 2890 02:44:16,320 --> 02:44:17,560 But the i7 has 16, too. 2891 02:44:18,620 --> 02:44:19,560 What kind of name? 2892 02:44:22,660 --> 02:44:23,020 John? 2893 02:44:25,060 --> 02:44:26,320 How many Johns we got? 2894 02:44:26,600 --> 02:44:26,960 One? 2895 02:44:27,300 --> 02:44:27,960 Oh, just one? 2896 02:44:28,080 --> 02:44:28,240 Okay. 2897 02:44:28,320 --> 02:44:28,580 Good. 2898 02:44:28,680 --> 02:44:28,880 Yeah. 2899 02:44:35,200 --> 02:44:35,420 We got to thank you, Mark. 2900 02:44:35,740 --> 02:44:36,700 Do we have this button? 2901 02:44:37,980 --> 02:44:38,340 Oh. 2902 02:44:39,180 --> 02:44:39,540 I thought... 2903 02:44:39,540 --> 02:44:39,940 What was that for? 2904 02:44:41,400 --> 02:44:42,780 That was for the T-shirt. 2905 02:44:44,840 --> 02:44:45,200 Sorry. 2906 02:44:46,060 --> 02:44:46,380 Sorry. 2907 02:44:46,580 --> 02:44:48,000 We gotta save the best for last. 2908 02:44:48,080 --> 02:44:48,420 Sorry. 2909 02:44:48,460 --> 02:44:49,160 We forgot to announce. 2910 02:44:49,300 --> 02:44:50,100 We're drawing... 2911 02:44:50,800 --> 02:44:52,220 We're drawing the netbook last. 2912 02:44:54,100 --> 02:44:56,720 And for those of you who didn't get called, I... 2913 02:44:56,720 --> 02:44:57,760 I felt just happy though, right? 2914 02:44:58,040 --> 02:44:58,400 Everybody... 2915 02:44:58,400 --> 02:44:59,300 All right. 2916 02:44:59,300 --> 02:44:59,580 All right. 2917 02:44:59,580 --> 02:45:00,240 We'll play it fair. 2918 02:45:01,000 --> 02:45:01,800 We'll play it fair. 2919 02:45:02,340 --> 02:45:02,900 All right. 2920 02:45:03,560 --> 02:45:04,680 We're going to go back this way. 2921 02:45:05,060 --> 02:45:05,180 Okay. 2922 02:45:05,180 --> 02:45:07,180 We're going to go backwards, all right? 2923 02:45:08,220 --> 02:45:10,240 We should put his name back. 2924 02:45:10,520 --> 02:45:12,620 Yeah, we'll chuck it back in there, all right? 2925 02:45:12,720 --> 02:45:14,140 Fair, legit, here's your entry. 2926 02:45:14,620 --> 02:45:16,280 Going back in there, let's give it a... 2927 02:45:16,280 --> 02:45:17,600 That was my fault, I'm sorry. 2928 02:45:17,680 --> 02:45:19,080 I didn't remember to announce it. 2929 02:45:19,160 --> 02:45:21,800 So, for another shirt... 2930 02:45:22,440 --> 02:45:25,180 If you win the netbook, you don't get the T-shirt, huh? 2931 02:45:27,300 --> 02:45:28,400 So don't be excited. 2932 02:45:31,680 --> 02:45:32,480 Brett Esquivel? 2933 02:45:32,660 --> 02:45:34,780 I apologize if I can't pronounce that. 2934 02:45:35,180 --> 02:45:36,220 Brett, come on up. 2935 02:45:37,400 --> 02:45:38,420 Corey, Corey. 2936 02:45:40,860 --> 02:45:44,000 Our authentication is lacking in implementation, I apologize. 2937 02:45:48,180 --> 02:45:49,940 All right, here we go. 2938 02:45:50,360 --> 02:45:51,380 Mic hit me again. 2939 02:45:54,500 --> 02:45:56,640 And a punch to the face with Matt T. 2940 02:45:58,260 --> 02:46:01,060 Matt T, all right, that was for a mug. 2941 02:46:02,340 --> 02:46:03,540 You can thank Intel. 2942 02:46:06,460 --> 02:46:07,080 All right. 2943 02:46:13,220 --> 02:46:13,660 C9H13N. 2944 02:46:16,060 --> 02:46:16,500 Anyone? 2945 02:46:22,360 --> 02:46:25,420 Actually, I will give this to you if you can guess their password. 2946 02:46:26,540 --> 02:46:30,240 Now, I'm telling you, you have a very good shot of this 2947 02:46:30,240 --> 02:46:34,000 if you think carefully about what a common password might be. 2948 02:46:35,320 --> 02:46:36,180 Oh, man, delete. 2949 02:46:36,440 --> 02:46:37,280 He said it. 2950 02:46:37,300 --> 02:46:38,140 He said it. 2951 02:46:38,200 --> 02:46:39,500 Their password is password. 2952 02:46:39,780 --> 02:46:44,520 So, for a netbook, you could have had a netbook and... 2953 02:46:46,700 --> 02:46:50,140 All right, we got a few more slips. 2954 02:46:50,480 --> 02:46:50,700 What's this for? 2955 02:46:52,860 --> 02:46:54,360 This is for what are these, Corey? 2956 02:46:55,340 --> 02:46:56,460 Yeah, we still got Tumblr. 2957 02:46:57,180 --> 02:46:58,660 What is a Tumblr, Corey? 2958 02:47:00,680 --> 02:47:01,100 Travel mug. 2959 02:47:01,260 --> 02:47:02,240 Travel mug, okay. 2960 02:47:02,780 --> 02:47:04,120 We're going to try to speed this up. 2961 02:47:04,180 --> 02:47:04,520 Chris? 2962 02:47:07,880 --> 02:47:10,220 Chris, I'm going to need a password on this one. 2963 02:47:10,360 --> 02:47:11,600 Wait, there are two Chris's. 2964 02:47:11,760 --> 02:47:13,020 I'm seeing two Chris's. 2965 02:47:13,100 --> 02:47:13,820 We're going to need... 2966 02:47:14,260 --> 02:47:14,920 All right. 2967 02:47:15,160 --> 02:47:17,140 Meanwhile, we're going to draw the next one. 2968 02:47:17,720 --> 02:47:19,380 You already got one, so... 2969 02:47:22,700 --> 02:47:23,540 Albert Caliland? 2970 02:47:23,740 --> 02:47:25,300 I apologize. 2971 02:47:26,140 --> 02:47:26,940 Sorry, Al. 2972 02:47:28,960 --> 02:47:29,720 All right. 2973 02:47:32,560 --> 02:47:33,400 All right. 2974 02:47:36,040 --> 02:47:37,020 Go ahead, Mike. 2975 02:47:39,740 --> 02:47:40,780 All right. 2976 02:47:41,640 --> 02:47:42,160 Tim. 2977 02:47:43,760 --> 02:47:44,280 Tim. 2978 02:47:51,980 --> 02:47:53,020 Hey, Tim. 2979 02:47:59,820 --> 02:48:01,700 No, one more. 2980 02:48:01,880 --> 02:48:02,480 Not netbook? 2981 02:48:02,760 --> 02:48:03,280 Yeah. 2982 02:48:03,380 --> 02:48:05,080 Otherwise, it's not going to be fair to John. 2983 02:48:05,840 --> 02:48:07,000 We're going to shake it up. 2984 02:48:07,060 --> 02:48:07,860 There's barely any left. 2985 02:48:08,740 --> 02:48:09,480 What's this for? 2986 02:48:09,560 --> 02:48:10,240 You have a really good chance. 2987 02:48:10,240 --> 02:48:12,680 This is for one more Tumblr or travel mug. 2988 02:48:12,800 --> 02:48:14,900 By the way, there is very few correct answers for this. 2989 02:48:15,640 --> 02:48:16,040 John. 2990 02:48:16,840 --> 02:48:17,240 John. 2991 02:48:17,360 --> 02:48:18,760 You can keep both. 2992 02:48:20,960 --> 02:48:22,140 You were so close. 2993 02:48:22,200 --> 02:48:24,560 John is the most unlucky, unlucky guy. 2994 02:48:24,840 --> 02:48:25,020 Yeah. 2995 02:48:26,840 --> 02:48:27,620 All right. 2996 02:48:28,680 --> 02:48:29,480 Last drawing. 2997 02:48:30,200 --> 02:48:31,000 Shaking it up. 2998 02:48:32,140 --> 02:48:32,860 Reaching in. 2999 02:48:33,180 --> 02:48:33,540 That's me. 3000 02:48:34,720 --> 02:48:35,120 All right. 3001 02:48:35,120 --> 02:48:35,160 All right. 3002 02:48:35,180 --> 02:48:35,900 That's me. 3003 02:48:35,900 --> 02:48:36,400 The other... 3004 02:48:37,200 --> 02:48:37,720 Jesse. 3005 02:48:38,700 --> 02:48:39,220 The other Jesse. 3006 02:48:39,220 --> 02:48:39,340 Oh, yeah. 3007 02:48:40,080 --> 02:48:41,100 The other Jesse. 3008 02:48:41,880 --> 02:48:42,400 Yes. 3009 02:48:42,540 --> 02:48:43,380 All right. 3010 02:48:43,560 --> 02:48:44,040 Hey. 3011 02:48:45,380 --> 02:48:45,720 Yeah. 3012 02:48:48,780 --> 02:48:49,680 There you go. 3013 02:48:49,880 --> 02:48:50,420 There you go. 3014 02:48:50,440 --> 02:48:51,940 All right, everyone. 3015 02:48:52,060 --> 02:48:52,700 Round of applause. 3016 02:48:55,540 --> 02:48:57,480 Thank you very much for coming out. 3017 02:48:57,600 --> 02:49:00,420 And I hope you guys have a good DEF CON. 3018 02:49:00,780 --> 02:49:01,300 Yeah. 3019 02:49:01,340 --> 02:49:01,740 Yeah. 3020 02:49:01,760 --> 02:49:01,960 Yeah. 3021 02:49:01,960 --> 02:49:02,460 Yeah.