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

Subversion Repositories or1k

[/] [or1k/] [branches/] [mp3_stable/] [mp3/] [sw/] [mad-xess/] [minimad.c] - Diff between revs 291 and 298

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

Rev 291 Rev 298
Line 14... Line 14...
 *
 *
 * You should have received a copy of the GNU General Public License
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *
 * $Id: minimad.c,v 1.3 2001-11-06 17:01:07 simons Exp $
 * $Id: minimad.c,v 1.4 2001-11-07 10:44:11 simons Exp $
 */
 */
 
 
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "config.h"
#endif
#endif
Line 48... Line 48...
#endif
#endif
 
 
#define SRAM_BASE       0x80000000
#define SRAM_BASE       0x80000000
#define SUCCESS_CODE    0x11223344
#define SUCCESS_CODE    0x11223344
#define REG32(x)        (*(volatile unsigned long *)(x))
#define REG32(x)        (*(volatile unsigned long *)(x))
 
#ifdef OR1K_SIM
 
#define BUTTON_STATE    (0)
 
#else
#define BUTTON_STATE    (!((*((volatile unsigned long *)0x40000000)) & 0x80000000))
#define BUTTON_STATE    (!((*((volatile unsigned long *)0x40000000)) & 0x80000000))
//#define BUTTON_STATE  (0)
#endif
 
 
void report1(unsigned long value)
void report1(unsigned long value)
{
{
        unsigned long spr = 0x1234;
        unsigned long spr = 0x1234;
        asm("l.mtspr\t\t%0,%1,0x0" : : "r" (spr), "r" (value));
        asm("l.mtspr\t\t%0,%1,0x0" : : "r" (spr), "r" (value));

powered by: WebSVN 2.1.0

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