IRC logs for #openrisc Friday, 2017-02-17

--- Log opened Fri Feb 17 00:00:04 2017
psychotropeI 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
ZipCPUSounds like it.  As I recall, there's a De0-Nano build already for OpenRISC.22:10
psychotropeI'm rather new to CPU design, how does running one of these soft cores work for an FPGA?22:17
ZipCPUHow so?22:17
psychotropedoes each design have to be specially built for each chip and board?22:17
ZipCPUYes and no.22:17
ZipCPUThere was at one time a minsoc for OpenRISC, designed to be the minimum implementation of any OpenRISC CPU.22:18
ZipCPUI'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
ZipCPUFrom 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
psychotropeI see22:19
ZipCPUSince you are new to the group, a little background is in order ...22:20
psychotropeis the openRISC really fast enough to run an interactive text prompt and normal GCC code?22:20
psychotropethanks, I22:20
psychotropem all ears22:20
ZipCPUI'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
ZipCPUMust 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
ZipCPUThis is ... kind of late for them.  (There is a developer or two on Japanese time ...)22:21
psychotropethats fine, I just want to use an FPGA for a certain type of project, and openRISC seemed like a great fit22:21
ZipCPUMy 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
psychotropeI see22:22
ZipCPUI stick around because ... the OpenRISC team has been very friendly, inviting, and they've helped me out several times over.22:22
psychotropebuilding your own cpu... sounds fun22:22
ZipCPUI try to return the favor.22:22
ZipCPUYeah.22:22
ZipCPUI've been fighting with GCC and newlib all this week.22:22
psychotropeand I am correct that ever part of openRISC is open source and blob free, correct?22:23
ZipCPUYes.22:23
psychotrope*noob questions*22:23
psychotropethanks22:23
ZipCPUSure, fire away.22:23
ZipCPUI'll answer what I can.22:23
psychotropewhat does newlib do exactly (I see it mentioned alot in regards to openRISC)22:23
ZipCPUHeheh ... 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
psychotropeso it does what exactly?22:25
ZipCPUIn my case, and from my own experience, it ...22:25
ZipCPU1. Sets up the stack pointer22:25
ZipCPU2. Copies the initial code from ROM (i.e. flash) to RAM22:25
ZipCPU3. Initializes the BSS segment to zero.22:25
ZipCPU4. Initializes argc and argv, and calls main()22:26
psychotropeso it makes it easier to run code bare metal?22:26
ZipCPU... I've got more, but ... yes.22:26
psychotropethanks22:26
psychotropego on22:26
ZipCPU5. Newlib also implements the stdio library, so you can call things like printf, sscanf, fgetc, etc.22:26
ZipCPU6. Newlib implements the string library, ctype library, and (I think) even a math library.22:26
ZipCPU7. When your program finishes, and main() returns, an exit program is called.22:27
psychotropecool stuff22:27
ZipCPU8. This s/w calls all of the routines that are registered to run on exit, and then halts the CPU.22:27
ZipCPUYeah ... it really takes a *lot* of work to get hello world up and running.22:27
ZipCPUAs for me, I've been struggling all day trying to get printf("...%d...\n", value); working.22:28
psychotropeI 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
psychotropeI'm probably asking way to much22:28
psychotropeunder linux ofc22:28
psychotrope*know22:28
psychotropewow typos *sigh*22:28
ZipCPUNot 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
psychotropesay, I wanted to run a program like Gnu Privay Guard, or GNU Nano, on open risc.22:29
psychotropeif I had the source (duh, its FOSS)22:29
psychotropewould it be hard to get set up?22:30
ZipCPUWow ... good question.  Well ... would you be running it on a Linux platform, or more of a bare-metal platform?22:30
psychotropelinux platform22:30
psychotropewhatever I can get with a linux kernel and a shell22:31
psychotropewhat runs on 32mb SDRAM22:31
ZipCPUIt *should* work ... linux things are *supposed* to work if just compiled from the source.  "should" "supposed to"22:31
ZipCPU;)22:31
psychotropeyeah...22:31
psychotropeits worth a shot, (better than trying to run C code bare metal on a Parallax Propellor at 60mhz with 32k of ram)22:32
ZipCPUJust like newlib should be working for me now that the compiler no longer crashes ... ;)22:32
psychotropewhich was the original plan22:32
ZipCPU32k of RAM, or 32MB of RAM?22:32
psychotrope32k22:32
psychotropeyeah22:32
psychotropeit wasn22:33
psychotrope't going to happen22:33
ZipCPUWell ... you can leave some portions of your code in ROM ... that'll tend to expand your RAM a touch.22:33
psychotropesee, 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 stuff22:34
ZipCPUBut ... but ... <sputter> <sputter> but ...22:35
ZipCPUWhy would you do that on an FPGA and not a general purpose microcontroller such as an RPi?22:35
psychotropehe knows more about the propellor than I do, but because of the weird architecture, I got a resounding *no*22:35
psychotropebecause reasons22:35
psychotropetinfoil hats22:36
psychotropeand running that on an RPi would be broing and torture free22:36
psychotropeI'22:36
psychotropem after a blob free system thats open down to the logic22:36
psychotropeso I went from X86 to PowerPC, to ARM, to ARM with all the blobs removed, to ultimate paranoia wanting to use an FPGA22:37
ZipCPUWell ... if that's what you are interested in, you'll have to leave the Xilinx chips and head for the iCE40 chips.22:37
psychotropeits just a side project22:37
ZipCPUVivado and the Xilinx tools all use a bunch of blobs.22:37
psychotropeI know the bitsream generator is closed source, I'm willing to trust that (grudgingly), but I want to see my logic22:38
psychotrope*assume no backdoors in Vivado*22:38
psychotropeor Quartus II or w/e22:38
ZipCPUThat's why I was recommending iCE40 ... there are now open source bit stream generators for that line of chips.22:39
psychotropeI'm afraid its too slow to run linux22:39
psychotropeI'd love to use it otherwise22:39
psychotropeI have a limited student budget22:40
psychotropefor these sorts of things22:40
psychotropeotherwise I'd ty a bunch of alternatives22:40
ZipCPUHeheh ... well, you have the hardware you have.  You'll have to make it work.  I can understand that.22:40
psychotropeI just really like the idea of being able to see and change the logic design of the hardware I run crypto on22:41
ZipCPUHere 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
psychotropemuch nicer than trusting something with intel management engine installed *grrrrrr*22:41
ZipCPUBut ... I can understand wanting an open system too.22:41
psychotropeits just for run22:41
psychotropecompletely impractical22:41
ZipCPUSure.  Well ... then, I guess you are in the right place.22:42
psychotropefriend 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 go22:42
ZipCPUYou should be able to find web instructions for getting Linux running on an OpenRISC device.22:43
psychotropeyeah, I've been looking around22:43
psychotropeits 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 googling22:43
psychotropedo you by chance know of any bigger / faster boards to run openRISC on/22:47
psychotropeI couldn't find any with a quick google22:47
ZipCPUHmm ...22:48
ZipCPUHave you looked into fusesoc/orpsoc cores yet?22:48
psychotropenope, never heard of em22:48
ZipCPUFuseSoC is the name of the package manager the OpenRISC team has been working with.22:48
ZipCPUIt's used to assemble a working core for an FPGA from a bunch of diverse components.22:48
psychotropesounds awesome22:49
psychotropemulticore?22:49
ZipCPUThere 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
psychotropeI'll check it out, thanks!22:49
ZipCPUHere's the link: https://github.com/openrisc/orpsoc-cores/tree/master/systems22:50
ZipCPUThat'll at least show you a list of systems that have OpenRISC running on them.22:50
psychotropethanks22:51
psychotropethis is *super* helpful22:51
psychotropebecause i actually have access to a DE2-115 with 115kle's22:51
psychotropeDE0-nano has only 2222:51
psychotropeso yeah22:51
ZipCPUAnd to think ... I'm not even an OpenRISC user ... ;)22:51
psychotropehah22:52
psychotropeyou've been 100x more helpful than google22:52
ZipCPUThanks.22:53
psychotropewow, my mouse is giving out on me for no reason here22:55
psychotropeugh, DE2-115 requires a university ID if you want the cheap price23:03
psychotropewhat board would you reccomend out of that list?23:04
psychotropeassuming you have board for some FPGA work for your CPU or somehting23:05
ZipCPUWell ... 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
ZipCPUI'm more of a Xilinx type myself.23:06
psychotropeI see23:06
psychotropewhat do you have?23:06
psychotropejsut curious23:06
ZipCPUI 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
psychotropethats tiny lol23:07
ZipCPUAnd 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
psychotropesounds very cool23:08
psychotropeI own a Mojo V3 from years ago when I wanted to get into FPGAs cause they sounded cool23:08
psychotropeand I have a Cyclone IV with 115KLEs in my BladeRF Software Defined Radio23:09
psychotropeif thats even worth counting23:09
psychotropeI've actually thought of just repurposing my bladrf for this project23:10
psychotropebut there are too may delicate devices on the IOs23:10
psychotropetoo expensive to try to retrofit and end up bricking23: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!