URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 380 to Rev 381
- ↔ Reverse comparison
Rev 380 → Rev 381
/trunk/or1ksim/cpu/or1k/sprs.c
72,7 → 72,7
tt_stopped = 0; |
break; |
case 0x1234: |
printf("MTSPR(0x1234, %x);\n", value); |
printf("MTSPR(0x1234, 0x%x);\n", value); |
break; |
case 0x1235: |
{ |
/trunk/or1ksim/testbench/configure
1693,11 → 1693,13
COMPILE_OR1K=unknown |
|
TESTS_ENV= |
LDFLAGS= |
case $target in |
or1k*|or32*) |
CFLAGS="$CFLAGS -nostdlib" |
CFLAGS="$CFLAGS -nostdlib -mhard-div" |
COMPILE=or1k |
TESTS_ENV="$SIM" |
LDFLAGS="-T${top_srcdir}/except.ld" |
;; |
esac |
echo $TESTS_ENV |
1710,18 → 1712,19
OR1K_EXCEPT_TRUE='#' |
OR1K_EXCEPT_FALSE= |
fi |
CFLAGS="$CFLAGS -Wall -mhard-div" |
CFLAGS="$CFLAGS -Wall" |
|
|
INCLUDES="-I\${top_srcdir}/support" |
|
|
echo $ac_n "checking for working const""... $ac_c" 1>&6 |
echo "configure:1720: checking for working const" >&5 |
echo "configure:1723: checking for working const" >&5 |
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
echo $ac_n "(cached) $ac_c" 1>&6 |
else |
cat > conftest.$ac_ext <<EOF |
#line 1725 "configure" |
#line 1728 "configure" |
#include "confdefs.h" |
|
int main() { |
1770,7 → 1773,7
|
; return 0; } |
EOF |
if { (eval echo configure:1774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
if { (eval echo configure:1777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
rm -rf conftest* |
ac_cv_c_const=yes |
else |
1791,7 → 1794,7
fi |
|
echo $ac_n "checking for inline""... $ac_c" 1>&6 |
echo "configure:1795: checking for inline" >&5 |
echo "configure:1798: checking for inline" >&5 |
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
echo $ac_n "(cached) $ac_c" 1>&6 |
else |
1798,7 → 1801,7
ac_cv_c_inline=no |
for ac_kw in inline __inline__ __inline; do |
cat > conftest.$ac_ext <<EOF |
#line 1802 "configure" |
#line 1805 "configure" |
#include "confdefs.h" |
|
int main() { |
1805,7 → 1808,7
} $ac_kw foo() { |
; return 0; } |
EOF |
if { (eval echo configure:1809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
if { (eval echo configure:1812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
rm -rf conftest* |
ac_cv_c_inline=$ac_kw; break |
else |
/trunk/or1ksim/testbench/Makefile.in
117,17 → 117,13
@OR1K_EXCEPT_TRUE@basic_SOURCES = basic.s spr_defs.h |
@OR1K_EXCEPT_FALSE@basic_SOURCES = |
@OR1K_EXCEPT_TRUE@basic_LDFLAGS = |
@OR1K_EXCEPT_FALSE@basic_LDFLAGS = |
@OR1K_EXCEPT_TRUE@basic_LDADD = |
@OR1K_EXCEPT_FALSE@basic_LDADD = |
@OR1K_EXCEPT_TRUE@cache_SOURCES = $(OR1K_SUPPORT_S) support.h cache.c |
@OR1K_EXCEPT_FALSE@cache_SOURCES = |
@OR1K_EXCEPT_TRUE@excpt_SOURCES = excpt.S spr_defs.h |
@OR1K_EXCEPT_FALSE@excpt_SOURCES = |
@OR1K_EXCEPT_TRUE@excpt_LDFLAGS = |
@OR1K_EXCEPT_FALSE@excpt_LDFLAGS = |
@OR1K_EXCEPT_TRUE@excpt_LDADD = |
@OR1K_EXCEPT_FALSE@excpt_LDADD = |
@OR1K_EXCEPT_TRUE@cfg_SOURCES = cfg.S spr_defs.h |
@OR1K_EXCEPT_FALSE@cfg_SOURCES = |
@OR1K_EXCEPT_TRUE@cfg_LDFLAGS = |
146,7 → 142,7
@OR1K_EXCEPT_FALSE@OR1K_SUPPORT_S = |
|
LDADD = support/libsupport.a |
LDFLAGS = -T${top_srcdir}/except.ld |
LDFLAGS = |
TESTS_ENVIRONMENT = $(SHELL) ${top_srcdir}/test $(TESTS_ENV) |
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs |
190,7 → 186,6
@OR1K_EXCEPT_TRUE@basic_OBJECTS = basic.o |
@OR1K_EXCEPT_FALSE@basic_OBJECTS = |
@OR1K_EXCEPT_TRUE@basic_DEPENDENCIES = |
@OR1K_EXCEPT_FALSE@basic_DEPENDENCIES = |
@OR1K_EXCEPT_TRUE@cache_OBJECTS = except.o cache.o |
@OR1K_EXCEPT_FALSE@cache_OBJECTS = |
cache_LDADD = $(LDADD) |
199,7 → 194,6
@OR1K_EXCEPT_TRUE@excpt_OBJECTS = excpt.o |
@OR1K_EXCEPT_FALSE@excpt_OBJECTS = |
@OR1K_EXCEPT_TRUE@excpt_DEPENDENCIES = |
@OR1K_EXCEPT_FALSE@excpt_DEPENDENCIES = |
@OR1K_EXCEPT_TRUE@cfg_OBJECTS = cfg.o |
@OR1K_EXCEPT_FALSE@cfg_OBJECTS = |
@OR1K_EXCEPT_TRUE@cfg_DEPENDENCIES = |
/trunk/or1ksim/testbench/dhry.c
21,6 → 21,7
#define DLX_FREQ 200 /* in MHz */ |
#define PROC_6 0 |
|
#ifndef strcpy |
char *strcpy (char *dst0, char *src0) |
{ |
char *s = dst0; |
29,7 → 30,9
|
return s; |
} |
#endif |
|
#ifndef strcmp |
int strcmp (const char *s1, const char *s2) |
{ |
char x; |
38,6 → 41,7
|
return (*(unsigned char *) s1) - (*(unsigned char *) s2); |
} |
#endif |
|
#define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080) |
#define UNALIGNED(X, Y) \ |
/trunk/or1ksim/testbench/acv_uart.c
83,8 → 83,7
ASSERT(getreg (UART_LCR) == 0x03); //3 |
ASSERT(getreg (UART_MCR) == 0x00); //4 |
// ASSERT(getreg (UART_LSR) == 0x60); //5 |
// ASSERT(getreg (UART_MSR) == 0xff); //6 |
ASSERT(getreg (UART_MSR) == 0x00); //6 |
// ASSERT(getreg (UART_MSR) == 0x00); //6 |
|
setreg(UART_LCR, LCR_DIVL); //enable latches |
ASSERT(getreg (UART_DLL) == 0x00); //0 |
93,7 → 92,7
} |
|
{ /* test if status registers are read only */ |
unsigned long tmp; |
/*unsigned long tmp; |
int i; |
tmp = getreg (UART_LSR); |
setreg (UART_LSR, ~tmp); |
103,7 → 102,7
setreg (UART_LSR, 1 << i); |
ASSERT(getreg (UART_LSR) == tmp); |
} |
|
*/ |
/*tmp = getreg (UART_MSR); |
setreg (UART_MSR, ~tmp); |
ASSERT(getreg (UART_MSR) == tmp); |
/trunk/or1ksim/testbench/configure.in
50,19 → 50,22
COMPILE_OR1K=unknown |
AC_SUBST(TESTS_ENV) |
TESTS_ENV= |
LDFLAGS= |
case $target in |
or1k*|or32*) |
CFLAGS="$CFLAGS -nostdlib" |
CFLAGS="$CFLAGS -nostdlib -mhard-div" |
COMPILE=or1k |
TESTS_ENV="$SIM" |
LDFLAGS="-T${top_srcdir}/except.ld" |
;; |
esac |
echo $TESTS_ENV |
AM_CONDITIONAL(OR1K_EXCEPT, test x$COMPILE = xor1k) |
CFLAGS="$CFLAGS -Wall -mhard-div" |
CFLAGS="$CFLAGS -Wall" |
|
AC_SUBST(INCLUDES) |
INCLUDES="-I\${top_srcdir}/support" |
AC_SUBST(LDFLAGS) |
|
dnl Checks for typedefs, structures, and compiler characteristics. |
AC_C_CONST |
/trunk/or1ksim/testbench/Makefile.am
65,12 → 65,8
|
##### Platform Dependent Tests - not OR1K ##### |
basic_SOURCES = |
basic_LDFLAGS = |
basic_LDADD = |
cache_SOURCES = |
excpt_SOURCES = |
excpt_LDFLAGS = |
excpt_LDADD = |
cfg_SOURCES = |
pic_SOURCES = |
dmatest_SOURCES = |
95,7 → 91,7
endif |
|
LDADD = support/libsupport.a |
LDFLAGS = -T${top_srcdir}/except.ld |
LDFLAGS = |
TESTS_ENVIRONMENT = $(SHELL) ${top_srcdir}/test $(TESTS_ENV) |
|
again: clean all |
/trunk/or1ksim/testbench/support/Makefile.in
83,6 → 83,7
CFLAGS = @CFLAGS@ |
INCLUDES = @INCLUDES@ |
LD = @LD@ |
LDFLAGS = @LDFLAGS@ |
MAKEINFO = @MAKEINFO@ |
MAKE_SHELL = @MAKE_SHELL@ |
PACKAGE = @PACKAGE@ |
100,7 → 101,6
|
DEFS = @DEFS@ -I. -I$(srcdir) |
CPPFLAGS = @CPPFLAGS@ |
LDFLAGS = @LDFLAGS@ |
LIBS = @LIBS@ |
libsupport_a_LIBADD = |
libsupport_a_OBJECTS = support.o int.o |
/trunk/or1ksim/testbench/support/support.h
6,11 → 6,12
#define SUPPORT_H |
|
#include <stdarg.h> |
#include <_ansi.h> |
#include <stddef.h> |
#include <limits.h> |
|
#if OR1K |
#include <_ansi.h> |
|
void printf(const char *fmt, ...); |
|
/* For writing into SPR. */ |
/trunk/or1ksim/testbench/support/int.c
5,6 → 5,8
#include "spr_defs.h" |
#include "int.h" |
|
#ifdef OR1K |
|
/* Interrupt handlers table */ |
struct ihnd int_handlers[MAX_INT_HANDLERS]; |
|
79,3 → 81,4
} |
} |
|
#endif |
/trunk/or1ksim/testbench/support/support.c
4,6 → 4,7
#include "support.h" |
#include "int.h" |
|
#if OR1K |
void excpt_dummy(); |
void int_main(); |
|
21,7 → 22,6
unsigned long excpt_break = (unsigned long) excpt_dummy; |
unsigned long excpt_trap = (unsigned long) excpt_dummy; |
|
#if OR1K |
|
/* Start function, called by reset exception handler. */ |
void reset () |
95,14 → 95,12
void report(unsigned long value) |
{ |
unsigned long spr = 0x1234; |
printf("l.mtspr %x,%x\n", spr, value); |
return; |
printf("l.mtspr 0x%x, 0x%x\n", (unsigned) spr, (unsigned) value); |
} |
|
/* start_TIMER */ |
void start_timer(int tmrnum) |
{ |
return; |
} |
|
/* read_TIMER */ |
123,7 → 121,7
__const void *__restrict srcvoid, size_t length) |
{ |
char *dst = dstvoid; |
const char *src = srcvoid; |
const char *src = (const char *) srcvoid; |
|
while (length--) |
*dst++ = *src++; |
/trunk/or1ksim/testbench/mul.c
12,9 → 12,9
|
LONGEST acc = 0; |
#define MAC(x,y) {\ |
/*printf ("[%08x,%08x]\t", (unsigned long)(x), (unsigned long)(y));\*/ |
/*printf ("[%08x,%08x]\t", (unsigned long)(x), (unsigned long)(y));*/\ |
acc += (LONGEST)(x) * (LONGEST)(y);\ |
/*printf ("(%08x,%08x)\n", (unsigned long)(acc >> 32), (unsigned long)(acc & 0xffffffff));\*/ |
/*printf ("(%08x,%08x)\n", (unsigned long)(acc >> 32), (unsigned long)(acc & 0xffffffff));*/\ |
} |
#define MACRC (macrc()) |
static inline long macrc() { |
/trunk/or1ksim/vapi/vapi.c
552,7 → 552,7
for (; t; t = t->next) { |
if (!t->fd) { |
numu++; |
if (printout) printf (" %x", t->id); |
if (printout) printf (" 0x%x", t->id); |
} |
} |
return numu; |