OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_47/] [or1ksim/] [testbench/] [except_test.c] - Diff between revs 608 and 611

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 608 Rev 611
Line 822... Line 822...
  /* Check if there was trap exception */
  /* Check if there was trap exception */
  call ((unsigned long)&trap, 0);
  call ((unsigned long)&trap, 0);
  ASSERT(except_count == 1);
  ASSERT(except_count == 1);
  ASSERT(except_mask == (1 << V_TRAP));
  ASSERT(except_mask == (1 << V_TRAP));
  ASSERT(except_pc == (unsigned long)(trap));
  ASSERT(except_pc == (unsigned long)(trap));
  ASSERT(except_ea == 0);
 
 
 
  /* Check if there was trap exception */
  /* Check if there was trap exception */
  call ((unsigned long)&b_trap, 0);
  call ((unsigned long)&b_trap, 0);
  ASSERT(except_count == 2);
  ASSERT(except_count == 2);
  ASSERT(except_mask == (1 << V_TRAP));
  ASSERT(except_mask == (1 << V_TRAP));
  ASSERT(except_pc == (unsigned long)(b_trap));
  ASSERT(except_pc == (unsigned long)(b_trap));
  ASSERT(except_ea == 0);
 
 
 
  return 0;
  return 0;
}
}
 
 
/* Range test */
/* Range test */
Line 857... Line 855...
  mtspr (SPR_SR, mfspr (SPR_SR) | SPR_SR_OVE);
  mtspr (SPR_SR, mfspr (SPR_SR) | SPR_SR_OVE);
  call ((unsigned long)&b_range, 0);
  call ((unsigned long)&b_range, 0);
  ASSERT(except_count == 2);
  ASSERT(except_count == 2);
  ASSERT(except_mask == (1 << V_RANGE));
  ASSERT(except_mask == (1 << V_RANGE));
  ASSERT(except_pc == (unsigned long)(b_range));
  ASSERT(except_pc == (unsigned long)(b_range));
  ASSERT(except_ea == 0);
 
 
 
  return 0;
  return 0;
}
}
 
 
/* Exception priority test */
/* Exception priority test */
Line 923... Line 920...
  /* Check if there was INT exception */
  /* Check if there was INT exception */
  call_with_int (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE), 0);
  call_with_int (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE), 0);
  ASSERT(except_count == 1);
  ASSERT(except_count == 1);
  ASSERT(except_mask == (1 << V_TICK));
  ASSERT(except_mask == (1 << V_TICK));
  ASSERT(except_pc == (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE)));
  ASSERT(except_pc == (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE)));
  ASSERT(except_ea == 0);
 
 
 
  /* Reset except counter */
  /* Reset except counter */
  except_count = 0;
  except_count = 0;
  except_mask = 0;
  except_mask = 0;
  except_pc = 0;
  except_pc = 0;
Line 1061... Line 1057...
  /* Check if there was trap exception */
  /* Check if there was trap exception */
  call ((unsigned long)&trap, 0);
  call ((unsigned long)&trap, 0);
  ASSERT(except_count == 1);
  ASSERT(except_count == 1);
  ASSERT(except_mask == (1 << V_TRAP));
  ASSERT(except_mask == (1 << V_TRAP));
  ASSERT(except_pc == (unsigned long)(trap));
  ASSERT(except_pc == (unsigned long)(trap));
  ASSERT(except_ea == 0);
 
 
 
#if 0
#if 0
  /* Reset except counter */
  /* Reset except counter */
  except_count = 0;
  except_count = 0;
  except_mask = 0;
  except_mask = 0;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.