George Hotz | Programming | tinygrad: a custom accelerator ASIC? we investigate with real hardware!
uh what's up what's up streamers what's up what's up good morning everybody good morning vietnam good morning saigon good morning leningrad is that still a place or stalingrad if that's still a place or is it saint petersburg now i don't know i only know russian rap i don't know russian geography uh all right what's up we did a lot of work off stream um we got all the columns and matrix multiplies i didn't do the backwards yet on the comm i should probably do the backwards on the common top this is inference with an efficient net b0 using tiny grad through this proxy uh basically it's using this this mini risk instruction set that i made up so look at what we have uh here it's very very simple instructions that um so it's uh i think like the tensor core on nvidia but one of them and bigger uh so i don't think we're going to be able to fit a 32 by 32 map mode to this guy we have hardware and i know you guys love hardware i'm gonna text my friend be like yo streaming right now lookie look we got hardware oh with the mic i didn't buy the mic no i watched some youtube videos and it's like bro the blue yeti is fine um so i didn't buy a mic it's really just my production quality so i downloaded pro tools and then didn't do anything with it or uh not not uh 32 by 32 is just the size of the uh like the matrix right so we can take two 32 by 32 matrices now the question is what is the biggest thing we can implement on this little fpga here uh so it's an arctic 7 100 t so let's let's do the math out because you know this card costs 7 500 and it's not going to plug into my mac this thing will plug into my mac anybody can buy it and it's for sale for a reasonable price i believe uh it's a rda7 board they're on amazon i just bought it yes these things there you go oh this one has the crappy one on it i bought the better one um i didn't realize it came in multiple 100t yeah i bought this one how much is this how much is this chip i'm going to show you guys about octo part there's no octo part no nothing get rid of that whoa that's an expensive ass chip boys yo maybe i didn't get so ripped off for this board look at this chip it costs 125 dollars damn and it's not in stock well no chips are in stock because like you know the chinese stole them all or something i don't know what good conspiracy theory can we spread about the chip shortage man ah yeah i don't know what if we got scammed and they just put this sticker on the chip it's not really this chip yeah fpga stream today who remembers my other fpga stream so we're probably not going to get to the real hardware but we're going to design it for this hardware i'm going to design it with this hardware in mind look it comes with that sticker oh man you know what i'm going to sell processors i'm going to stick a sticker on it and it could be a different processor yeah cool that's better thank you than let me show it off um no i think the chinese stole all the chips i'm gonna go with that man i'm gonna go with that now who can everyone blames china for everything who can we blame who hasn't been blamed lately for things russia gets blamed for things who hasn't been blamed mongolia yeah the mongolians did it yeah mongolia is you know you go to mongolia and it's just a paradise of chips hey itunes thank you for gifting subs of course you get a question i'm not manufacturing my own all right so while too much dollars more than mike no i don't know that's that's a reference that won't age because people no one watched yesterday's stream and they'll be like what mike what mike where can i buy a mic be like yo you'll be blue yeti's fine watch this youtube video um all right so let's look at what this chip is and what our specs are on this board well first let's put copy and paste this in here it has 256 megs of ddr3 which sounds very slow 16-bit bus at 667 megahertz so is that 667 ddr that's a crappy little chip i multiply by two because it's ddr i can hope so that's how many bits per is that many bits per second we like to think of in bytes per second and that's megabytes per second okay that seems kind of crappy but um with 2.6 gigabytes per second of ram bandwidth versus oh hype train whoa big crypto cat gifting big subs whoa big subs big gift um your f max for any design will not be pushing the ddr too much we're gonna have to implement a dma controller for the ddr internal clock speeds exceeding 450 megahertz that sounds like 450 megahertz if it was faster they'd just tell you that okay um the block ram is measured in k bits uh why k bits all right so if we want to fit 19 bit floats then we're going to provide that and we're left with 255 k thingies well you know what's measuring the normal doesn't even have a megabyte of ram what a scam this is poverty levels of ram 600 kb of sram all right let's just see if this is a total non-starter right now uh dma well okay we shouldn't even measure this we should measure in elements all right so it can fit 255k elements [Music] oh yo we gotta download more ram all right did anyone ask questions you guys uh what's a signal boost is that the is that the word if i was going to approach yo quee single boost this guy over here all day all week occupy wall street are we gonna bring occupy wall street back man see see look let me tell you something of ramp time elites love racism because racism divides poor people elites hate occupy wall street because occupy wall street focuses you know the attention where it should be focused on the people making the fake money you need a command space yeah but then you know who knows what's in my spotlight man who knows what's in my spotlight i like google oh google's stealing all my math google's gonna know google's gonna know what i'm building they're gonna i'm gonna make knock-offs man who thinks they're gonna make knock-offs all right so 255k 19-bit elements uh yo if you guys if you guys haven't heard it yet check out my new song on soundcloud uh y'all i'm real i'm real proud of it this is you know what you get when you work with like real music people it sounds like a real song is this my most liked song not yet i think it's still these ones still have more likes we're getting there [Music] oh how does it feel to have a good song i'm finally succeeding at my dream of being a rapper when i grow up you know some people want to be baseball players some people want to be the fire fighters some people want to be youtube influencers i want to be a rapper race war doesn't threaten their profits that's true that is true a little hot oh yeah i was here uh dma elements uh-oh that's a huge number of elements man i can't even fit batch size one on this little crappy chip that's 1.2 mega elements oh this is sad sad boys sad ah this gigabit ethernet on here and what do i have to use ethernet because it doesn't have usb it only has usb to a crappy ftdi chip oh this fp this this thing is looking less and less well that just means you have to go to ram more often i just have to write like cash the idea is not to use cash um all right this is this is lame oh this chip's so tiny block ram kilobits is wow that gets big so fast that's such a big all right did anyone ask questions did any of the the purchasers ask questions not you you don't get any questions oh yeah i know about go i know about the cheap gofundme but we're excited about uh yeah i already have this chip so we got to make it work on this chip oh they're asking about a 15 no don't don't scam me i'm looking at chat right now if you're one of the the gifters and i know if you're a gifter you get a question well is that the real carry moss all right so the way that you'll input neural nets into this is you'll you'll set these switches and then you'll push this button and you'll set these switches and you push this button right set switches push button set switches push button um wow it only has it only has this many flip-flops that's so tiny that's even assuming i'm using the block rams let's find a good data sheet for this chip not not whatever amazon wrote this this doesn't look like what i want what does it like tell me like what which chip and how many block grams it has power on car no i don't care about any of these things i do kind of care about what process the chip is though does it have a chip wiki by chance list of xilinx fpgas okay it's a seven series what's the arctics artix 28 nanometer oh that's gonna be so just so much power no we're gonna write that we're going to use a risk we're going to use a soft core i think i think we can fit this i mean we can't use a stock one because we've got to add instructions you know apple was going to do this for their neural network accelerator they were going to add instructions to arm now i think they've shipped a few but arm doesn't like it when you add instructions you need a very special license to be allowed to add instructions to your arm instruction set but you know it's memorial day we're here to have a good time we're here to better understand the ai chip accelerator market because real talk whoever controls the chips controls the future i think that's kind of true i mean like a lot of ai now i think is just a uh compute problem but it's not just a question of more compute it's kind of a question of faster compute hmm all right spartan here we go rx okay this is the one we got max distributed ram we also have dsp e41 slices what's a dis es41 oh cool so this is i used to i like i printed this all out when i was at google when i was 18 like the xilinx uh the xylink stuff it's just cool stuff to read you know like learn so much about how the chip works nah seems to only support stupid integer max distributed ram and there's also a question of how many ports the block grams have which is probably not enough g-max how come that says 13 megabytes oh this one is big block ram i see but actually that's still not even enough even if we got the really big chip these chips are so expensive and they're shitty oh all right fine we're looking how much is that other fpga it's like ddr3 ram what is this the you know 1990s when did ddr3 come out was it the 90s probably not probably after the 90s 2007 wow this you know what the other the card has it has ddr ddrs6 ddr6 they're like throwaway banks ddr4 and i'm here oh ddr3 you know you have a built-in spyware all right can i buy this chip this chip i can buy um oh fighting with the sec okay where's a better fpga what are the best supported open source fpgas is it really this stuff is why i got it because it comes on the artie board you all have pathetic amounts of block ram i can't even fit an efficient head b0 on here with a single uh um this one here i want to track max i'm all right so it is that one it gets smaller over time wow but that's terrible what oh that one's even bigger the final one that does the categories this is for too yeah i should start switching to uh what's the red pattaya i'm gonna google this first look at this got ddr3 ram nobody wants ddr3 ram fpga ddr6 how about that let's just google that whatever is ddr6 gotta be good oh 72 percent will be using or planning to use ai within two years wow to gain business insights in core function who writes this to gain business insight and core functions boys do we get enough business insights in our core functions someone ever said that in a meeting all right never mind only idiots would write that presentation uh no okay the first one that comes out is this thing so it's this acronix company we gotta just well see now that's a good amount of memory kind of oh god it can be used for 5g wow the software looks like look why is all the software like this from that 90s man yeah i'm using the windows gtk toolkit not gdk what's it called on windows yeah you know oh yeah look we we got dot to compile for windows oh yeah yeah that was an intern's job yeah good you got dr compile for windows we can link it dynamically with a dll file so i can really fit nothing on here like i can't even fit a batch size one efficient that well that's a weight array the weight arrays can be big but this don't worry about that if this is the big one yeah um like i mean i guess we can stream it to the ddr and do smaller things in the sram and like divide it into two pieces oh but then someone's gonna write that code yo do you want to write that code i mean look at it it's actually stupidly paralyzable like oh i'm going to like break it here i'm like cheap fpga development boards build the hardware from scratch well none of these are any good the best one is the ardex the zinc scrap like your lattice is better ddr okay does anyone have ddr4 no ddr4 a lot of them have ddr3 no ddr6 no ddr5 only ddr3 compatible with the arduino i don't want arduino i want power you know what i'm going to just buy 30 90s 30 90s are already everything you want okay are any of these ai accelerator companies are there any ai accelerator companies i can buy one from oh congratulations on your fundraising round bit may end up shipping these there's no bitmain right pathetic amount of fp32s i mean you know if you want a neural network accelerator that's shipped i actually have one in my computer right now oh oh this looks pretty nice it's called polar fire i don't see any ram on there though oh it has ddr4 polar fire can i buy a polar fire oh oh i need a librero platinum license oh that's right oh you got platinum while you buy the platinum one oh that's got more ram wait microchip microchip makes these why is it micro semi micro semi is owned by microchip they make picks and they make arcade fire fpgas polar fire all right can i can i buy one ddr3 teresek no it has a pathetic amount of embedded memory oh i'm not in india what mouser fix your more options all right fine i'm in india you happy never mind forest kitten what is this wait order now oh almost what's this thing wow look at that thing this is what they make how come i can't buy a forest kitten it says hbm2 memory all right they're doing this vertex ultra scale what does that chip cost it's going to give me about india again you know i've heard there's like things that have like where they're long used all right where can i buy a forest kitten look at forest kittens on ebay oh sweet my ebay's not mexican anymore there's a forest getting on ebay interesting this is the most interesting one i've seen wait there's a ton of these how come this one looks different though this one's got a fan on it no one didn't have a fan on it i think i just took the fan off i say zero available interesting i don't know if this is a good amount of flash or a bad amount of flash is it a hash rate i mean is this is this efficient or no oh it comes with ultra ram what's ultraram hmm those ones don't come with ultra wrap nah you should have bought ultra ram all right well this one certainly has enough block memory what is ultra ramp breakthrough embedded memory oh breakthrough oh with ultra ram i see um all right well you know what we're gonna have to do we're gonna have to you know just do it in pieces we're gonna have to dma it in pieces and that's what writing fancy code does but if we can write fancy code we can make it work in pieces we're gonna have to do it at some point to scale to mega matrix you guys know about mega matrix this is a really large matrix so like all right fine we're gonna have to write that i'm gonna have to write the chunking code anyway so fine fine this is what we get we get 255k 19-bit elements uh and then we can always buy a forest kitten yo i was watching this youtube series worst mmorpg ever it's hilarious this guy's hilarious man he has like a series because i was reading about what's the call like dream crap it was like some scam some scam mmo that all the youtubers are dunking on right now um high-tech global now i think buying used cryptocurrency mining hardware is probably a great deal like this thing looks expensive but if squirrels making it for crypto miners you know what i mean like crypto miners they know about price they like buy it now right like me and crypto miners have a lot in common like that by the way should i go to bitcoin miami should i buy a miami ticket um it's a herman miller sale chair and just because it's name sales doesn't mean it's cheap it's like a 500 chair so don't be poor uh but i realize that buying a more expensive microphone won't make me a better rapper all right we still have a problem with how we're going to get things in and out of here is this this half is this slow ethernet or faster than wow it's cheaper on here then that's pretty cheap um features system features a hundred megabit ethernet wow i guess it's faster than well 100 megabit ethernet i i didn't know about like i wrote ethereum i don't know that still existed use the usb to uart bridge probably get things in it for megabit but the idea is okay you know what we're actually going to use the usb ur bridge and we're gonna you know we load in all the stuff slowly because the idea is that we're gonna do all the training on here we have 256 megs of shitty ddr3 memory all right so our size in this thing's not going to be 32 by 32 it's gonna be eight probably we can probably make one eight by eight by eight multiplier we gotta fit a risk five core in here how do i program this also didn't come with any uh don't come with anything like a power adapter micro b cable not included do i have a micro bk oh sweet but i found micro b cable why is it as long as a balloon i have a shorter one being real picky here i think this one's too long yo guys you know what i got hearts marijuana i've been i've been i've been growing i made hots marijuana oh i can't unplug my blue yeti i do have a few usb ports on here but i don't know if they work let's see oh it powered up look at that mean obviously this can't be very powerful because i wanted to do if config i wanted ls usb there we go okay ftdi it's that we're going to design a risk 5 chip on si5 yeah isn't there like a way to like give you verilog okay a already you know what someone's already done this right whenever you can copy other people do it don't have shame man good artist copy great artist steal look at this oh i gotta buy a i gotta buy a programmer no no they can't make me buy a programmer this has to just work linux i don't have linux that looks like windows p mod port d [Music] this thing has to support programming over that do i need a j type programmer no no i need the olamax now i hate this board already you kidding it can't be that stupid you're saying yes okay no no no i have a board and i have a micro usb cable okay that's all i need according to this tutorial jp1 does not have a jumper so program it through the jtag connector okay they have a built-in program regard where's that chip looks like a spy flash [Music] screen oh don't tell me i need like a driver for this uh dj tag config you are debug console [Music] oh god i really need a driver hey i don't have a shitakey c-class i don't know what a shitakey c-class is is that like a mercedes c-class i don't have a shitake okay shaq shakti oh you're just upset i can't even look at this website let's just say that upsets me to look at um d2x helper oh it's high speed why do i not think this is gonna work i'm maybe this one works okay unplug plug back in does it work i don't think so super lame boy super lame i don't even know why i'm trying to get it to connect yet we're we're not ready for hardware yet d messages doesn't seem to include anything about it um yo if you don't stop with the shakti this is you know what you know what the shakti is the shakti is the mahindra scorpio it's this hand do you know the mahindra scorpio like we'll get chills we're like when is kamehameha gonna support the mahindra scorpio and the answer is never because i never heard of that car until the shills showed up you i don't even know if that's connected instead of a driver had similar problems with a stupid uh yo it never inspires confidence when it comes up as driver kit sample app all right whatever i hate this i hate this board it has shitty amounts of ram it's unclear if you can program it without an external thing you know what i don't blame the board i blame i blame apple oh programming fpga boards from a mac what do we have did digilent make this board it says abnet on it um cool i mean i think it's going to be like i don't even think it's showing up right now as a cereal interface but i mean actually there's some chance that this will work if it uses uh you know if they just don't use the driver what what's a cs file oh oh i have to install mono oh oh well uh oh you know what i think it's doing actually i'm not even sure that getting this thing to show up as a virtual com port would work does their schematic for this board i think it might be using the uh like the parallel mode of this chip all right so digital is who made this board never mind i might have been too quick to insult the board maybe i'm just insulting drivers i regret installing that weird driver because i don't know how to uninstall it now hmm yeah but i think is there a schematic oh sweet sweet no this isn't the right schematic where's the serial interface ftdi port is under nda what a joke so i can't see that part of the schematic i see what's going on i mean this guy figured it out it's in this code somewhere yeah so it's it's using the ftdi chip to fit bang uh that's cool though all right so the thing to probably do actually would be to write it in uh does this work i hate drivers anyway who else hates drivers we can just use python python it's like drivers but you can understand them i feel like i like wrote similar stuff once before for that other fpga board i did on stream for a little bit i feel like you know somewhere to like wrap your head around no back end available uh so homebrew correctly yeah so we have to download a risk 5 processor to this fpga and we can have my instructions uh can i bruise all this to the eye what is this crap oh sweet all right cool pie live ftdi wow wow this is nice all right let's assume that installs i don't know why it's updating like solidity and stuff well thank you for updating my ffm peg good my porn will look nicer watch this porn on f oh this is this is mad nice yo lib ftdi you live ftdi guy you're bro and you're the reason i stream you make me happy wow good thing oh given the specification it's almost like it didn't even need it looks like this works pi lib ftdi oh well i think this is actually i'm concerned about what it's downloading good bang device is your device id is like this i'm not passing anything um um [Applause] hmm oh maybe yeah this is a different problem so weird there's probably just some reason i can't open it maybe because it's already like being used and it's a wrong error uh i this is not really what i should be doing right now why is kong abandoned chat because do you want to talk about your job on a sunday morning where you're just hanging out looking at chill bro off with that thinking that like you know you got this whole mentality thinking that like i work for you and it's not true man it's not true you know i'm here to chill and have a good time other streamers might have a different mentality right like other streamers might have this mentality where it's like they like want something from their audience they want like some kind of validation like i'm just here hanging out and like you know sometimes you guys help me out and tell me about live fti and i like that that's why i stream by the way like because sometimes you guys do value no device matching up all right let's just read this right there shri the code boys spam and d message on the mount unless device not found that's so weird oh there's one on this list or something it seems like it's there does it need pseudo i'm going to try that no doesn't help the device isn't found okay this doesn't work not finding the device at all so it's listing the device but then it's not oh could it be that crappy driver i installed uninstall decks system library extensions it kind of seems like it didn't even install ah i mean there should be some way to open it using uh using we're getting distracted boys like this doesn't really have anything to do with the the fpga this is uh let's just try that message is not defined configuration not set other error let me set configuration configuration not set or their error great so as soon as we fix this other error go to the troubleshooting section no i don't think this is the problem i also got to start closing some windows my mac's getting slow we don't have ram we're short on ram boys yeah no that's not the problem whatever's giving me other error here it's the same problem uh team id bundle id that's right get waiting to uninstall and reboot junk still get other error don't make me reboot no it's not active anymore so it's not that other error this other error who wants an other error do i have to do something else before i set configuration find that configuration that should work other error once i said zero okay then we just get a configuration not set invalid configuration two so one is a valid configuration but we get other error why not even try that brew install live usb hmm dot self.backend.set configuration
oh no way no way that worked all right let's run phasm two frames don't fail me now phasm well we're missing a tile grid.json and it would help if i knew what tilegrid.json was but i don't even have anything in there called that so i'll probably build that right make it just removed a lot of stuff it's most useless make i've ever seen it just removes stuff now there's stuff there all right good the mistake was calling make they got you with that one okay that worked xd frames to bit oh my god i have a bit file no way all right oh oh they're calling the door [Music] all right i'll let them in let's see will they make it up the stairs we don't want to do that again no no no that might have been a real mistake we don't want to overwrite that no we're good we're good we're good yo it built okay add a sock.bit cp add a sock.bit tinygrad fpga program gpio demo no no no we don't want gpio demo because we called it addison let's move it to 8. prog wait is this what it's supposed to do did all that actually work yo i think that's it no way no way yo who said i need bravado that's right that's right who said i'd need bravado that was super easy boys super easy now let's just write a risk five chip the future has never seemed so possible wow oh they made it yeah all right oh they made the food to the door we got the fpga thing oh this is this is a good world boys live in a good world i'm a famous rapper wow wow that's good the dishwasher always i'm tired after i eat running post routing legalization i almost feel like we gotta document that you know don't license this thing's not crazy what no i'm gonna take sweet wow removing some language is no longer necessary cool i'll read some docs for later is this the one that i built with uh without all that yeah it is you we have to do dash l here it's an actually usable fpga tool chain see it works um we want to put everything in out uh um i'm going to file firmware.hacks
oh this is like some what it's cute it's like some cool so i should like write it in some language okay i'm able to read chip db that's fine i wish we wouldn't have to rerun that put in a scene or something um already fdc you can't find it all right after everyone knows this uh so putting the stat out don't add a sec why not oh add a sock yes like it does nothing it does different things instead hello hi we're on a stream oh i think [Music] tonight yeah are you home uh maybe later i'll stream for a bit more yeah not now i want to read all right cool um yeah maybe maybe around about times to close i'll check i'll text you i know maybe i think sevenish oh that's ridiculous is that too early for you how long would you just start no i've been streaming for a while but we made good progress i got a fpga compiler to work on mac yeah virginia let me see they closed really close at nine tonight it says oh they're closing all right we'll go like eight perfect enjoy your streaming i'll see you later bye it's my mother i really don't understand how it did something different last time that's not good yeah how does that one do something different boys that doesn't sound good would i mess up wait it literally does something different if i build it over there and it seems like like that's the correct thing don't you think that's so weird got overwritten hmm i was blinky oh is possible that i broke that unlikely but possible and like one of these things includes firmware.hex i don't know about firmware not hacks did i reverse the order by chance now how we doing on viewers look it does something differently oh hmm does chip do be wrong no all right all right let's compare some stuff okay bit file different phasm file different json it's all different how is firmware.hex getting included how does it know about that so i know if i removed it a complaint cannot open file firmware.hex for readmemh oh there it is why did that show up when i searched oh did i copy the wrong firmware.hex yeah look at that it's different i don't exactly understand why but it is i don't know which one it's using yeah there's one and add a sock and there's one in ari oh there we go now it matches cool and you get without a socket right it's actually a processor how many people got that working on mac no the problem was it was a different firmware i'm not going to show you where my chromosome um it was so cool pico rv too no way so cool bros um thank you how we doing our viewers should we keep going 888 that's a nice number that guy line all right so what's next okay so what we want to do i think it's got a risk fire cpu running and then get that cpu communicating over the ui let's enjoy it right does add a sock support the uart i assume it doesn't well what is out of sock actually that's pico sock oh who's this guy this looks familiar this might already be risk five whoa a small risk bar processor core so this these this firmware is actually risk five already remember we thought we weren't doing anything we actually got a risk five to work cool bro how long did it take this guy two minutes this guy's a genius took me all day oh he already had it all installed he's a cheater and he did it on linux that makes him a double cheater um those are risk five instructions should we disassemble it oh it's a hex file that's disgusting those leds are painfully bright that's wild this is a whole risk 5 cpu this already is so much better than bravado building anything in vivato took like 20 minutes 18 seconds um all right let's figure out where firmware.hex comes from
all right we need a risk 5 assembler um no it's educational i don't like it i don't like that it's a tap i guess kind of a ridiculous thing for me to care about i was a 64-bit risk five how many bits is this 32 bit let's disassemble it hmm why is it a hex file do i convert hex to binary why is it long by the way too if i do this does anybody care and then we can do that love that andy in this uh is the ending this right or wrong i don't know okay that still works uh i can't do that anymore banasky nasty let's say can we can we use binary like like grown-ups not hex look look at how much smaller it is look how small it is if you use binary does it work i probably don't work because the end is probably wrong oh digit one larger than used in base two context that works read man b text file containing binary values separated by white space wait no that that's offensive you're telling me it's not a raw binary file you're looking for a file full of ones and zeros this yeah yeah that's what they're looking for these these people man these people you know how do any chips get made i it almost feels like you jumped when i see people do things like that you almost just wonder if the whole chip like like design world is just full idiots all right i'm not talking about like si5 i'm talking about like like who probably did that like intel you know how hard is this gonna be we're gonna we're gonna revolutionize we're gonna disrupt them bros mikey dev thank you thank you for writing hello to mikeydev's audience today we actually got custom code compiling for our fpga using open source tool chain on mac yeah bros we did it bros we did it now what we're trying to do now so the thing that we got to compile is actually a uh i don't [Music] um just not supported in clang i want clang new lip you know i have like 7k ram right you know it feels like just hours ago we were struggling connecting it to the wrong serial port and now we're installing a risk 5 tool chain about to compile custom risk five code for my homemade soc you know no not unicorn what's capstone whoever will capstone i like them too where are the odds csrs artrisk 5. hmm no risk five this looks shitty you know why i think it looks shitty because look at that capitalization and look at that thing you know that can't be good do i have to reverse them oh i didn't mean to rm that damn it something like this uh um so keep crying we're all gonna die now can't be right i flipped did i not i think i do have to i think this online disassembler is just broken okay cool so wow this code looks complicated look what it's doing it looks complicated all right keep building great i actually need to write something that converts that the other way around too so that's the code that's actually running on the uh on the thing god who can read risk five i'm loading digital oh yeah we gotta tip the delivery guy what are we tipping the delivery guy all right what are we tipping boys twenty percent five bucks yeah you brought it to my house bro and you rang the doorbell i like that sometimes they don't sometimes they don't bring it to the doorbell oh this is a u-blox firmware trying to custom firmware for the u-blox we tipped them 20 boys it's already over all right we got kidro over here uh import file not that i was thinking about writing custom firmware for the u-blox that we use on the comma devices uh fpga ouch no not outsource from where i've been risk risk five yes just analyze it allies it don't work i don't get it this is cold there's nothing that's cold because it's ram clear code bytes disassemble od gotta give them the d all right look at that that's the code that's running right now on our outer sock [Music] all right this looks like a delay loop cool what's this looks like a variable delay loop prime one equals it's a fixed delay loop and that's a variable delay loop sleep sleep fixed sleep variable maybe all right so there's two functions and they both sleep yeah they're just pretty good they're decompiling is good all right so what is sw does anyone know risk fi does anyone know these instructions like i should know this this is the future man i don't want to get left behind knowing arm what's s w store word well yeah so they're just setting yeah that's cool bros all right do we have our compiler yet no we don't it's still building oh let me borrow one changes when i hit the switch reset yeah i'm getting compiled for subscribe this is risk five this is the code that's running on the stuff um i have r1 equals two oh the switch might be uh outside the switch might just be like a stop for the processor i can't look at those leds let me go get some tape it hurts my eyes when i look they're too bright they're building leds today they're too bright that's right i'll cut them in duct tape do i still be able to see them through duct tape like it just hurts my eyes yeah look i can still see them oh well that got unplugged but you can still see them through the duct tape really well it just shows you how eye damagingly bright they are it's only a long enough cable here look at that you can still see them leds man they're causing global warming right there oh good amount of ice cream today oh sweet fried banana and ice cream all right it's installing now where are my sunglasses no left in my car what about them i can still see the leds fine and that's not disgusting bro there's duct tape oh man so much money the banana yeah that's just like you know why it's like that because you know really why they have read memh and remember it's so like people can do it notepad like people open it up in notepad or god forbid word pad all right so i want to start my response tool chain hopefully now we can compile our own programs oh lwi not upper media world contest what is this instruction set manual not written for noobs i actually love to arm one of these um wow but that means in this thing there's a hole there's like registers and everything that's wild look at the registers is this using a b ram where's this memory come from how much ram is that uh the registers are on all general purpose we said it was 32 you're wrong it's 31 because 0 is not a general purpose register it can only be used to hold the number zero but actually um i might be wrong about that so i don't know i might be wrong i might be wrong don't wait no it is 31 registers i forgot about pc but there's also pc but it's not a general purpose register whoa whoa not using the ddr it has internal ram that's not really ram though wow it's still running like making crap on that i don't know this is a processor boys all right so how do i where are the leds here we go if i oh man valid eh why greater than i probably could store it in anything yo that's so cool though it's like a i'm in my own implementation there's only eight bets i see more than eight so my bias oh it looks like each led can be four colors horizontally why is it taking forever it just makes sense to anybody else what what is that snitch [Music] bro you've been doing so long enough you just start to know everything you know i'm not sure why i don't know everything so much i don't know yeah cause you've been working in it what do you do on the weekend bro you know does that like push against like well you shouldn't care in your interviews if people have side projects bro there's one way to get good at this stuff i mean yeah i won't be able to communicate with the core but no actually i totally can i can blink the leds and then i can use my camera to detect the leds what do y'all think of that um yeah we're gonna have to write a cereal this is like useless sleep thing is that what this is doing no this is not asleep this is doing something divide remainder maybe what does this code do where did firmware hex come from yeah okay it's definitely not that sleep mode or something i don't like how this like i guess it can't know that i'm actually using the return value i