Esempio n. 1
0
/* start simulation, program loaded, processor precise state initialized */
void
sim_main(void)
{
  fprintf(stderr, "sim: ** starting *pipe* functional simulation **\n");

  /* must have natural byte/word ordering */
  if (sim_swap_bytes || sim_swap_words)
    fatal("sim: *pipe* functional simulation cannot swap bytes or words");

  /* set up initial default next PC */
  regs.regs_NPC = regs.regs_PC + sizeof(md_inst_t);
  /* maintain $r0 semantics */
  regs.regs_R[MD_REG_ZERO] = 0;
  fd.PC = regs.regs_PC - sizeof(md_inst_t);
 
  while (TRUE)
  {
	  //handle the pipeline in reverse so that the instruction could be handled in ascending order
	  sim_num_insn++;
	  do_stall();
	  do_wb();
	  do_mem();
	  do_ex();
	  do_id();
	  do_if();
	  dump_pipeline();
  }
}
Esempio n. 2
0
/* start simulation, program loaded, processor precise state initialized */
void
sim_main(void)
{
  fprintf(stderr, "sim: ** starting *pipe* functional simulation **\n");

  /* must have natural byte/word ordering */
  if (sim_swap_bytes || sim_swap_words)
    fatal("sim: *pipe* functional simulation cannot swap bytes or words");

  /* set up initial default next PC */
  /* maintain $r0 semantics */
  regs.regs_R[MD_REG_ZERO] = 0;
  regs.regs_PC -= sizeof(md_inst_t);
  while (TRUE)
  {
	   do_if();
     do_wb();
     do_id();
     do_ex();
     do_mem();
     print_env();
     write_buf();
     #ifndef NO_INSN_COUNT
           sim_num_insn++;
     #endif /* !NO_INSN_COUNT */
  }
}
Esempio n. 3
0
int do_aac (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
	if (argc < 2)
		return 0;

	if (strncmp ("sensors", argv[1], strlen(argv[1])) == 0) {
		do_sensors();
	}

	if (strncmp ("id", argv[1], strlen(argv[1])) == 0) {
		do_id();
	}

	if (strncmp ("pmin", argv[1], strlen(argv[1])) == 0) {
		do_pmin();
	}

	if (strncmp ("pmax", argv[1], strlen(argv[1])) == 0) {
		do_pmax();
	}

	if (strncmp ("systeminfo", argv[1], strlen(argv[1])) == 0) {
		do_systeminfo();
	}


	return 0;
}
Esempio n. 4
0
File: id.c Progetto: luckboy/toybox
void id_main(void)
{
  if (toys.which->name[0] > 'i') toys.optflags = (FLAG_u | FLAG_n);
  if (toys.optc) while(*toys.optargs) do_id(*toys.optargs++);
  else do_id(NULL);
}
Esempio n. 5
0
File: id.c Progetto: 0x6e3078/toybox
void id_main(void)
{
  if (toys.optc) while(*toys.optargs) do_id(*toys.optargs++);
  else do_id(NULL);
}