 Studies of the University of York. So, I will tell you who I am first. I am Dan, as has been mentioned. Last two years I have spent studying electronics at the University of York. I decided that was a bad idea so I have sort of stopped that. Taking a year out when I go back I'll be doing computer science hopefully. But for now I am working at arm so at least they trust me to know what we are talking about when it comes to this. So, why would anyone want to build such a trivially small... Oh no, first of all, sorry. I'm claiming this is the world's smallest, lowest spec PC. And so just in case you didn't leave me, these three comparisons at the top here are sort of FPGA utilisation numbers. So, the RAM in this computer, which is only 64 bits, actually takes up only a third of the space in the FPGA that I need for one of the switch debouncers, which tells you two things, I guess. One, I've got not a lot of RAM, and two, the switches are really bouncy. But the entire implementation in the FPGA only takes up about the size of two and a half of the debouncers. So, overall it's pretty small as well. And I've sort of tried to compare it to an ARM Cortex N0+, which is the smallest ARM microcontroller that you can get. These numbers might be a bit iffy because I'm comparing FPGA utilisation to gate count, which is a bad idea. But I reckon it's at least smaller than a third of ARM's smallest core, so it's pretty small. And that led to a bit of a silly comparison. If you had an HDTV and that represented the CPU in your iPhone 5S, it's got about two million pixels on an HDTV, this thing would take up nine of them on the same TV. So, it's pretty small. And I've also compared it to the size of the RAM on the world's first stored program computer. And, as you can see, it's tiny. So, that was the SCCM which had 1024 bits of RAM. So, it's a fairly small core. Why would anybody want to build a computer so small? So, when I got my first computer, this is the sort of thing that I saw. There was a big black box in the middle and it did some magic stuff. And I had no idea what was going on inside it. And that was really annoying. I think I had the keyboard on the mouse the right way around when I used it. I didn't know what was going on in there. And that really annoyed me. So, shortly after I got that computer, my dad installed QBasic on it for me. It was a Windows 95 machine. And I started learning to write basic. And so, this picture grew in my mind of what was going on inside. This is when I was about eight or nine or something. And so, I kept my little head of program in various other languages and eventually assembly language. And so, I thought, yeah, I figured out how it works now. By the time I was about 15. So, this was the image that I had in my head. I thought, yeah, I reckon I know how a computer works now. I'm not going to explain that in detail, but that's a sort of generic CPU might look like this. So, I said to myself, I think I know how these things work now. I reckon I could make my own. I said could make my own though. So, back when I was 15, my pocket money wouldn't cover a computer that I would know how to build at the time. So, I was thinking of, you know, I'd need a mountain of 74 series logic chips or transistors or relays or something. So, I kind of gave up on the idea. But then, a few years later, when I got to university, I started studying electronics, I did a VHDL course. So, I was teaching how to use VHDL to program FPGAs. And so, suddenly I knew how to build a computer and I had the resources to do it. Because I could just go and buy an FPGA and program that. I didn't need a mountain of hardware. So, I drew this diagram. I'm not going to explain that in detail either. I've also made the mistake of putting an architecture diagram in my slides. Yeah, I came up with this idea for just a really simple CPU that I could design just to prove to myself that I do actually know how a computer works. So, this was inspired by this, which I've already mentioned. This is the SSEM, more commonly known as the Manchester Baby. So, this is a replica which is in the Museum of Science and Industry in Manchester of the world's first computer, effectively. But it had this really cool little thing in the middle here. This is a CRT which displays a grid of dots and dashes and that represents the entire memory of the system. So, you can see your program loaded in on that screen. And in fact, there's another CRT somewhere over on this side which is actually the storage for the program. So, there's a grid of sensors in front of a CRT and it's sort of like a delay line memory. It scans the entire memory out to the phosphor on the front of the screen and then that's detected and sent back round. So, it's a sort of primitive delay line memory. I thought that was a really cool idea. So, we'll see right in the middle of my design there's this grid here. 8x8 grid of LEDs which is going to represent my entire RAM. So, I went and bought this which is a Papillio 1500K board I think and one of those which is like two quid off of eBay. That was pretty much the reason for making the memory size 8x8 was because I could get a super cheap module that already did it and I knew how to use it and I could easily connect it to my FPGA. So, I wrote some BSL code and to my surprise it worked. So, there it is. Thanks, bye. This is actually, this is version 2. I hope you don't think I'm lying to you but this is not the original. Somebody broke the original one. So, I took this to the UK Maker Faire in Newcastle and York Hackspace was unfortunate enough to be placed in an area where the floor that you're walking on sort of built up a static charge in you as you walk across it and back when I had version 1, the Papillio was actually mounted to the back of the lid on that screw there and so a fellow York Hackspace member was walking along the floor and then came over to this and said, oh look at this cool thing. Touch that and completely killed it. Which was a bit annoying, but... He actually and Bob actually killed the Papillio board. I don't know exactly what he did to it, but I had to get a new one anyway. So, that's version 2. That prompted the addition of some extra features. I should thank him. Of course, it's open source. You can go and download this by a Papillio, by a 2 quid LED matrix off of eBay and make your own one of these if you wish. Also, another member of York Hackspace got quite interested in this project. Nick Moriarty wrote in JavaScript an emulator for this machine and then I wrote a front end for it, which is why it doesn't look very good. But if you want to, you can go and play around with the architecture. Create some programs all inside your browser. Now, the controversial slide. Unfortunately, this is how I see FPGA programming for hobbyists. I'm not the next Randall Munro. It's clear, but... When I look at things like Arduino and Raspberry Pi and all of the similar things around that, you see great communities of people who know what they're talking about mostly and are willing to welcome you in, give you advice. But unfortunately, for hobbyists at least, there isn't, at least from my point of view, I don't see quite the same community, which reminds me a bit. This is changing, so the Papillio is great. It's not super cheap, but it's also really difficult to find good resources on the internet that tell you how to program it. So that was what put me off initially. When I did the VHDL course at uni, I decided to buy one and try to learn how to use it. So, round to over. So you only have eight bytes of memory and you need to store your entire program in that and the data that it uses. So it can be a bit of a challenge. So there's a couple of programs there. So the first program that I wrote was effectively just a counter from one to six and then looped back round. So depending on how long you ran the program, it would generate around a number between one and six. Hence, it's a dirol program. It would just store the result in the last three bits of the last line in the round there. But it's a really simple architecture. There's about 30 instructions and each one is a five-bit opcode and a three-bit address, obviously points to one of these other locations in memory. So it's quite easy. I won't go in depth much into these programs, but you can go and have a play with it in the simulator if you want to learn exactly how they work. But, yeah, you have to play a game called Extreme Code Golf when you're programming this. So I was chatting to some friends from York Hackspace and I said, I don't think you can fit a Cylon program in eight bytes. And they mostly agreed. So a Cylon program is a, well, a Cylon is a monster with a scanning LED animation on it, in case you don't know. So I thought it would be a challenge to get one of these lines to do a sort of scrolling backwards and forwards animation. And it is quite difficult, but fortunately, I've got it here, the machine does have a mode where you can view the one and only internal register that it's got, which does make it a little bit easier. So you just have to make the value in the register to do the animation that you want. But still it's difficult to fit it into eight bytes. And so this is a program that Nick wrote, actually, which proves you can do it in eight bytes. But there's some nasty tricks played. So you'll notice jump one is the first instruction, which is just going to jump from there to there, which would have happened anyway. So that's a no-op. And load one, by that point in the program, at least after the first iteration, is also a no-op. And you have to do that because each loop that moves the LED from one side to the other takes up three bytes. And each test needs one byte of data to check to see if it's hit the end. So that's already eight bytes, and you haven't got any space to put an instruction in to jump back to the start of the first loop. So your data gets executed as if it's instructions, which means it has to be no-op equivalent, which is a bit of an A as well. There's also, here's another example of some more extreme code golf. So I thought, that's pretty cool, but I want this to interface with the real world. So there is a GPIO connector on the side here. So I thought, can I get the same thing to happen on a bunch of LEDs on a breadboard? And you kind of can, but it's a bit awkward. So when you do this, the LED doesn't move at the same speed. So it'll go that way really quickly and then move really slowly that way. Because one of the operations that makes it shift has to be implemented outside of the machine because, well, you need an extra instruction in each loop to write the value out to the GPIO port. But they're already taking up three instructions each. So if each one needed an extra instruction in it, then you'd have no space for your extra data. And so in this case, I've used this IO swap instruction, which writes the value out and reads the value in at the same time. And so the other rotation is actually implemented by a bunch of wires connecting the outputs to the inputs, but shifted, which is a bit of a cheat, I know. And it does mean it takes two iterations through that loop to actually do the shift. So that's why it's a bit slower. Yeah, so the challenge is involved in programming it. But it can be fun. I like code golf. So some people have said to me, oh, that'd be really great for teaching computer science. And they're probably right. So if you start teaching someone how to program a computer from a really high level, then they'll probably understand it after a while. But like with me, it took me seven or eight years to figure out exactly what was going on underneath. So yeah, I'm sure there's people at Intel who couldn't even tell you. There's probably one or two engineers at Intel that know exactly what's going on in there, if that, I reckon. But with something like this, which is a lot more tangible and easier to understand, you could explain all the concepts to someone fairly quickly. And they'll be able to understand it even if they've never really seen such a thing before, which I think could be a really useful tool. I've actually made that take a lot less time than I thought it would. So that's the end. Thank you very much.