URL
https://opencores.org/ocsvn/aemb/aemb/trunk
[/] [aemb/] [tags/] [AEMB_7_05/] [sw/] [c/] [aeMB_testbench.c] - Diff between revs 6 and 14
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 6 |
Rev 14 |
Line 1... |
Line 1... |
/*
|
/*
|
* $Id: aeMB_testbench.c,v 1.2 2007-04-04 06:07:45 sybreon Exp $
|
* $Id: aeMB_testbench.c,v 1.3 2007-04-04 14:09:04 sybreon Exp $
|
*
|
*
|
* AEMB Function Verification C Testbench
|
* AEMB Function Verification C Testbench
|
* Copyright (C) 2006 Shawn Tan Ser Ngiap <shawn.tan@aeste.net>
|
* Copyright (C) 2006 Shawn Tan Ser Ngiap <shawn.tan@aeste.net>
|
*
|
*
|
* This library is free software; you can redistribute it and/or modify it
|
* This library is free software; you can redistribute it and/or modify it
|
Line 26... |
Line 26... |
* The fibonnaci code is from
|
* The fibonnaci code is from
|
* http://en.literateprograms.org/Fibonacci_numbers_(C)
|
* http://en.literateprograms.org/Fibonacci_numbers_(C)
|
*
|
*
|
* HISTORY
|
* HISTORY
|
* $Log: not supported by cvs2svn $
|
* $Log: not supported by cvs2svn $
|
|
* Revision 1.2 2007/04/04 06:07:45 sybreon
|
|
* Fixed C code bug which passes the test
|
|
*
|
* Revision 1.1 2007/03/09 17:41:57 sybreon
|
* Revision 1.1 2007/03/09 17:41:57 sybreon
|
* initial import
|
* initial import
|
*
|
*
|
*/
|
*/
|
|
|
/* Special Prototypes */
|
/* Special Prototypes */
|
void int_call_func () __attribute__((save_volatiles));
|
void int_call_func (); // __attribute__((save_volatiles));
|
void int_handler_func () __attribute__ ((interrupt_handler));
|
void int_handler_func () __attribute__ ((interrupt_handler));
|
|
|
/* Interrupt Handler */
|
/* Interrupt Handler */
|
void int_handler_func () {
|
void int_handler_func () {
|
int_call_func();
|
int_call_func();
|
}
|
}
|
|
|
void int_call_func () {
|
void int_call_func () {
|
while (1) {}
|
int *p;
|
|
p = 0x88888888;
|
|
*p = 0x00ED557A; // Write a value to a IO port.
|
}
|
}
|
|
|
/* Recursive Version */
|
/* Recursive Version */
|
|
|
unsigned int slowfib(unsigned int n)
|
unsigned int slowfib(unsigned int n)
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.