Hi all, I'm new to LLVM dev mailling list and I'm starting to discover some aspects of LLVM. Actually I'm looking for a solution to create a tool chain for my own chip (a 8bit micro controller processor) that include a compiler/linker/assembler toolset and a simulator/debugger.>From what I've read, LLVM is a good tool to implement a compiler for thisproprietary platform, but I have the following questions: - Is there estimation (from your experiences) of the work required to implement a backend for a simple 8bits micro controller architecture (1 men-month, 10 or 100 ?) - Is it possible to create a debugger/simulator (at C and assembler level) with LLVM ? Thanks for your help and advices Regards Guillaume -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091123/94c7fe2c/attachment.html>
Hello Guillaume,> - Is there estimation (from your experiences) of the work required to > implement a backend for a simple 8bits micro controller architecture (1 > men-month, 10 or 100 ?)What is the instruction set of your microcontroller? How rich it is? What is the architecture? Is it RISC-y? -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Hello, It is a RISC with around 60 instructions like a 80c51 instruction set (without mul/div) and with Direct or indirect memory acces. There is a protected / user mode but the processor keep small and simple. 2009/11/23 Anton Korobeynikov <anton at korobeynikov.info>> Hello Guillaume, > > > - Is there estimation (from your experiences) of the work required to > > implement a backend for a simple 8bits micro controller architecture (1 > > men-month, 10 or 100 ?) > What is the instruction set of your microcontroller? How rich it is? > What is the architecture? Is it RISC-y? > > -- > With best regards, Anton Korobeynikov > Faculty of Mathematics and Mechanics, Saint Petersburg State University >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091123/4cadb3ed/attachment.html>
Alireza.Moshtaghi at microchip.com
2009-Nov-23 16:45 UTC
[LLVMdev] New 8bit micro controller back-end
Our 8-bit port for PIC16 has taken roughly about 18 months to get to where we are now. Our instruction set is not orthogonal, data memory is banked, program memory is paged, there is only one accumulator and two pointer registers, and the use of indirect memory access is really expensive. So we had to implement some non conventional approaches to get the model working. For the most part, LLVM generic optimizations (except for mem2reg kind of optimizations) reduce the code size pretty good and typical applications that we use for PIC16 fit in the memory without problem. We use clang and LLVM just to generate assembly output. We have our own assembler, linker and debugger. In fact we have to implement some of our tricks in the linker and assembler in order to allow mix of C and assembly projects. If your users only want to use C, then you can probably use a lot more of the analysis capabilities of LLVM than what we use. Our ABI and model of code generation is probably far from what you need, but you may find some tricks in our port that can be useful to you as well. Regards Ali ________________________________ From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Guillaume Deroire Sent: Monday, November 23, 2009 6:46 AM To: LLVM Developers Mailing List Subject: [LLVMdev] New 8bit micro controller back-end Hi all, I'm new to LLVM dev mailling list and I'm starting to discover some aspects of LLVM. Actually I'm looking for a solution to create a tool chain for my own chip (a 8bit micro controller processor) that include a compiler/linker/assembler toolset and a simulator/debugger.>From what I've read, LLVM is a good tool to implement a compiler forthis proprietary platform, but I have the following questions: - Is there estimation (from your experiences) of the work required to implement a backend for a simple 8bits micro controller architecture (1 men-month, 10 or 100 ?) - Is it possible to create a debugger/simulator (at C and assembler level) with LLVM ? Thanks for your help and advices Regards Guillaume -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091123/33aefb66/attachment.html>
Thanks for this feedback, I think our chip architecture is between a PIC16 and a 8051. You have written 18 months, but with how many developpers ? I will take a look at the PIC16 LLVM port to have a better view of the work done and todo. Regards Guillaume 2009/11/23 <Alireza.Moshtaghi at microchip.com>> Our 8-bit port for PIC16 has taken roughly about 18 months to get to > where we are now. Our instruction set is not orthogonal, data memory is > banked, program memory is paged, there is only one accumulator and two > pointer registers, and the use of indirect memory access is really > expensive. So we had to implement some non conventional approaches to get > the model working. > > For the most part, LLVM generic optimizations (except for mem2reg kind of > optimizations) reduce the code size pretty good and typical applications > that we use for PIC16 fit in the memory without problem. > > We use clang and LLVM just to generate assembly output. We have our own > assembler, linker and debugger. In fact we have to implement some of our > tricks in the linker and assembler in order to allow mix of C and assembly > projects. If your users only want to use C, then you can probably use a lot > more of the analysis capabilities of LLVM than what we use. > > Our ABI and model of code generation is probably far from what you need, > but you may find some tricks in our port that can be useful to you as well. > > > > Regards > > Ali > > > ------------------------------ > > *From:* llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] *On > Behalf Of *Guillaume Deroire > *Sent:* Monday, November 23, 2009 6:46 AM > *To:* LLVM Developers Mailing List > *Subject:* [LLVMdev] New 8bit micro controller back-end > > > > Hi all, > > I'm new to LLVM dev mailling list and I'm starting to discover some aspects > of LLVM. > > Actually I'm looking for a solution to create a tool chain for my own chip > (a 8bit micro controller processor) that include a compiler/linker/assembler > toolset and a simulator/debugger. > > >From what I've read, LLVM is a good tool to implement a compiler for this > proprietary platform, but I have the following questions: > - Is there estimation (from your experiences) of the work required to > implement a backend for a simple 8bits micro controller architecture (1 > men-month, 10 or 100 ?) > - Is it possible to create a debugger/simulator (at C and assembler level) > with LLVM ? > > Thanks for your help and advices > > Regards > > Guillaume > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091123/8feb9547/attachment.html>
Hello> Our 8-bit port for PIC16 has taken roughly about 18 months to get to where > we are now. Our instruction set is not orthogonal, data memory is banked, > program memory is paged, there is only one accumulator and two pointer > registers, and the use of indirect memory access is really expensive. So we > had to implement some non conventional approaches to get the model working.I assumed that the architecture in question is pretty similar to one seen in msp430. For something PIC16-like the time efforts are much higher, yes. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University