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

Subversion Repositories aemb

[/] [aemb/] [trunk/] [sw/] [cc/] [corefunc.hh] - Diff between revs 141 and 152

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

Rev 141 Rev 152
Line 1... Line 1...
/* $Id: corefunc.hh,v 1.1 2008-04-27 16:04:42 sybreon Exp $
/* $Id: corefunc.hh,v 1.2 2008-04-28 20:30:24 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 27... Line 27...
*/
*/
 
 
#ifndef COREFUNC_HH
#ifndef COREFUNC_HH
#define COREFUNC_HH
#define COREFUNC_HH
 
 
#define MAGIC 0xAE63AE63 // magic number
#define MAGIC 0xAE62AE62 // magic number
 
 
volatile int intr = -1;
volatile int intr = -1;
 
 
void __attribute__ ((interrupt_handler)) interruptHandler()
void __attribute__ ((interrupt_handler)) interruptHandler()
{
{
  intr = 0; // flag the interrupt service routine
  intr = 0; // flag the interrupt service routine
}
}
 
 
 
/**
 
INTERRUPT TEST ROUTINE
 
*/
 
 
int interruptTest(int timeout)
int interruptTest(int timeout)
{
{
  enableInterrupts();
  aembEnableInterrupts();
  int timer;
  int timer;
  for (timer=0; (timer < timeout * 100) && (intr == -1); ++timer); // delay loop
  for (timer=0; (timer < timeout * 100) && (intr == -1); ++timer); // delay loop
  disableInterrupts();
  aembDisableInterrupts();
  return (intr == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
  return (intr == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
}
 
 
 
 
/**
/**
Line 92... Line 96...
 
 
#endif
#endif
 
 
/*
/*
$Log: not supported by cvs2svn $
$Log: not supported by cvs2svn $
 
Revision 1.1  2008/04/27 16:04:42  sybreon
 
Minor cosmetic changes.
 
 
*/
*/

powered by: WebSVN 2.1.0

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