123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- package compiler;
- /*
- Verificar operacao unaria negacao valor em laco
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- import java.util.logging.Level;
- import java.util.logging.Logger;
- import tools.mips.MipsSettings;
- /**
- *
- * @author Eugenio
- */
- public class Simulator {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) throws Exception {
- try {
- MipsSettings settings = new tools.mips.MipsSettings() {
- {
- // Não executar passo a passo
- // Set("step.by.step", "true");
- Set("step.by.step", "false");
- // Necessario para poder usar os breakpoints
- // Set("mode", "debug");
- // Determina os pontos de para no codigo alvo
- Set("breakpoints", "25c,260");
- // Set("breakpoints", "f4");
- // Set("breakpoints", "94-9c");
- // Set("breakpoints", "1d8,214,2e0,28c,2f0,250,330");
- // Set("breakpoints", "1d8,214,250,28c,2dc,2e0,2d8,2f0,300,314,324,350,35c");
- // Set("breakpoints", "2e8-350,35c");
- // Set("breakpoints", "314,35c");
- // Set("breakpoints", "350,35c");
- // Caminho do arquivo de memoria de instrucoes
- Set("memory.instruction", "\\src\\tools\\mips\\memory\\mi.memory");
- // Tamanho da memorua de instrucoes 16 kb
- Set("memory.instruction.size", 16 * 1024);
- // Caminho do arquivo de memoria de dados
- Set("memory.data", "\\src\\tools\\mips\\memory\\md.memory");
- // Tamanho da memorua de dados 16 kb
- Set("memory.data.size", 16 * 1024);
- Set("memory.data.reset", "true");
- }
- };
- // Instancia um simulador, executa e salva a memoria
- new tools.mips.MipsProcessor(settings)
- .Run()
- .Persist()
- .Report();
- } catch (Exception ex) {
- Logger.getLogger(Simulator.class.getName()).log(Level.SEVERE, null, ex);
- }
- }
- }
|