Changes between Version 20 and Version 21 of VirtualMemory


Ignore:
Timestamp:
Jul 3, 2009, 12:00:42 PM (15 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • VirtualMemory

    v20 v21  
    100100The PPN2 value (28 bits) must be concatened with the page offset (12 bits) to build the 40 bits physical address.
    101101
    102 
    103 == 2. Generic MMU architecture ==
     102== 2.  MMU/processor interface ==
     103
     104In order to be used withthe various (32 bits) processor cores available in the SoCLib library, the TSAR generic MMU respects the following processor/MMU interface:
     105
     106=== 2.1  Instruction MMU interface ===
     107
     108The Instruction MMU interface is defined by the following signals :
     109
     110{{{
     111struct InstructionRequest {
     112        bool valid;
     113        uint30_t addr;
     114        enum ExecMode mode;
     115    };
     116struct InstructionResponse {
     117        bool valid;
     118        bool error;
     119        uint32_t instruction;
     120    };
     121}}}
     122
     123The  addr virtual address is a 32 bits word adress. It is coded on 30 bits.
     124
     125The possible values for the Execution Mode are defined below :
     126
     127|| ExecMode || Value ||
     128||                    ||            ||
     129|| Hyper        || *1       ||
     130|| Kernel       || 00       ||
     131|| User          || 10        ||
     132
     133=== 2.2 Data MMU interface ===
     134
     135The Data MMU interface is defined by the following signals :
     136
     137{{{
     138struct DataRequest {
     139        bool valid;
     140        uint30_t addr;
     141        uint32_t wdata;
     142        enum DataOperationType type;
     143        uint4_t be;
     144        enum ExecMode mode;
     145    };
     146struct DataResponse {
     147        bool valid;
     148        bool error;
     149        uint32_t rdata;
     150    };
     151}}}
     152
     153The  addr virtual address is a 32 bits word adress. It is coded on 30 bits.
     154
     155The wdata field is only significant for be-masked bytes:
     156
     157 * wdata[7:0] is at ![addr], masked by be[0]
     158 * wdata[15:8] is at [addr+1], masked by be[1]
     159 * wdata[23:16] is at [addr+2], masked by be[2]
     160 * wdata[31:24] is at [addr+3], masked by be[3]
     161
     162The possible values for the execution mode are the same as for the instructions.
     163
     164The possible values for the OperationType field are defined below :
     165
     166|| Data.OperationType || R X L S Z  || semantic    ||
     167||                                     ||                      ||
     168|| DATA_READ              || 1 0 0 0 0 || load 32 bits from memory address space ||
     169|| DATA_WRITE             || 0 0 0 0 0 || store 32 bits to memory adress space ||
     170|| DATA_LL                    || 1 0 1 0 0 || load 32 bits from memory address space with reservation ||
     171|| DATA_SC                   || 0 0 1 0 0 || conditionnal store 32 bits to memory address space ||
     172|| XTN_READ                 || 1 1 0 0 0 || load 32 bits from MMU register ||
     173|| XTN_WRITE                || 0 1 0 0 0 || store 32 bits to MMU register ||
     174|| DATA_LLRST             || 0 0 0 0 1 || reset a previous LL reservation ||
     175|| DATA_SYNC              || 0 0 0 1 0 || execute all pending write requests ||
     176
     177Note : Instruction request & data requests are independent :  the processor can issue simultaneous
     178data & instruction requests that have  different execution modes.
     179
     180In case of access to an eXTerNal register (XTN_READ or XTN_WRITE) the MMU register is identified by the Data.Address field.
     181(see section 3).
     182
     183== 3. MMU architecture ==
    104184
    105185The generic MMU is implemented as an hardware component in the L1 cache controller.