| 1 | [wiki:Component SocLib Components General Index] |
| 2 | |
| 3 | = MicroBlaze Processor Functional Description = |
| 4 | |
| 5 | This hardware component is a MicroBlaze processor core as described in [www.xilinx.com/ise/embedded/mb_ref_guide.pdf]. |
| 6 | Note that the 9.2 version of ISE contains a pretty major evolution of the MicroBlaze that integrates a MMU, but this is not the version available within SoCLib (at least yet!). |
| 7 | This component is an ISS, which should be wrapped with an [wiki:Component/IssWrapper IssWrapper] for integration into a complete platform. |
| 8 | |
| 9 | This instruction set simulator acts as a slave to the IssWrapper and is organised identically to the |
| 10 | other Isses available within the library. |
| 11 | Currently, the execution timings are pretty rough, and are typically one cycle per instruction. |
| 12 | |
| 13 | The support for symetric and asymetric multiprocessing is hardwired using the `fsl` feature of the MicroBlaze. |
| 14 | The processor number is given at instanciation time, and accessible through `get` on `fsl0`. |
| 15 | Using other `fsl` will lead to an abort. |
| 16 | |
| 17 | = Component definition = |
| 18 | |
| 19 | Available in source:trunk/soclib/desc/soclib/microblaze.sd |
| 20 | |
| 21 | == Usage == |
| 22 | |
| 23 | MicroBlaze has no parameters. |
| 24 | {{{ |
| 25 | Uses( 'microblaze') |
| 26 | }}} |
| 27 | |
| 28 | = Microblaze Processor ISS Implementation = |
| 29 | |
| 30 | The implementation is in |
| 31 | * source:trunk/soclib/systemc/include/common/iss/microblaze.h |
| 32 | This defines the resources associated to the MicroBlaze along with a few |
| 33 | minimal helper functions (or methods, as they call them) |
| 34 | * source:trunk/soclib/systemc/src/common/iss/microblaze.cc |
| 35 | This is a large switch (as opposed to calling insn execution through |
| 36 | pointers to functions) and a few macros, as it is overall not worse to |
| 37 | traverse a switch than to move from tag to tag, seen the context necessary |
| 38 | to the execution of one instruction (at least in the MicroBlaze case). |
| 39 | |
| 40 | It is possible to compile a version of the MicroBlaze that issues the instruction |
| 41 | address along with the instruction being executed by defining `MBDEBUG` at `1` line |
| 42 | 32 of source:trunk/soclib/systemc/src/common/iss/microblaze.cc |
| 43 | This is quite useful to check that the processor is really interpreting correctly a |
| 44 | sequence of instructions (and also for debugging software until a debugging stub is |
| 45 | written). |
| 46 | |
| 47 | == Template parameters == |
| 48 | |
| 49 | This component has no template parameters. |
| 50 | |
| 51 | == Constructor parameters == |
| 52 | |
| 53 | {{{ |
| 54 | MicroblazeIss( |
| 55 | sc_module_name name, // Instance Name |
| 56 | int ident); // processor id |
| 57 | }}} |
| 58 | |
| 59 | == Visible registers == |
| 60 | |
| 61 | The following internal registers define the processor internal state, and can be inspected: |
| 62 | * r_pc : Program counter |
| 63 | * m_ins : Instruction register |
| 64 | * r_gpr[i] : General registers ( 0 < i < 32) |
| 65 | * r_hi & r_lo : Intermediate registers for multiply / divide instructions |
| 66 | * r_cp0[i] : Coprocessor 0 registers (0<=i<32). Implemented values: |
| 67 | * 8: BAR : Bad address register |
| 68 | * 12: SR : Status register |
| 69 | * 13: CR : Cause register |
| 70 | * 14: EPC : Exception PC register |
| 71 | * 15: INFOS : CPU identification number on bits ![9:0] |
| 72 | |
| 73 | == Interrupts == |
| 74 | |
| 75 | There is a single interrupt line on the MicroBlaze, so all the handling is |
| 76 | software based. |
| 77 | |
| 78 | == Ports == |
| 79 | |
| 80 | None, it is to the wrapper to provide them. |