Sunday 16 December 2012

Topic 4 subtopic 2 : Memory allocation, data alignment and register

Memory Allocation

Memory allocation is the act of reserving a chunk of memory for some set of data.Memory contains bytes.Some of those bytes are instructions ,and some of those bytes are data.MIPS processors typically divide memory into three parts:
  • Text segment
  • Data segment
  • Stack segment

Data Alignment
Its value and the storage location(address).The address of a data can be evenly divisible by 1,2,4, or 8.In other words,data object can have 1 byte,2 byte,4 byte,8 byte alignment.


MIPS Data Sizes


Register

The MIPS microprocessor contains 32 user accessible registers that are numbered as 0-31.
  • Register are 32 bits for MIPS.
  • Register $1,$26,$27,$29 are reserved for special purpose by the assembler,compiler and operating system.
  • Register $0 is hard wired to the value zero , and $31 is the link register for jump and link instructions but can be used with other instructions with caution.

The following table summarizes the usage convention for these registers:-

*** Coprocessor 0 contains exception control registers that handles exception.
SPIM doesn't implement all of the coprocessor 0's registers , since they are not much useful in a simulator or part of the memory system , which is not implemented. However, it does provide trap registers as show as below.

Trap Register: 

Exception code register:


LIM ZHEW SHENG
B031210379








15 comments:

  1. i can understand well.^^

    ReplyDelete
  2. this is the awesome explanation.i can understand well

    ReplyDelete
  3. great explanation.

    ReplyDelete
  4. easy to understand..keep it

    ReplyDelete
  5. thanks for your information.i can understand well

    ReplyDelete
  6. easy to understand=]

    ReplyDelete
  7. Thanks for your sharing.
    I can understand.
    This show you put a lot of effort..

    ReplyDelete
  8. This is a awesome explanation i ever see.
    Thanks for your information.

    ReplyDelete
  9. great..I like this topic..thanks for your explanation.

    ReplyDelete
  10. awesome!! is a good explanation

    ReplyDelete
  11. very easy to understand

    ReplyDelete
  12. yeah!the informations very clear.keeo it

    ReplyDelete
  13. wow!! i like the way of your explanations

    ReplyDelete
  14. yeah!!thanks for your details
    it really help in my test

    ReplyDelete