Modular FPGA-Only computer - Page 1
Forum section: electronics / projects

author: mr_darker
author_rank: Contributor
timestamp: August 31, 2019, 02:11:42 am
content: Its been a project idea for a while, and im new to fpga, only got a Lattice Machxo3 and a lattice ice40ul breakout board and have only written a partially successful blink light program (switched lights on and off via switches, but couldnt hook up to the internal oscillator).That said, I have many projects in mind and a lotof them are reliant on a lot of AI otiented software. That paired with just wanting to do something new, and an uninformed but strong opinion that fpga are far auperior to processors, brings this idea.Iwant to create acomputer made of FPGAs only, user friendly general purpose os. It will likely have hard processor cores added but i want it to not need them to operate.The idea would be that instead of allocating time on a processor, the OS allocates circuitry/hardware. Yes this would requre programs to have an fpga version of their own, which is where the hard processor comes in for compatibility with programs not made for foga architecture. Im sure when out of hardware resources youd be forced to add more hardware, close other programs, or do something like share time on the hardware (or resort to aprocessor). Anyways if it can be done itllbe done byporting linux over to the fpga only computer.For hardware, i dont have enough money to build a guaranteed adequate system, and dont wanna go too small,so,im designig it modular where there are little standardized units of hardware 1cm cubes with connections on all sides, a flexpcb of inexpensive fpgas folded and stacked upon eachother until its tall enough towrapthe rest of the pcb around the cube and enclose it all (brothers a mechanical engineer and hoping he can help optimize thermal performance). Assumig that works, thats abou $100 orso increments of hardware where you upgrade your rig/power $100 at a time. Thiswpuld be much better in about 10 years when moores law ends and your hardware doesnt get outdated/bulky. Youd not have to write a program then select an fpga sized for t anymore, just write a program and expand the hardware if needed. or download the software if using the os not developing it. Itd be an array of fpgas and memory chips, digitally interconnected and managed in some giant virtual memory and virtual hardware space. Some sorta fpga routing tech would have tobe developed to dynamically place circuits and manage them in an automated fashion like processes on a computer.Currently, i'm deciding on Lattice's MachXO3L fpgas because they have zero on nonvolatile configuration where you lose poer and plug it back in then bam its right where you left it (seems like itd make things far less complicated initially, also jst knda a neat feature). Also it has background programmability with "hitless reconfiguration" which basically means its ideal for runtime reconfiguration. Staying away from the LF models that use flash memory (itd wear out pretty wuick) thats what im thinking. But the ECP5 model fpgas that dont have those featurs, offers about 100x more bang for your buck, so might do mostly ecp5 chips with one configuration XO3 in each "unit" of fpga-computer. and/or might keep it simple and stick with machxo3 til further notice.furthermore i want it as asyncronous as possible, like thats not very supported is what i hear but thats no reason not to. Ideally if be using Achronix Speedster 22i FPGAs both for speed, and their design being meant for asyncronous operation. I'm sure it would be a ton of work to get something like this done, years probably, and youd have to make a lot of software tools yourself. BUT the result would be a processorless computer. I think itd be pretry popular with hackers lol, like the closes thing ivefound to what i envision for hardware, is a password cracking machine.thought/tips? Abandon all hope to live all ye who enter this project?

author: mr_darker
author_rank: Contributor
timestamp: August 31, 2019, 02:21:43 am
content: Also where do people find tech-oriented friends lol.Most people i know need help plugging an hfmi cable into the tv. Best friend failed math foundations twice and recently started studying cocaine. Only other smart person I know is my brother but hes a mechanical engineer. Literally dont know where you find people who have interests in techie stuff and computer science rather than drama n meth. never went to college btw. Theres no electronics section at the bar, feel heavily judged if i play an arcade game like galiga there lol Makerspaces maybe, cant justify $600 a year to go use hot glue guns n a cnc router (not a mill), and i feel like id meet "makers" not hobbyists/engineers.let that be a side question lol. ifu know or make friends and their gallons of chemicals in their basement are for pcb fabrication or experiemnts, rather than cookin meh or something, whered you meet them if it wasnt school or a career (self taught with a verbal communication impairment, aka never gonna be hited in a tech job).

author: D Straney
author_rank: Frequent Contributor
timestamp: August 31, 2019, 04:39:48 pm
content: Interesting idea! I had some similar thoughts at one point a while in the past, wondering how an general-purpose all-reconfigurable-logic computer would end up working. In the end, after getting to know FPGAs much better (I was pretty inexperienced at electronics in general at the time, this was years and years ago) the conclusion I came to was that traditional processors were just inherently much better suited for the UI/program logic side of things, for reasons including: 1. those kinds of problems are easier to think about in a sequential-instruction way (ease of development is important!) and 2. time-sharing is much better suited to processors; freezing a ton of FPGA logic, saving that state (including the state of each individual output), and swapping it out for a different set of logic is a much harder problem, even if you have a custom FPGA built for fast reconfiguration...the expansion is more limited. I think the ideal combo for general-purpose computers is something kind of like the modern CPU+graphics card setup, where you have the processor handle all the high-level control, with some configurable massively-parallel logic (the graphics card, in that case) for accelerating all the complex calculations that can be parallelized.That's not meant at all to try and discourage you though - an array of FPGAs sounds perfect for doing AI stuff / neural networks / etc. Just be aware that doing a general-purpose OS underneath that (wouldn't count on porting Linux, it's such a completely different context that something purpose-built would be almost guaranteed easier) is probably taking the hard route: but hey, if really want to then go for it, it's an interesting project and worst case is that you get better digital logic skills.The thing which will limit expansion eventually, with all the cubes, is the interconnects (a 10x10 cube would have a much easier time getting data from one side to the other, than a 100x100 cube) but I'm sure you can get a lot out of it, especially if you're choosing the sorts of problems where each FPGA interacts most often with its nearest neighbors. (The hardest part of creating those 100-processors-on-a-chip sorts of products that come up occasionally is really connecting all the cores together...but if you're not looking for "everything talks equally to everything else" sorts of algorithms then it gets much easier)Sorry about the social situation, that sounds awful. Closest I can think of to a bar with an electronics section is the student ones near MIT here.Are there any hobby stores near you? The people working those sorts of places can be into interesting stuff, and hanging around there you might end up meeting people who do model rockets, or RC aircraft, or maybe electronics too. Same goes for any surplus hardware stores, or even a junkyard maybe (although much lower hit rate). Also I don't know the makerspace/hackerspace options near you but the type of people you'd meet there can really depend on the individual place - a lot of them have regular "visitor nights" or things like that where non-members can go look around and talk to people, see/bring projects, etc. Could be worth at least checking out the options to get a feel for them, and if the people there aren't a good fit then nothing lost but a bit of time.

author: legacy
author_rank: Super Contributor
timestamp: August 31, 2019, 04:47:39 pm
content: Quote from: mr_darker on August 31, 2019, 02:11:42 amThe FPGA's bitstreem needs a synthetizer, which needs a Commercial tool. So, who will synthetize? Or are you going to use pre-built biitstreams?Not clear.

author: SiliconWizard
author_rank: Super Contributor
timestamp: August 31, 2019, 05:45:44 pm
content: Indeed...The whole concept looks a bit like those "reconfigurable" processors that I heard about a long time ago...Not necessarily a bad idea, but it can get very complex to use, and then there's the problem of synthesizing the logic blocks as needed... of course the bitstreams could be pre-synthesized at "compile" time (whatever the language you're going to use for that...) and then loaded on the fly at execution time... eek.

author: Kilrah
author_rank: Unknown
timestamp: August 31, 2019, 07:23:15 pm
content: The idea itself is nice, having an array of FPGAs that programs can use to throw hardware accelerators into for various computations sure can be interesting especially since currently the potential of FPGAs seems a bit underused (nearly all of them are used as a "custom ASIC without being one" aka one design is made, loaded and that's it, while they have the potential to be dynamically reconfigured and could be used for totally different things every second on the fly), but it's indeed not very practical with the current state of tools.If you went for a large FPGA which allows for partial reconfiguration you'd have to place and route a design everytime it needs to be instanciated depending on what's already running on the FPGA at that moment, so highly complex and slow, it'd likely take many minutes of processing to place a design before being able to load and run it.If you went with many small FPGAs that would allow the software dev to distribute precompiled bitstreams, the OS just needs to look for a free FPGA and load it on which can be done in less than a second. Obvious limitation is that many FPGAs will mean they'll be small to keep cost under control, so the potential for designs that can be made for them is limited.I have some doubts it would have many practical uses. Nowadays a common PC system already offers a bunch of several fast sequential processors (CPU cores), a fast parallel processor (GPU), and between both of them they already include hardware blocks for all the common functions you'd want (crypto, video encoding/decoding/conversion, some have AI-specific accelerators and it seems it's going to be pretty much generalized in a year or 2) so I'm not sure what is left for a relatively low-cost FPGA to be able to significantly accelerate beyond what those are already capable of.

author: daqq
author_rank: Super Contributor
timestamp: August 31, 2019, 08:12:48 pm
content: Kilrah, you should take a look at the partial reconfiguration stuff that xilinx is doing. You switch between precompiled blocks for a particular position. This is a very flexible approach.

author: Kilrah
author_rank: Unknown
timestamp: August 31, 2019, 08:21:07 pm
content: Nice, hadn't looked at it in a long time. You'd have to make it a bit less flexible though, as in predefining blocks of given sizes and with known resources that devs could target.

author: daqq
author_rank: Super Contributor
timestamp: August 31, 2019, 08:32:24 pm
content: That's how it works as I understand it. See:https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_1/ug909-vivado-partial-reconfiguration.pdfYou define a region and then compile modules that 'fit' into the region.

author: ogden
author_rank: Super Contributor
timestamp: August 31, 2019, 09:16:50 pm
content: Quote from: mr_darker on August 31, 2019, 02:11:42 amYou did not even properly finish your LED blinker yet are planning to run AI oriented software on distributed FPGA matrix. Well... You are planning way too big steps and your whole dream is based on false presumption... FPGA is not superior to processors, otherwise processors would be extinct and we would be all using FPGA-based computers. Instead of dreaming impossible dreams you shall be checking something likehttps://www.google.com/search?q=raspberry+pi+cluster

author: nctnico
author_rank: Super Contributor
timestamp: August 31, 2019, 10:41:01 pm
content: If you just want raw computing power then nothing beats a GPU when it comes to power consumption and cost. Look into CUDA.

author: james_s
author_rank: Super Contributor
timestamp: August 31, 2019, 11:59:35 pm
content: Quote from: mr_darker on August 31, 2019, 02:21:43 amI've met most of mine at work, and a few on online forums like this. If you can succeed at a project like this, surely you can find a job in tech if you don't already have one, at the right company you will meet lots of like minded people. If you are in a tech-heavy region you might look for hiring events if only to get to know people. I've been to a couple of those and it's a bit like looking for a date in a pub except instead of chatting up cute girls I was approaching nerdy looking guys who looked like they might be interesting to talk to.

author: NiHaoMike
author_rank: Super Contributor
timestamp: September 01, 2019, 03:52:20 am
content: Quote from: nctnico on August 31, 2019, 10:41:01 pmThat's if the task is well suited to run on GPU. Some crypto algorithms, most notably those used in some cryptocurrencies, are specifically designed to not run well on GPU and a FPGA or even a cluster of cheap smartphones get better performance per watt and/or better performance per dollar. ASICs do the best, but the development costs mean they only get made if there's a big financial incentive to do so.Quote from: james_s on August 31, 2019, 11:59:35 pmIf only there were more girls in tech so that it would be easier to find one willing to "join forces" and help with taking on more advanced projects that are a bit complex for one individual.

author: Kilrah
author_rank: Unknown
timestamp: September 01, 2019, 07:34:40 am
content: Quote from: daqq on August 31, 2019, 08:32:24 pmYes, but usually you do that in your own design and define the regions for the couple of little things you intend to change - here you need to figure out a good way to define multiple regions of various sizes that cover the vast majority of the fabric in a way that you hope will be useful to people. Something like 2 quarters, 2 8ths, 2 16ths etc, and provide interconnects so that people with a large design can split it to fit in multiple of your predefined blocks and still connect them together...

author: laugensalm
author_rank: Regular Contributor
timestamp: September 02, 2019, 11:03:32 am
content: Quote from: mr_darker on August 31, 2019, 02:11:42 amWell, there are many who are on the same page as you. Some use C++ classes to define and build the hardware, some use classic XML descriptions, some use Python or pure HDL. Why don't you check this thread:https://www.eevblog.com/forum/fpga/2019-the-best-way-to-learn-cpu-on-fpga/Linux might be a little too heavy weight though. Why would you want to do that? FPGAs perform well at real time and very flat hardware abstractions. That's not really what Linux performs well at. You'll also run into many, many issues with DDRx RAM, Caching, and the whole lot. You might want to keep it simple and stupid.