Project

General

Profile

Actions

MMU description » History » Revision 14

« Previous | Revision 14/132 (diff) | Next »
Taya Sergeeva, 02/11/2013 05:18 PM


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:

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
}

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.

Buffer can be described by different parameters, such sets, lines, index, match, policy, and so on, which number is infixed.

Description of each constructor in the buffer example is below:

* ''set''
is an associativity of a buffer; it returns the number of lines in a one set;

* ''lines''
is the number of lines in a given buffer;

* ''line''
designates the specific line in which the necessary data will be looking for;
''line'' includes its own parameters in the braces: ''tag'' and ''data'', each of them has an appropriate width of the fields kept in bytes;
in our example ''line'' has only two parameters, but in general case it can include more;

* ''index''
returns the initial and the final points of the field kept in bytes; they are marked in a three-cornered brackets, after ''addr'';
''index'' depends on an ''address'', which is ''physical'' (PA) in our case; the type of an address is set in the braces after ''index'';

* ''match''
returns ''true'' or ''false'' depending on if the data required is in the given line or not; it returns ''true'' if there is a ''hit'' in the line, and returns ''false'' otherwise;
''match'' description contains the the initial and the final points of the address field in the triangle brackets after ''addr'';
as ''index'' in the round braces ''match'' also has the type of the address used; ''PA'' in our case;

* ''policy''
sets a policy which will be applied to our buffer in a cache, ''lru'' (Least Recently Used) in our example.

Updated by Taya Sergeeva about 11 years ago · 14 revisions