Project

General

Profile

MMU description » History » Revision 11

Revision 10 (Alexander Kamkin, 02/04/2013 12:34 PM) → Revision 11/132 (Taya Sergeeva, 02/11/2013 03:59 PM)

h1. MMU description 

 Documentation with examples 

 The MMU grammar is in ru.ispras.microtesk.translator.mmu.grammar folder. It contains Lexer, Parser and TreeWalker files. These files can be built by build.xml file (microtesk++/build.xml). The files generated (MMULexer.java, MMUParser.java, MMUTreeWalker.java) are in microtesk++.gen.ru.ispras.microtesk.translator.mmu.grammar folder.  

 The folder ru.ispras.microtesk.translator.mmu.ir. contains the inner representation of the MMU hierarchy of one buffer.   
 MMU translator is in the ru.ispras.microtesk.translator.mmu.translator folder. After grammar files being generated the file ''BufferExample'' can be loaded to this translator. 

 For instance, this is an example of such file below: 

 <pre> 
 address PA   
 { 
	 width = 40 
 } 

 buffer L1  
 { 
	 sets = 4 
	 lines = 128 
	 line = (tag:30 data:256) 
	 index(addr:PA) = addr<9**8>  
	 match(addr:PA) = line.tag == addr<39**10> 	
	 policy =    lru 
 } 
 </pre> 

 Files in ru.ispras.microtesk.model.api.mmu folder contains different policies of cache.    Folder ru.ispras.microtesk.model.api.mmu.buffer contains the model of MMU - the files which describe Buffer, Set, Line, Address expressions.   

 Description of each constructor in the buffer example is below: 

 ''set'' is an associativity of a buffer; 
 ''lines'' is the number of lines in a given buffer; 
 ''line'' is described by its own parameters in the braces: ''tag'' and ''data'', for instance, each of them has an appropriate width of the fields in bytes; 
 ''index'' depends on ''address'', which is ''physical'' (PA) in our case; ''index'' returns the width of kept field in bytes;