--- Log opened Fri Feb 17 00:00:04 2017 | ||
psychotrope | I want to run linux and C code on an FPGA. I was planning on using a DE0-nano and having a serial connection for a basic shell to interact with. Would this be a good hit for openRISC? | 21:27 |
---|---|---|
ZipCPU | Sounds like it. As I recall, there's a De0-Nano build already for OpenRISC. | 22:10 |
psychotrope | I'm rather new to CPU design, how does running one of these soft cores work for an FPGA? | 22:17 |
ZipCPU | How so? | 22:17 |
psychotrope | does each design have to be specially built for each chip and board? | 22:17 |
ZipCPU | Yes and no. | 22:17 |
ZipCPU | There was at one time a minsoc for OpenRISC, designed to be the minimum implementation of any OpenRISC CPU. | 22:18 |
ZipCPU | I've heard others on this forum explain that a soft CPU core needs a minimum of the CPU and memory, and some peripheral(s). | 22:19 |
ZipCPU | From my experience, the minimum must also include some ROM for a bootloader. A serial port and a "disk" drive (SD card anyone?) is also valuable. | 22:19 |
psychotrope | I see | 22:19 |
ZipCPU | Since you are new to the group, a little background is in order ... | 22:20 |
psychotrope | is the openRISC really fast enough to run an interactive text prompt and normal GCC code? | 22:20 |
psychotrope | thanks, I | 22:20 |
psychotrope | m all ears | 22:20 |
ZipCPU | I'm only a lurker on this site. I'm not really either an OpenRISC developer, nor am I an OpenRISC user. | 22:20 |
psychotrope | *trigger happy return key* | 22:20 |
ZipCPU | Must of the OpenRISC team runs on European time. Chatting with them via IRC like this and ... you may have to wait 12-24 hours for the OpenRISC team to pipe in. | 22:21 |
ZipCPU | This is ... kind of late for them. (There is a developer or two on Japanese time ...) | 22:21 |
psychotrope | thats fine, I just want to use an FPGA for a certain type of project, and openRISC seemed like a great fit | 22:21 |
ZipCPU | My own purpose has been to build/develop my own CPU ... the ZipCPU. I can answer questions regarding that one a lot easier than OpenRISC, though. | 22:21 |
psychotrope | I see | 22:22 |
ZipCPU | I stick around because ... the OpenRISC team has been very friendly, inviting, and they've helped me out several times over. | 22:22 |
psychotrope | building your own cpu... sounds fun | 22:22 |
ZipCPU | I try to return the favor. | 22:22 |
ZipCPU | Yeah. | 22:22 |
ZipCPU | I've been fighting with GCC and newlib all this week. | 22:22 |
psychotrope | and I am correct that ever part of openRISC is open source and blob free, correct? | 22:23 |
ZipCPU | Yes. | 22:23 |
psychotrope | *noob questions* | 22:23 |
psychotrope | thanks | 22:23 |
ZipCPU | Sure, fire away. | 22:23 |
ZipCPU | I'll answer what I can. | 22:23 |
psychotrope | what does newlib do exactly (I see it mentioned alot in regards to openRISC) | 22:23 |
ZipCPU | Heheh ... newlib is one of several versions of the "C" library out there. It doesn't work with Linux, but makes a nice library for a small embedded system. | 22:24 |
psychotrope | so it does what exactly? | 22:25 |
ZipCPU | In my case, and from my own experience, it ... | 22:25 |
ZipCPU | 1. Sets up the stack pointer | 22:25 |
ZipCPU | 2. Copies the initial code from ROM (i.e. flash) to RAM | 22:25 |
ZipCPU | 3. Initializes the BSS segment to zero. | 22:25 |
ZipCPU | 4. Initializes argc and argv, and calls main() | 22:26 |
psychotrope | so it makes it easier to run code bare metal? | 22:26 |
ZipCPU | ... I've got more, but ... yes. | 22:26 |
psychotrope | thanks | 22:26 |
psychotrope | go on | 22:26 |
ZipCPU | 5. Newlib also implements the stdio library, so you can call things like printf, sscanf, fgetc, etc. | 22:26 |
ZipCPU | 6. Newlib implements the string library, ctype library, and (I think) even a math library. | 22:26 |
ZipCPU | 7. When your program finishes, and main() returns, an exit program is called. | 22:27 |
psychotrope | cool stuff | 22:27 |
ZipCPU | 8. This s/w calls all of the routines that are registered to run on exit, and then halts the CPU. | 22:27 |
ZipCPU | Yeah ... it really takes a *lot* of work to get hello world up and running. | 22:27 |
ZipCPU | As for me, I've been struggling all day trying to get printf("...%d...\n", value); working. | 22:28 |
psychotrope | I don't know how much of this you would no, but should it be *rahter* easy to compile some other random GCC code for the openRISC, and just have it work? | 22:28 |
psychotrope | I'm probably asking way to much | 22:28 |
psychotrope | under linux ofc | 22:28 |
psychotrope | *know | 22:28 |
psychotrope | wow typos *sigh* | 22:28 |
ZipCPU | Not sure I understand your question. (Yeah, I got them ... still don't get the question tho) | 22:29 |
ZipCPU | "random GCC code" "just have it work"?? | 22:29 |
psychotrope | say, I wanted to run a program like Gnu Privay Guard, or GNU Nano, on open risc. | 22:29 |
psychotrope | if I had the source (duh, its FOSS) | 22:29 |
psychotrope | would it be hard to get set up? | 22:30 |
ZipCPU | Wow ... good question. Well ... would you be running it on a Linux platform, or more of a bare-metal platform? | 22:30 |
psychotrope | linux platform | 22:30 |
psychotrope | whatever I can get with a linux kernel and a shell | 22:31 |
psychotrope | what runs on 32mb SDRAM | 22:31 |
ZipCPU | It *should* work ... linux things are *supposed* to work if just compiled from the source. "should" "supposed to" | 22:31 |
ZipCPU | ;) | 22:31 |
psychotrope | yeah... | 22:31 |
psychotrope | its worth a shot, (better than trying to run C code bare metal on a Parallax Propellor at 60mhz with 32k of ram) | 22:32 |
ZipCPU | Just like newlib should be working for me now that the compiler no longer crashes ... ;) | 22:32 |
psychotrope | which was the original plan | 22:32 |
ZipCPU | 32k of RAM, or 32MB of RAM? | 22:32 |
psychotrope | 32k | 22:32 |
psychotrope | yeah | 22:32 |
psychotrope | it wasn | 22:33 |
psychotrope | 't going to happen | 22:33 |
ZipCPU | Well ... you can leave some portions of your code in ROM ... that'll tend to expand your RAM a touch. | 22:33 |
psychotrope | see, a friend and I want to run some crypto tasks on an FPGA just for fun, so we were looking at open source microcontrollers and we were originally going to try to get the parallax propellor to run libgcrypt RSA and a bunch of other massive stuff | 22:34 |
ZipCPU | But ... but ... <sputter> <sputter> but ... | 22:35 |
ZipCPU | Why would you do that on an FPGA and not a general purpose microcontroller such as an RPi? | 22:35 |
psychotrope | he knows more about the propellor than I do, but because of the weird architecture, I got a resounding *no* | 22:35 |
psychotrope | because reasons | 22:35 |
psychotrope | tinfoil hats | 22:36 |
psychotrope | and running that on an RPi would be broing and torture free | 22:36 |
psychotrope | I' | 22:36 |
psychotrope | m after a blob free system thats open down to the logic | 22:36 |
psychotrope | so I went from X86 to PowerPC, to ARM, to ARM with all the blobs removed, to ultimate paranoia wanting to use an FPGA | 22:37 |
ZipCPU | Well ... if that's what you are interested in, you'll have to leave the Xilinx chips and head for the iCE40 chips. | 22:37 |
psychotrope | its just a side project | 22:37 |
ZipCPU | Vivado and the Xilinx tools all use a bunch of blobs. | 22:37 |
psychotrope | I know the bitsream generator is closed source, I'm willing to trust that (grudgingly), but I want to see my logic | 22:38 |
psychotrope | *assume no backdoors in Vivado* | 22:38 |
psychotrope | or Quartus II or w/e | 22:38 |
ZipCPU | That's why I was recommending iCE40 ... there are now open source bit stream generators for that line of chips. | 22:39 |
psychotrope | I'm afraid its too slow to run linux | 22:39 |
psychotrope | I'd love to use it otherwise | 22:39 |
psychotrope | I have a limited student budget | 22:40 |
psychotrope | for these sorts of things | 22:40 |
psychotrope | otherwise I'd ty a bunch of alternatives | 22:40 |
ZipCPU | Heheh ... well, you have the hardware you have. You'll have to make it work. I can understand that. | 22:40 |
psychotrope | I just really like the idea of being able to see and change the logic design of the hardware I run crypto on | 22:41 |
ZipCPU | Here was my point earlier though ... if you want a system that runs Linux, and runs it well and fast, you really don't want an FPGA. | 22:41 |
psychotrope | much nicer than trusting something with intel management engine installed *grrrrrr* | 22:41 |
ZipCPU | But ... I can understand wanting an open system too. | 22:41 |
psychotrope | its just for run | 22:41 |
psychotrope | completely impractical | 22:41 |
ZipCPU | Sure. Well ... then, I guess you are in the right place. | 22:42 |
psychotrope | friend is building a GPU type thing using the parallax propellor thats also running in the FPGA, so I want to see how far I can make an FPGA computer go | 22:42 |
ZipCPU | You should be able to find web instructions for getting Linux running on an OpenRISC device. | 22:43 |
psychotrope | yeah, I've been looking around | 22:43 |
psychotrope | its only been a few days since we abandoned the idea of the propellor doing all the work, so I've been doing a lot of googling | 22:43 |
psychotrope | do you by chance know of any bigger / faster boards to run openRISC on/ | 22:47 |
psychotrope | I couldn't find any with a quick google | 22:47 |
ZipCPU | Hmm ... | 22:48 |
ZipCPU | Have you looked into fusesoc/orpsoc cores yet? | 22:48 |
psychotrope | nope, never heard of em | 22:48 |
ZipCPU | FuseSoC is the name of the package manager the OpenRISC team has been working with. | 22:48 |
ZipCPU | It's used to assemble a working core for an FPGA from a bunch of diverse components. | 22:48 |
psychotrope | sounds awesome | 22:49 |
psychotrope | multicore? | 22:49 |
ZipCPU | There are also a set of systems out there, if I recall correctly the name of the set is orpsoc-cores, that contains a set of system builds for a variety of different boards. | 22:49 |
psychotrope | I'll check it out, thanks! | 22:49 |
ZipCPU | Here's the link: https://github.com/openrisc/orpsoc-cores/tree/master/systems | 22:50 |
ZipCPU | That'll at least show you a list of systems that have OpenRISC running on them. | 22:50 |
psychotrope | thanks | 22:51 |
psychotrope | this is *super* helpful | 22:51 |
psychotrope | because i actually have access to a DE2-115 with 115kle's | 22:51 |
psychotrope | DE0-nano has only 22 | 22:51 |
psychotrope | so yeah | 22:51 |
ZipCPU | And to think ... I'm not even an OpenRISC user ... ;) | 22:51 |
psychotrope | hah | 22:52 |
psychotrope | you've been 100x more helpful than google | 22:52 |
ZipCPU | Thanks. | 22:53 |
psychotrope | wow, my mouse is giving out on me for no reason here | 22:55 |
psychotrope | ugh, DE2-115 requires a university ID if you want the cheap price | 23:03 |
psychotrope | what board would you reccomend out of that list? | 23:04 |
psychotrope | assuming you have board for some FPGA work for your CPU or somehting | 23:05 |
ZipCPU | Well ... to be honest (yes, I know, it's *always* good to be honest ...) ... I don't have any of the boards on that list. | 23:06 |
ZipCPU | I'm more of a Xilinx type myself. | 23:06 |
psychotrope | I see | 23:06 |
psychotrope | what do you have? | 23:06 |
psychotrope | jsut curious | 23:06 |
ZipCPU | I have a CMod-S6, a XuLA2-LX25, a Basys3, and an Arty. All of them run the ZipCPU ... to varying degrees. | 23:07 |
ZipCPU | (The CMod-S6 was all about bragging rights ...) | 23:07 |
psychotrope | thats tiny lol | 23:07 |
ZipCPU | And to think I managed to get a multitasking "O/S" running on it! | 23:07 |
ZipCPU | (If you want to call it an "O/S" ...) | 23:08 |
psychotrope | sounds very cool | 23:08 |
psychotrope | I own a Mojo V3 from years ago when I wanted to get into FPGAs cause they sounded cool | 23:08 |
psychotrope | and I have a Cyclone IV with 115KLEs in my BladeRF Software Defined Radio | 23:09 |
psychotrope | if thats even worth counting | 23:09 |
psychotrope | I've actually thought of just repurposing my bladrf for this project | 23:10 |
psychotrope | but there are too may delicate devices on the IOs | 23:10 |
psychotrope | too expensive to try to retrofit and end up bricking | 23:11 |
--- Log closed Sat Feb 18 00:00:05 2017 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!