<commit_before>/******************************************************
 * This is the main file for the mips1 ArchC model    *
 * This file is automatically generated by ArchC      *
 * WITHOUT WARRANTY OF ANY KIND, either express       *
 * or implied.                                        *
 * For more information on ArchC, please visit:       *
 * http://www.archc.org                               *
 *                                                    *
 * The ArchC Team                                     *
 * Computer Systems Laboratory (LSC)                  *
 * IC-UNICAMP                                         *
 * http://www.lsc.ic.unicamp.br                       *
 ******************************************************/
 
// Rodolfo editou aqui
//
const char *project_name="mips";
const char *project_file="mips1.ac";
const char *archc_version="2.0beta1";
const char *archc_options="-abi -dy ";

#include <systemc.h>
#include "mips.H"
#include "memory.h"
#include "bus.h"
#include "bar_mem.h"
#include "bw_hardware.h"
#include "mutex_token.h"

int sc_main(int ac, char *av[])
{

  //!  ISA simulator
  // adicionados novos processadores
  mips mips1_proc1("mips1");
  mips mips2_proc2("mips2");
  mips mips3_proc3("mips3");
  mips mips4_proc4("mips4");
  mips mips5_proc5("mips5");
  mips mips6_proc6("mips6");
  mips mips7_proc7("mips7");
  mips mips8_proc8("mips8");

  //! Bus
  ac_tlm_bus bus("bus");
  
  //! Memory
  ac_tlm_mem mem("mem");
  
  mutex_token mutex("mutex_token1")
  
  //! Novos modulos do P3
  user::bw_hardware bw("bw_hardware1");
  user::bar_mem bar("bar_mem1");
  
  bar.DM_port(mem.target_export);
  bar.BW_port(bw.target_export);
  mutex.MUTEX_port(mutex.target_export);
  
  
#ifdef AC_DEBUG
  ac_trace("mips1_proc1.trace");
#endif 
  
  //conecta os processadores no barramento
  mips1_proc1.DM_port(bar.target_export1);
  mips2_proc2.DM_port(bar.target_export2);
  mips3_proc3.DM_port(bar.target_export3);
  mips4_proc4.DM_port(bar.target_export4);
  mips5_proc5.DM_port(bar.target_export5);
  mips6_proc6.DM_port(bar.target_export6);
  mips7_proc7.DM_port(bar.target_export7);
  mips8_proc8.DM_port(bar.target_export8);
  
  char * program = av[1];

  //inicia os processadores
  mips1_proc1.init(ac, av);

  av[1] = program;
  mips2_proc2.init(ac, av);

  av[1] = program;
  mips3_proc3.init(ac, av);

  av[1] = program;
  mips4_proc4.init(ac, av);

  av[1] = program;
  mips5_proc5.init(ac, av);

  av[1] = program;
  mips6_proc6.init(ac, av);

  av[1] = program;
  mips7_proc7.init(ac, av);

  av[1] = program;
  mips8_proc8.init(ac, av);
  
  cerr << endl;

  sc_start();
  
  //imprime o status dos processadores
  mips1_proc1.PrintStat();
  mips1_proc2.PrintStat();
  mips1_proc3.PrintStat();
  mips1_proc4.PrintStat();
  mips1_proc5.PrintStat();
  mips1_proc6.PrintStat();
  mips1_proc7.PrintStat();
  mips1_proc8.PrintStat();
  cerr << endl;

#ifdef AC_STATS
  mips1_proc1.ac_sim_stats.time = sc_simulation_time();
  mips1_proc1.ac_sim_stats.print();
#endif 

#ifdef AC_DEBUG<commit_msg>consertar compilacao<commit_after>/******************************************************
 * This is the main file for the mips1 ArchC model    *
 * This file is automatically generated by ArchC      *
 * WITHOUT WARRANTY OF ANY KIND, either express       *
 * or implied.                                        *
 * For more information on ArchC, please visit:       *
 * http://www.archc.org                               *
 *                                                    *
 * The ArchC Team                                     *
 * Computer Systems Laboratory (LSC)                  *
 * IC-UNICAMP                                         *
 * http://www.lsc.ic.unicamp.br                       *
 ******************************************************/
 
// Rodolfo editou aqui
//
const char *project_name="mips";
const char *project_file="mips1.ac";
const char *archc_version="2.0beta1";
const char *archc_options="-abi -dy ";

#include <systemc.h>
#include "mips.H"
#include "memory.h"
#include "bus.h"
#include "bar_mem.h"
#include "bw_hardware.h"
#include "mutex_token.h"

int sc_main(int ac, char *av[])
{

  //!  ISA simulator
  // adicionados novos processadores
  mips mips1_proc1("mips1");
  mips mips2_proc2("mips2");
  mips mips3_proc3("mips3");
  mips mips4_proc4("mips4");
  mips mips5_proc5("mips5");
  mips mips6_proc6("mips6");
  mips mips7_proc7("mips7");
  mips mips8_proc8("mips8");

  //! Bus
  ac_tlm_bus bus("bus");
  
  //! Memory
  ac_tlm_mem mem("mem");
  
  user::mutex_token mutex("mutex_token1")
  
  //! Novos modulos do P3
  user::bw_hardware bw("bw_hardware1");
  user::bar_mem bar("bar_mem1");
  
  bar.DM_port(mem.target_export);
  bar.BW_port(bw.target_export);
  bar.MUTEX_port(mutex.target_export);
  
  
#ifdef AC_DEBUG
  ac_trace("mips1_proc1.trace");
#endif 
  
  //conecta os processadores no barramento
  mips1_proc1.DM_port(bar.target_export1);
  mips2_proc2.DM_port(bar.target_export2);
  mips3_proc3.DM_port(bar.target_export3);
  mips4_proc4.DM_port(bar.target_export4);
  mips5_proc5.DM_port(bar.target_export5);
  mips6_proc6.DM_port(bar.target_export6);
  mips7_proc7.DM_port(bar.target_export7);
  mips8_proc8.DM_port(bar.target_export8);
  
  char * program = av[1];

  //inicia os processadores
  mips1_proc1.init(ac, av);

  av[1] = program;
  mips2_proc2.init(ac, av);

  av[1] = program;
  mips3_proc3.init(ac, av);

  av[1] = program;
  mips4_proc4.init(ac, av);

  av[1] = program;
  mips5_proc5.init(ac, av);

  av[1] = program;
  mips6_proc6.init(ac, av);

  av[1] = program;
  mips7_proc7.init(ac, av);

  av[1] = program;
  mips8_proc8.init(ac, av);
  
  cerr << endl;

  sc_start();
  
  //imprime o status dos processadores
  mips1_proc1.PrintStat();
  mips2_proc2.PrintStat();
  mips3_proc3.PrintStat();
  mips4_proc4.PrintStat();
  mips5_proc5.PrintStat();
  mips6_proc6.PrintStat();
  mips7_proc7.PrintStat();
  mips8_proc8.PrintStat();
  cerr << endl;

#ifdef AC_STATS
  mips1_proc1.ac_sim_stats.time = sc_simulation_time();
  mips1_proc1.ac_sim_stats.print();
#endif 

#ifdef AC_DEBUG
{'fraction_non_alphanumeric': 0.16265750286368844, 'fraction_numerical': 0.033709703812796595, 'mean_word_length': 2.9636835278858626, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5333571', 'n_tokens_mistral': 2363, 'n_tokens_neox': 2318, 'n_words': 396}