12-06-2008 12:34 PM
Hello . . .
Is It possible to program the MicroBlaze soft processor using VHDL rathar than c language ???
because i am familar in VHDL programming , and i am dont know to programming with c .
Thanks . . .
12-06-2008 12:59 PM
No. VHDL is used to model and synthesize hardware. MicroBlaze is a 32-bit soft processor that has already been developed. You can program it in C, C++, assembly, or machine code.
You can use VHDL to develop additional peripherals for MicroBlaze.
01-11-2009 01:04 AM
thanks for replying
so how can i make the compiler to distinguish between thos languages ,
because when i create a new software application the file exension is .c?
or to write the assembly program by c language?
01-11-2009 11:21 AM
There are different compilers for the different languages:
mb-gcc for C
mb-g++ for C++
mb-as for assembly (ok, this one is actually an assembler)
The options likely depend on your development flow, as there are multiple possibilities: XPS in GUI mode, XPS in batch mode (e.g. TCL), makefile, SDK, etc.
The XPS GUI gives you the option when you add source to an application of adding a C file (default file type, note the option to change this in the dialog box), C++ source, or other (e.g. .s)
Most users likely use C. It is also possible to in-line assembly into your C file:
http://www.xilinx.com/support/answers/18561.htm (9.2i EDK - How do I include inline assembly within my C source files?)
http://forums.xilinx.com/xlnx/board/message?board.id=Virtex&message.id=1997#M1997 (Microblaze , vertex 4 ML403, Accessing register values from C)
01-23-2009 12:20 PM
Thanks for replyng me ,
you wrote that The XPS GUI gives you the option when you add source to an application of adding a C file (default file type, note the option to change this in the dialog box), C++ source, or other (e.g. .s)
i want to write my source code using assembly language , Is this possible ? is the file extension (*.s) is used for assembly codes files ? and is
there a need to adjust the compiler (mb-as for assembly ) manually whether in XPS or in SDK ??? if yes , where to do that ?
i want to use assembly because it is familiar to me and i used it before unlike c .
01-24-2009 08:29 PM
Yes, it should be possible.
Many of the low-level MicroBlaze (and PPC) routines were written in assembly.
For example, see
.S Assembly file, but might have preprocessor directives
.s Assembly file with no preprocessor directives
per http://www.xilinx.com/support/documentation/sw_manuals/edk10_est_rm.pdf (Embedded System Tools Reference Manual)
I've never used assembly in XPS before.
A quick test shows adding a .s file to a project still uses mb-gcc (accoding to the makefiles automaticcally generated by XPS). I don't necessarily see this as incorrect since mb-gcc obviously can use mb-as. But I'll admit I haven't used assembly here.
It is also possible to script EDK after you use the EDK GUI to create the hardware subsystem.
http://forums.xilinx.com/xlnx/board/message?board.id=EDK&message.id=7063 (Using EDK in batch mode ?)
01-25-2009 11:02 AM
Can you guide me to any document or anything to use assembly language in microblaze programming like the form of the header and source files , how to make comments , ....etc
i was read the microblaze processor reference gide including chapter 4 (microblaze instruction set arcitecture) , it provides details on instructions but not details but no how to program
01-25-2009 07:56 PM - edited 01-25-2009 07:58 PM
If you've already read the MicroBlaze reference guide (which is where I would start), the next step is likely to review the existing assembly files I mentioned above as an example:
You may also find the GNU Assembler documentation useful: