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

Subversion Repositories aemb

[/] [aemb/] [trunk/] [sw/] [cc/] [simboard.hh] - Diff between revs 137 and 139

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

Rev 137 Rev 139
Line 1... Line 1...
/* $Id: simboard.hh,v 1.3 2008-04-26 18:07:19 sybreon Exp $
/* $Id: simboard.hh,v 1.4 2008-04-26 19:32:00 sybreon Exp $
**
**
** AEMB Function Verification C++ Testbench
** AEMB Function Verification C++ Testbench
** Copyright (C) 2004-2008 Shawn Tan 
** Copyright (C) 2004-2008 Shawn Tan 
**
**
** This file is part of AEMB.
** This file is part of AEMB.
Line 32... Line 32...
 
 
/*
/*
INTERRUPT TESTS
INTERRUPT TESTS
*/
*/
 
 
 
#ifdef __cplusplus
 
using namespace aemb;
 
#endif
 
 
volatile int intr = -1;
volatile int intr = -1;
 
 
void __attribute__ ((interrupt_handler)) interruptHandler()
void __attribute__ ((interrupt_handler)) interruptHandler()
{
{
  intr = 0; // flag the interrupt
  intr = 0; // flag the interrupt service routine
}
}
 
 
int interruptTest(int timeout)
int interruptTest(int timeout)
{
{
  aemb::enableInterrupts();
  enableInterrupts();
  for (int timer=0; (timer < timeout) && (intr == -1); ++timer); // delay loop
  int timer;
  aemb::disableInterrupts();
  for (timer=0; (timer < timeout) && (intr == -1); ++timer); // delay loop
 
  disableInterrupts();
  return (intr == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
  return (intr == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
}
 
 
 
 
/**
/**
Line 120... Line 125...
 
 
#endif
#endif
 
 
/*
/*
$Log: not supported by cvs2svn $
$Log: not supported by cvs2svn $
 
Revision 1.3  2008/04/26 18:07:19  sybreon
 
Minor cosmetic changes.
 
 
Revision 1.2  2008/04/21 12:13:12  sybreon
Revision 1.2  2008/04/21 12:13:12  sybreon
Passes arithmetic tests with single thread.
Passes arithmetic tests with single thread.
 
 
Revision 1.1  2008/04/11 15:32:28  sybreon
Revision 1.1  2008/04/11 15:32:28  sybreon
initial checkin
initial checkin

powered by: WebSVN 2.1.0

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