Hi everyone, I'm considering making a compiler for Atmels FPSLIC (combined microcontroller with FPGA). The idea is to mark expensive funktions, so they can be implemented in the FPGA instead of normal machine code. I have experience with microcontrollers and construction of compilers, but I have only made very small test-projects with a very old FPGA and really buggy software. Is this possible to make such a compiler? Does it make sense at all to compile high-level language to a FPGA in this way? Has someone else made it/is this normal procedure today ? Regards, Niels Sandmann
Compiler to FPSLIC
Started by ●April 8, 2006
Reply by ●April 8, 20062006-04-08
Niels Sandmann wrote:> I'm considering making a compiler for Atmels FPSLIC (combined > microcontroller with FPGA). The idea is to mark expensive funktions, so > they can be implemented in the FPGA instead of normal machine code.Remember, that transferring operators to special purpose computing blocks takes some time. The gain of speed with the function block must be big enough to make it worth.> I > have experience with microcontrollers and construction of compilers, but > I have only made very small test-projects with a very old FPGA and > really buggy software. > > Is this possible to make such a compiler? > Does it make sense at all to compile high-level language to a FPGA in > this way?It is possible - if also usable, I don't know. There is some research about Field Programmable Function Arrays. There compiler are used to analyze C code and map this to configurable function blocks in the FPFA. Why FPFAs and not normal FPGAs? Its easier to map a software algorithm to a known block of hardware, where only "little" configuration is possible (add or sub or none, multiply or not, intermediate register storage or not...). Mapping a software algorithm to FPGAs is possible with languages like SystemC. I am not an expert in this area. I just want to give you some words, where your search may start. Ralf
Reply by ●April 8, 20062006-04-08
I'm curious: why have you chosen Atmel's FPSLIC? - a Niels Sandmann <usenet.s@ndmann.dk> writes:> Hi everyone, > > I'm considering making a compiler for Atmels FPSLIC (combined > microcontroller with FPGA). The idea is to mark expensive funktions, so > they can be implemented in the FPGA instead of normal machine code. I > have experience with microcontrollers and construction of compilers, > but I have only made very small test-projects with a very old FPGA and > really buggy software. > > Is this possible to make such a compiler? > Does it make sense at all to compile high-level language to a FPGA in > this way? > Has someone else made it/is this normal procedure today ? > > Regards, > Niels Sandmann-- PGP/GPG: 5C9F F366 C9CF 2145 E770 B1B8 EFB1 462D A146 C380
Reply by ●April 8, 20062006-04-08
Niels Sandmann wrote:> Is this possible to make such a compiler?There's one for nios: http://www.altera.com/literature/wp/C2H_Compiler_FAQ.pdf -- Mike Treseler
Reply by ●April 8, 20062006-04-08
Niels Sandmann wrote:> Hi everyone, > > I'm considering making a compiler for Atmels FPSLIC (combined > microcontroller with FPGA). The idea is to mark expensive funktions, so > they can be implemented in the FPGA instead of normal machine code. I > have experience with microcontrollers and construction of compilers, but > I have only made very small test-projects with a very old FPGA and > really buggy software. > > Is this possible to make such a compiler? > Does it make sense at all to compile high-level language to a FPGA in > this way? > Has someone else made it/is this normal procedure today ? > > Regards, > Niels SandmannBoy, that would be interesting. There may be part of a doctorate in there if you work it right. I think this is possible. I think the shortest road to success in the confines of one file would be to make a preprocessor that would extract the FPGA stuff to a C language design file which would then go to one of those nifty new C language synthesis tools. I suspect, though, that this would cause problems with concurrency. Either you would have concurrency problems in the function call, or in making the processor wait on the FPGA and visa versa. If you _really_ wanted to do this in one language you could investigate the possibility of reviving Occam*. All in all, however, I think the best thing to do is find a good way that you can treat what the FPGA does as a concurrent process within C or C++. This would mean finding a way, within C, of 'telling' the compiler to write something to the FPGA and kick off a computation, then 'telling' the compiler to retrieve it, but leaving it to the software and FPGA designers to actually synchronize the FPGA with the processor. * Search for 'transputer'. The best quote I heard about Occam was "Oakum (Occam) is something you use to keep boats from leaking -- not a computer language". -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/
Reply by ●April 8, 20062006-04-08
Niels Sandmann wrote:> Hi everyone, > > I'm considering making a compiler for Atmels FPSLIC (combined > microcontroller with FPGA). The idea is to mark expensive funktions, so > they can be implemented in the FPGA instead of normal machine code.Sometimes an 'expensive' item might be an operator. ie Maths libraries, and their support is one productive area that does not need armloads of new software. > I have experience with microcontrollers and construction of compilers, but> I have only made very small test-projects with a very old FPGA and > really buggy software. > > Is this possible to make such a compiler?almost anything is possible ...> Does it make sense at all to compile high-level language to a FPGA in > this way?depends a lot on the FPGA, and the project, ( and the designer..) [ It is also a dangerous tool in the wrong hands....]> Has someone else made it/is this normal procedure today ?Someone has mentioned Altera's new C flow ( not cheap ) For good examples of FPGA centric work on other languages, look at http://www.jopdesign.com/ http://myhdl.jandecaluwe.com/doku.php/cookbook:intro and for an example of a smaller FPGA-Core, and what can be done in core-extension, look at this carefully before commiting to the FpSLIC ( which is rather a dead-end pathway ). http://bleyer.org/pacoblaze/ A google on Python AVR ( if you MUST use the FpSLIC ) finds quite a lot, including http://savannah.nongnu.org/patch/?func=detailitem&item_id=3763 http://www.ecs.soton.ac.uk/~jb1403/projects/avrpy/ -jg
Reply by ●April 9, 20062006-04-09
Adam Megacz wrote:> I'm curious: why have you chosen Atmel's FPSLIC?Because I thought the integration af af Microncontroller and FPGA would be handy, and ease communication between the program and the FPGA. I have prior experience with microcontrollers with Atmels AVR-core, and I have been pleased with them. Also, they are reasonable cheap. Regards, Niels Sandmann
Reply by ●April 9, 20062006-04-09
Ralf Hildebrandt wrote:> Remember, that transferring operators to special purpose computing > blocks takes some time. The gain of speed with the function block must > be big enough to make it worth.Of course. It would be necessary with a good profiler.> Mapping a software algorithm to FPGAs is possible with languages like > SystemC.That sounds interesting. At first sight it seems to target simulation of system more than actual implementation, but I might be wrong.> I am not an expert in this area. I just want to give you some words, > where your search may start.I'm glad for any input and ideas I can get. Regards Niels Sandmann
Reply by ●April 9, 20062006-04-09
Jim Granville wrote:> depends a lot on the FPGA, and the project, ( and the designer..) > [ It is also a dangerous tool in the wrong hands....]why ?> Someone has mentioned Altera's new C flow ( not cheap )> > > For good examples of FPGA centric work on other languages, look at > > http://www.jopdesign.com/ > > http://myhdl.jandecaluwe.com/doku.php/cookbook:intro > > > and for an example of a smaller FPGA-Core, and what can be done > in core-extension, look at this carefully before commiting to the > FpSLIC ( which is rather a dead-end pathway ). > > http://bleyer.org/pacoblaze/ > > A google on Python AVR ( if you MUST use the FpSLIC ) > finds quite a lot, including > > http://savannah.nongnu.org/patch/?func=detailitem&item_id=3763 > > http://www.ecs.soton.ac.uk/~jb1403/projects/avrpy/ > > > -jg > >
Reply by ●April 9, 20062006-04-09
Jim Granville wrote:> Niels Sandmann wrote: >> Hi everyone, >> >> I'm considering making a compiler for Atmels FPSLIC (combined >> microcontroller with FPGA). The idea is to mark expensive funktions, so >> they can be implemented in the FPGA instead of normal machine code. > > Sometimes an 'expensive' item might be an operator. > ie Maths libraries, and their support is one productive area that > does not need armloads of new software. > > > I have experience with microcontrollers and construction of > compilers, but >> I have only made very small test-projects with a very old FPGA and >> really buggy software. >> >> Is this possible to make such a compiler? > > almost anything is possible ... > >> Does it make sense at all to compile high-level language to a FPGA in >> this way? > > depends a lot on the FPGA, and the project, ( and the designer..) > [ It is also a dangerous tool in the wrong hands....]why ?>> Has someone else made it/is this normal procedure today ? > > Someone has mentioned Altera's new C flow ( not cheap )Do you mean their C2H-compiler for the Nios II as Mike Teseler mentioned in another post ?> For good examples of FPGA centric work on other languages, look at<snip links> They are interesting but not exactly what I'm looking for.> and for an example of a smaller FPGA-Core, and what can be done > in core-extension, look at this carefully before commiting to the > FpSLIC ( which is rather a dead-end pathway ).I'm not committed to the FpSLIC in any way. It was just chosen due to my prior experience with AVR.






