MMU description » History » Version 7
Taya Sergeeva, 01/29/2013 03:06 PM
1 | 1 | Taya Sergeeva | h1. MMU description |
---|---|---|---|
2 | |||
3 | 3 | Taya Sergeeva | Documentation with examples |
4 | 2 | Taya Sergeeva | |
5 | 6 | Taya Sergeeva | 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. |
6 | 1 | Taya Sergeeva | |
7 | 6 | Taya Sergeeva | The folder ru.ispras.microtesk.translator.mmu.ir. contains the inner representation of the MMU hierarchy. |
8 | 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. |
||
9 | |||
10 | 5 | Taya Sergeeva | For instance, this is an example of such file below: |
11 | |||
12 | 7 | Taya Sergeeva | {code} |
13 | 2 | Taya Sergeeva | address PA |
14 | { |
||
15 | width = 40 |
||
16 | } |
||
17 | |||
18 | buffer L1 |
||
19 | { |
||
20 | sets = 4 |
||
21 | lines = 128 |
||
22 | line = (tag:30 data:256) |
||
23 | index(addr:PA) = addr<9**8> |
||
24 | match(addr:PA) = line.tag == addr<39**10> |
||
25 | policy = lru |
||
26 | 1 | Taya Sergeeva | } |
27 | 7 | Taya Sergeeva | {code} |
28 | 1 | Taya Sergeeva | |
29 | 7 | Taya Sergeeva | Buffer L1 in BufferExample is a child of the class BufferExpr which is in ru.ispras.microtesk.translator.mmu.buffer folder, address PA is a child of the class AddressExpr, and so on. |
30 | 5 | Taya Sergeeva | |
31 | 7 | Taya Sergeeva | Files in ru.ispras.microtesk.model.api.mmu folder contains different policies of cache. Folder ru.ispras.microtesk.model.api.mmu.buffer contains Buffer, Set, Line, Address expressions. |