URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/trunk/or1ksim/testsuite/test-code
- from Rev 91 to Rev 93
- ↔ Reverse comparison
Rev 91 → Rev 93
/Makefile.in
247,7 → 247,10
top_build_prefix = @top_build_prefix@ |
top_builddir = @top_builddir@ |
top_srcdir = @top_srcdir@ |
SUBDIRS = lib-iftest |
SUBDIRS = lib-iftest \ |
lib-inttest \ |
lib-upcalls |
|
all: all-recursive |
|
.SUFFIXES: |
/lib-upcalls/Makefile.in
0,0 → 1,515
# Makefile.in generated by automake 1.11.1 from Makefile.am. |
# @configure_input@ |
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, |
# Inc. |
# This Makefile.in is free software; the Free Software Foundation |
# gives unlimited permission to copy and/or distribute it, |
# with or without modifications, as long as this notice is preserved. |
|
# This program is distributed in the hope that it will be useful, |
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
# PARTICULAR PURPOSE. |
|
@SET_MAKE@ |
|
# Makefile.am for libor1ksim test program: lib-upcalls |
|
# Copyright (C) Embecosm Limited, 2010 |
|
# Contributor Jeremy Bennett <jeremy.bennett@embecosm.com> |
|
# This file is part of OpenRISC 1000 Architectural Simulator. |
|
# This program is free software; you can redistribute it and/or modify it |
# under the terms of the GNU General Public License as published by the Free |
# Software Foundation; either version 3 of the License, or (at your option) |
# any later version. |
|
# This program is distributed in the hope that it will be useful, but WITHOUT |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
# more details. |
|
# You should have received a copy of the GNU General Public License along |
# with this program. If not, see <http:#www.gnu.org/licenses/>. */ |
|
# ----------------------------------------------------------------------------- |
# This code is commented throughout for use with Doxygen. |
# ----------------------------------------------------------------------------- |
VPATH = @srcdir@ |
pkgdatadir = $(datadir)/@PACKAGE@ |
pkgincludedir = $(includedir)/@PACKAGE@ |
pkglibdir = $(libdir)/@PACKAGE@ |
pkglibexecdir = $(libexecdir)/@PACKAGE@ |
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd |
install_sh_DATA = $(install_sh) -c -m 644 |
install_sh_PROGRAM = $(install_sh) -c |
install_sh_SCRIPT = $(install_sh) -c |
INSTALL_HEADER = $(INSTALL_DATA) |
transform = $(program_transform_name) |
NORMAL_INSTALL = : |
PRE_INSTALL = : |
POST_INSTALL = : |
NORMAL_UNINSTALL = : |
PRE_UNINSTALL = : |
POST_UNINSTALL = : |
build_triplet = @build@ |
host_triplet = @host@ |
target_triplet = @target@ |
check_PROGRAMS = lib-upcalls$(EXEEXT) |
subdir = testsuite/test-code/lib-upcalls |
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in |
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ |
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ |
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ |
$(top_srcdir)/configure.ac |
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
$(ACLOCAL_M4) |
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs |
CONFIG_HEADER = $(top_builddir)/config.h |
CONFIG_CLEAN_FILES = |
CONFIG_CLEAN_VPATH_FILES = |
am_lib_upcalls_OBJECTS = lib-upcalls.$(OBJEXT) |
lib_upcalls_OBJECTS = $(am_lib_upcalls_OBJECTS) |
lib_upcalls_DEPENDENCIES = $(top_builddir)/libsim.la |
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) |
depcomp = $(SHELL) $(top_srcdir)/depcomp |
am__depfiles_maybe = depfiles |
am__mv = mv -f |
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ |
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) |
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ |
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) |
CCLD = $(CC) |
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ |
$(LDFLAGS) -o $@ |
SOURCES = $(lib_upcalls_SOURCES) |
DIST_SOURCES = $(lib_upcalls_SOURCES) |
ETAGS = etags |
CTAGS = ctags |
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
ACLOCAL = @ACLOCAL@ |
AMTAR = @AMTAR@ |
AR = @AR@ |
ARFLAGS = @ARFLAGS@ |
AUTOCONF = @AUTOCONF@ |
AUTOHEADER = @AUTOHEADER@ |
AUTOMAKE = @AUTOMAKE@ |
AWK = @AWK@ |
BUILD_DIR = @BUILD_DIR@ |
CC = @CC@ |
CCAS = @CCAS@ |
CCASDEPMODE = @CCASDEPMODE@ |
CCASFLAGS = @CCASFLAGS@ |
CCDEPMODE = @CCDEPMODE@ |
CFLAGS = @CFLAGS@ |
CPP = @CPP@ |
CPPFLAGS = @CPPFLAGS@ |
CPU_ARCH = @CPU_ARCH@ |
CYGPATH_W = @CYGPATH_W@ |
DEBUGFLAGS = @DEBUGFLAGS@ |
DEFS = @DEFS@ |
DEJAGNU = @DEJAGNU@ |
DEPDIR = @DEPDIR@ |
DSYMUTIL = @DSYMUTIL@ |
DUMPBIN = @DUMPBIN@ |
ECHO_C = @ECHO_C@ |
ECHO_N = @ECHO_N@ |
ECHO_T = @ECHO_T@ |
EGREP = @EGREP@ |
EXEEXT = @EXEEXT@ |
FGREP = @FGREP@ |
GREP = @GREP@ |
INCLUDES = @INCLUDES@ |
INSTALL = @INSTALL@ |
INSTALL_DATA = @INSTALL_DATA@ |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
LD = @LD@ |
LDFLAGS = @LDFLAGS@ |
LIBOBJS = @LIBOBJS@ |
LIBS = @LIBS@ |
LIBTOOL = @LIBTOOL@ |
LIPO = @LIPO@ |
LN_S = @LN_S@ |
LOCAL_CFLAGS = @LOCAL_CFLAGS@ |
LOCAL_DEFS = @LOCAL_DEFS@ |
LOCAL_LDFLAGS = @LOCAL_LDFLAGS@ |
LTLIBOBJS = @LTLIBOBJS@ |
MAKEINFO = @MAKEINFO@ |
MKDIR_P = @MKDIR_P@ |
NM = @NM@ |
NMEDIT = @NMEDIT@ |
OBJDUMP = @OBJDUMP@ |
OBJEXT = @OBJEXT@ |
OTOOL = @OTOOL@ |
OTOOL64 = @OTOOL64@ |
PACKAGE = @PACKAGE@ |
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ |
PACKAGE_NAME = @PACKAGE_NAME@ |
PACKAGE_STRING = @PACKAGE_STRING@ |
PACKAGE_TARNAME = @PACKAGE_TARNAME@ |
PACKAGE_VERSION = @PACKAGE_VERSION@ |
PATH_SEPARATOR = @PATH_SEPARATOR@ |
POW_LIB = @POW_LIB@ |
RANLIB = @RANLIB@ |
SED = @SED@ |
SET_MAKE = @SET_MAKE@ |
SHELL = @SHELL@ |
STRIP = @STRIP@ |
SUMVERSION = @SUMVERSION@ |
TERMCAP_LIB = @TERMCAP_LIB@ |
VERSION = @VERSION@ |
abs_builddir = @abs_builddir@ |
abs_srcdir = @abs_srcdir@ |
abs_top_builddir = @abs_top_builddir@ |
abs_top_srcdir = @abs_top_srcdir@ |
ac_ct_CC = @ac_ct_CC@ |
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ |
am__include = @am__include@ |
am__leading_dot = @am__leading_dot@ |
am__quote = @am__quote@ |
am__tar = @am__tar@ |
am__untar = @am__untar@ |
bindir = @bindir@ |
build = @build@ |
build_alias = @build_alias@ |
build_cpu = @build_cpu@ |
build_os = @build_os@ |
build_vendor = @build_vendor@ |
builddir = @builddir@ |
datadir = @datadir@ |
datarootdir = @datarootdir@ |
docdir = @docdir@ |
dvidir = @dvidir@ |
exec_prefix = @exec_prefix@ |
host = @host@ |
host_alias = @host_alias@ |
host_cpu = @host_cpu@ |
host_os = @host_os@ |
host_vendor = @host_vendor@ |
htmldir = @htmldir@ |
includedir = @includedir@ |
infodir = @infodir@ |
install_sh = @install_sh@ |
libdir = @libdir@ |
libexecdir = @libexecdir@ |
localedir = @localedir@ |
localstatedir = @localstatedir@ |
lt_ECHO = @lt_ECHO@ |
mandir = @mandir@ |
mkdir_p = @mkdir_p@ |
oldincludedir = @oldincludedir@ |
pdfdir = @pdfdir@ |
prefix = @prefix@ |
program_transform_name = @program_transform_name@ |
psdir = @psdir@ |
sbindir = @sbindir@ |
sharedstatedir = @sharedstatedir@ |
srcdir = @srcdir@ |
subdirs = @subdirs@ |
sysconfdir = @sysconfdir@ |
target = @target@ |
target_alias = @target_alias@ |
target_cpu = @target_cpu@ |
target_os = @target_os@ |
target_vendor = @target_vendor@ |
top_build_prefix = @top_build_prefix@ |
top_builddir = @top_builddir@ |
top_srcdir = @top_srcdir@ |
|
# Edge based interrupt |
lib_upcalls_SOURCES = lib-upcalls.c |
lib_upcalls_LDADD = $(top_builddir)/libsim.la |
all: all-am |
|
.SUFFIXES: |
.SUFFIXES: .c .lo .o .obj |
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) |
@for dep in $?; do \ |
case '$(am__configure_deps)' in \ |
*$$dep*) \ |
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ |
&& { if test -f $@; then exit 0; else break; fi; }; \ |
exit 1;; \ |
esac; \ |
done; \ |
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/test-code/lib-upcalls/Makefile'; \ |
$(am__cd) $(top_srcdir) && \ |
$(AUTOMAKE) --gnu testsuite/test-code/lib-upcalls/Makefile |
.PRECIOUS: Makefile |
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
@case '$?' in \ |
*config.status*) \ |
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ |
*) \ |
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ |
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ |
esac; |
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) |
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
|
$(top_srcdir)/configure: $(am__configure_deps) |
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
$(ACLOCAL_M4): $(am__aclocal_m4_deps) |
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
$(am__aclocal_m4_deps): |
|
clean-checkPROGRAMS: |
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ |
echo " rm -f" $$list; \ |
rm -f $$list || exit $$?; \ |
test -n "$(EXEEXT)" || exit 0; \ |
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ |
echo " rm -f" $$list; \ |
rm -f $$list |
lib-upcalls$(EXEEXT): $(lib_upcalls_OBJECTS) $(lib_upcalls_DEPENDENCIES) |
@rm -f lib-upcalls$(EXEEXT) |
$(LINK) $(lib_upcalls_OBJECTS) $(lib_upcalls_LDADD) $(LIBS) |
|
mostlyclean-compile: |
-rm -f *.$(OBJEXT) |
|
distclean-compile: |
-rm -f *.tab.c |
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-upcalls.Po@am__quote@ |
|
.c.o: |
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< |
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
@am__fastdepCC_FALSE@ $(COMPILE) -c $< |
|
.c.obj: |
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` |
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` |
|
.c.lo: |
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< |
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ |
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< |
|
mostlyclean-libtool: |
-rm -f *.lo |
|
clean-libtool: |
-rm -rf .libs _libs |
|
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) |
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
unique=`for i in $$list; do \ |
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ |
done | \ |
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \ |
END { if (nonempty) { for (i in files) print i; }; }'`; \ |
mkid -fID $$unique |
tags: TAGS |
|
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ |
$(TAGS_FILES) $(LISP) |
set x; \ |
here=`pwd`; \ |
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
unique=`for i in $$list; do \ |
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ |
done | \ |
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \ |
END { if (nonempty) { for (i in files) print i; }; }'`; \ |
shift; \ |
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ |
test -n "$$unique" || unique=$$empty_fix; \ |
if test $$# -gt 0; then \ |
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ |
"$$@" $$unique; \ |
else \ |
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ |
$$unique; \ |
fi; \ |
fi |
ctags: CTAGS |
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ |
$(TAGS_FILES) $(LISP) |
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
unique=`for i in $$list; do \ |
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ |
done | \ |
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \ |
END { if (nonempty) { for (i in files) print i; }; }'`; \ |
test -z "$(CTAGS_ARGS)$$unique" \ |
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ |
$$unique |
|
GTAGS: |
here=`$(am__cd) $(top_builddir) && pwd` \ |
&& $(am__cd) $(top_srcdir) \ |
&& gtags -i $(GTAGS_ARGS) "$$here" |
|
distclean-tags: |
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags |
|
distdir: $(DISTFILES) |
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ |
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ |
list='$(DISTFILES)'; \ |
dist_files=`for file in $$list; do echo $$file; done | \ |
sed -e "s|^$$srcdirstrip/||;t" \ |
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ |
case $$dist_files in \ |
*/*) $(MKDIR_P) `echo "$$dist_files" | \ |
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ |
sort -u` ;; \ |
esac; \ |
for file in $$dist_files; do \ |
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ |
if test -d $$d/$$file; then \ |
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ |
if test -d "$(distdir)/$$file"; then \ |
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ |
fi; \ |
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ |
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ |
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ |
fi; \ |
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ |
else \ |
test -f "$(distdir)/$$file" \ |
|| cp -p $$d/$$file "$(distdir)/$$file" \ |
|| exit 1; \ |
fi; \ |
done |
check-am: all-am |
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) |
check: check-am |
all-am: Makefile |
installdirs: |
install: install-am |
install-exec: install-exec-am |
install-data: install-data-am |
uninstall: uninstall-am |
|
install-am: all-am |
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am |
|
installcheck: installcheck-am |
install-strip: |
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ |
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ |
`test -z '$(STRIP)' || \ |
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install |
mostlyclean-generic: |
|
clean-generic: |
|
distclean-generic: |
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) |
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) |
|
maintainer-clean-generic: |
@echo "This command is intended for maintainers to use" |
@echo "it deletes files that may require special tools to rebuild." |
clean: clean-am |
|
clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ |
mostlyclean-am |
|
distclean: distclean-am |
-rm -rf ./$(DEPDIR) |
-rm -f Makefile |
distclean-am: clean-am distclean-compile distclean-generic \ |
distclean-tags |
|
dvi: dvi-am |
|
dvi-am: |
|
html: html-am |
|
html-am: |
|
info: info-am |
|
info-am: |
|
install-data-am: |
|
install-dvi: install-dvi-am |
|
install-dvi-am: |
|
install-exec-am: |
|
install-html: install-html-am |
|
install-html-am: |
|
install-info: install-info-am |
|
install-info-am: |
|
install-man: |
|
install-pdf: install-pdf-am |
|
install-pdf-am: |
|
install-ps: install-ps-am |
|
install-ps-am: |
|
installcheck-am: |
|
maintainer-clean: maintainer-clean-am |
-rm -rf ./$(DEPDIR) |
-rm -f Makefile |
maintainer-clean-am: distclean-am maintainer-clean-generic |
|
mostlyclean: mostlyclean-am |
|
mostlyclean-am: mostlyclean-compile mostlyclean-generic \ |
mostlyclean-libtool |
|
pdf: pdf-am |
|
pdf-am: |
|
ps: ps-am |
|
ps-am: |
|
uninstall-am: |
|
.MAKE: check-am install-am install-strip |
|
.PHONY: CTAGS GTAGS all all-am check check-am clean \ |
clean-checkPROGRAMS clean-generic clean-libtool ctags \ |
distclean distclean-compile distclean-generic \ |
distclean-libtool distclean-tags distdir dvi dvi-am html \ |
html-am info info-am install install-am install-data \ |
install-data-am install-dvi install-dvi-am install-exec \ |
install-exec-am install-html install-html-am install-info \ |
install-info-am install-man install-pdf install-pdf-am \ |
install-ps install-ps-am install-strip installcheck \ |
installcheck-am installdirs maintainer-clean \ |
maintainer-clean-generic mostlyclean mostlyclean-compile \ |
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ |
tags uninstall uninstall-am |
|
|
# Tell versions [3.59,3.63) of GNU make to not export all variables. |
# Otherwise a system limit (for SysV at least) may be exceeded. |
.NOEXPORT: |
/lib-upcalls/lib-upcalls.c
0,0 → 1,376
/* lib-upcalls.c. Test of Or1ksim library upcall interface. |
|
Copyright (C) 1999-2006 OpenCores |
Copyright (C) 2010 Embecosm Limited |
|
Contributors various OpenCores participants |
Contributor Jeremy Bennett <jeremy.bennett@embecosm.com> |
|
This file is part of OpenRISC 1000 Architectural Simulator. |
|
This program is free software; you can redistribute it and/or modify it |
under the terms of the GNU General Public License as published by the Free |
Software Foundation; either version 3 of the License, or (at your option) |
any later version. |
|
This program is distributed in the hope that it will be useful, but WITHOUT |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
more details. |
|
You should have received a copy of the GNU General Public License along |
with this program. If not, see <http: www.gnu.org/licenses/>. */ |
|
/* ---------------------------------------------------------------------------- |
This code is commented throughout for use with Doxygen. |
--------------------------------------------------------------------------*/ |
|
#include <errno.h> |
#include <stddef.h> |
#include <stdlib.h> |
#include <stdio.h> |
#include <string.h> |
|
#include "or1ksim.h" |
|
|
/*! Memory mapped register memory */ |
static unsigned char *regv; |
|
/*! Number of bytes of register memory */ |
static int regc; |
|
/*! Number of times each upcall has been called */ |
static int upcall_count; |
|
|
/* --------------------------------------------------------------------------*/ |
/*!Read upcall |
|
Upcall from Or1ksim to read a word from an external peripheral. Read the |
specified bytes from the peripheral if available. |
|
We only ever expect to get 4 byte reads here (modeling Wishbone). |
|
@note We receive the full address, since there is a single upcall routine, |
and this allows us to decode between potentially multiple devices. |
|
@todo We assume that the register memory size is a power of 2, making |
address shortening a simple modulo exercise. We should use a more |
generic solution. |
|
@note The mask is a byte mask. Since this is testing, we warn if any byte |
is not either 0xff or 0x00. |
|
@param[in] class_ptr A handle pass back from the initalization. Intended |
for C++ callers, not used here. |
@param[in] addr Address to read from. |
@param[in] mask Byte mask for the read. |
@param[out] rdata Buffer for the data read. |
@param[in] data_len Number of bytes in mask and rdata. |
|
@return Zero on success, non-zero on failure. */ |
/* --------------------------------------------------------------------------*/ |
static int |
read_upcall (void *class_ptr, |
unsigned long int addr, |
unsigned char mask[], |
unsigned char rdata[], |
int data_len) |
{ |
unsigned long int devaddr = addr % regc; |
|
upcall_count--; /* One less upcall to do */ |
|
if (4 != data_len) |
{ |
printf ("Warning: 4-byte reads only supported for this device.\n"); |
return -1; |
} |
|
if (devaddr > regc - data_len) |
{ |
printf ("Warning: read from 0x%08lx out of range: zero result.\n", |
devaddr); |
return -1; |
} |
|
/* Read the data */ |
int i; |
|
for (i = 0; i < 4; i++) |
{ |
switch (mask[i]) |
{ |
case 0x00: rdata[i] = 0; break; |
case 0xff: rdata[i] = regv[devaddr + i]; break; |
|
default: |
printf ("Warning: invalid mask byte %d for read 0x%02x: " |
"treated as 0xff.\n", i, mask[i]); |
rdata[i] = regv[devaddr + i]; |
break; |
} |
} |
|
/* printf ("Read from 0x%08lx: vector [%02x %02x %02x %02x ], " */ |
/* "mask [%02x %02x %02x %02x ].\n", devaddr, rdata[0], rdata[1], */ |
/* rdata[2], rdata[3], mask[0], mask[1], mask[2], mask[3]); */ |
|
return 0; /* Success */ |
|
} /* read_upcall () */ |
|
|
/* --------------------------------------------------------------------------*/ |
/*!Write upcall |
|
Upcall from Or1ksim to write a word to an external peripheral. Read the |
specified bytes from the peripheral if available. |
|
We only ever expect to get 4 byte reads here (modeling Wishbone). |
|
@note We receive the full address, since there is a single upcall routine, |
and this allows us to decode between potentially multiple devices. |
|
@todo We assume that the register memory size is a power of 2, making |
address shortening a simple modulo exercise. We should use a more |
generic solution. |
|
@note The mask is a byte mask. Since this is testing, we warn if any byte |
is not either 0xff or 0x00. |
|
@param[in] class_ptr A handle pass back from the initalization. Intended |
for C++ callers, not used here. |
@param[in] addr Address to write to. |
@param[in] mask Byte mask for the write. |
@param[in] wdata The data to write. |
@param[in] data_len Number of bytes in mask and rdata. |
|
@return Zero on success, non-zero on failure. */ |
/* --------------------------------------------------------------------------*/ |
static int |
write_upcall (void *class_ptr, |
unsigned long int addr, |
unsigned char mask[], |
unsigned char wdata[], |
int data_len) |
{ |
unsigned long int devaddr = addr % regc; |
|
upcall_count--; /* One less upcall to do */ |
|
if (4 != data_len) |
{ |
printf ("Warning: 4-byte writes only supported for this device.\n"); |
return -1; |
} |
|
if (devaddr > regc - data_len) |
{ |
printf ("Warning: write to 0x%08lx out of range: ignored.\n", |
devaddr); |
return -1; |
} |
|
/* printf ("Write to 0x%08lx: vector [%02x %02x %02x %02x ], " */ |
/* "mask [%02x %02x %02x %02x ].\n", devaddr, wdata[0], wdata[1], */ |
/* wdata[2], wdata[3], mask[0], mask[1], mask[2], mask[3]); */ |
|
/* Write the data */ |
int i; |
|
for (i = 0; i < 4; i++) |
{ |
switch (mask[i]) |
{ |
case 0x00: break; |
case 0xff: regv[devaddr + i] = wdata[i]; break; |
|
default: |
printf ("Warning: invalid mask byte %d for write 0x%02x: " |
"treated as 0xff.\n", i, mask[i]); |
regv[devaddr + i] = wdata[i]; |
break; |
} |
} |
|
return 0; /* Success */ |
|
} /* write_upcall () */ |
|
|
/* --------------------------------------------------------------------------*/ |
/*!Main program |
|
Build an or1ksim program using the library which loads a program and config |
from the command line which will drive upcalls. |
|
lib-upcalls <config-file> <image> <upcall_count> <reg_bytes> [<reg_file>] |
|
A register memory of <reg_bytes> bytes is initalized from <reg_file> if |
present, or zeroed if not. <image> is run continuously, making upcalls, |
which are satisfied using the register memory. The program exits |
successfully when <upcall_count> upcalls have been made. |
|
@note The endianness is specified on the command line, rather than being |
read from the or1ksim library, to allow tests for mismatched |
assumptions when using the library. |
|
@param[in] argc Number of elements in argv |
@param[in] argv Vector of program name and arguments |
|
@return Return code for the program. */ |
/* --------------------------------------------------------------------------*/ |
int |
main (int argc, |
char *argv[]) |
{ |
char *reg_file; |
|
/* Parse args */ |
switch (argc) |
{ |
case 5: |
reg_file = NULL; |
break; |
|
case 6: |
reg_file = argv[5]; |
break; |
|
default: |
printf ("usage: lib-upcalls <config-file> <image> " |
"<upcall_count> <reg_bytes> [<reg_file>]\n"); |
return 1; |
} |
|
upcall_count = atoi (argv[3]); |
|
if (upcall_count <= 0) |
{ |
printf ("ERROR: Upcall count must be positive\n"); |
return 1; |
} |
|
regc = atoi (argv[4]); |
|
if (regc < 0) |
{ |
printf ("ERROR: Register memory size must be positive\n"); |
return 1; |
} |
|
/* Read the register file if provided. */ |
regv = malloc (regc * sizeof (unsigned char)); |
|
if (NULL == regv) |
{ |
printf ("ERROR: Failed to allocate register memory\n"); |
return 1; |
} |
|
int next_free_byte = 0; |
|
if (NULL != reg_file) |
{ |
FILE *fd = fopen (reg_file, "r"); |
|
if (NULL == fd) |
{ |
printf ("ERROR: Failed to open register file: %s\n", |
strerror (errno)); |
free (regv); |
return 1; |
} |
|
for (; next_free_byte < regc; next_free_byte++) |
{ |
unsigned char byte; |
|
if (1 == fscanf (fd, "%2hhx ", &byte)) |
{ |
regv[next_free_byte] = byte; |
} |
else |
{ |
break; |
} |
} |
|
/* Should have read the whole file successfully. */ |
if (ferror (fd)) |
{ |
printf ("ERROR: Reading register file: %s\n", strerror (errno)); |
free (regv); |
return 1; |
} |
|
if (!feof (fd)) |
{ |
printf ("Warning: additional register file data ignored.\n"); |
} |
|
if (0 != fclose (fd)) |
{ |
printf ("ERROR: Failed to close register file: %s\n", |
strerror (errno)); |
free (regv); |
return 1; |
} |
} |
|
/* Fill in any remaining bytes with zero */ |
if (next_free_byte < regc) |
{ |
(void)memset (&(regv[next_free_byte]), 0, regc - next_free_byte); |
} |
|
/* Initialize the program. Put the initialization message afterwards, or it |
will get swamped by the Or1ksim header. */ |
if (0 == or1ksim_init (argv[1], argv[2], NULL, &read_upcall, &write_upcall)) |
{ |
printf ("Initalization succeeded.\n"); |
} |
else |
{ |
printf ("Initalization failed.\n"); |
return 1; |
} |
|
/* Run repeatedly for 1 millisecond until we hit a breakpoint or all upcalls |
are done. */ |
do |
{ |
switch (or1ksim_run (1.0e-3)) |
{ |
case OR1KSIM_RC_OK: |
break; |
|
case OR1KSIM_RC_BRKPT: |
printf ("Test completed successfully: hit breakpoint.\n"); |
return 0; |
|
default: |
printf ("ERROR: run failed\n"); |
return 1; |
} |
} |
while (upcall_count > 0); |
|
/* A little longer to allow response to last upcall to be handled. */ |
switch (or1ksim_run (1.0e-3)) |
{ |
case OR1KSIM_RC_OK: |
printf ("Test completed successfully: All upcalls processed.\n"); |
return 0; |
|
case OR1KSIM_RC_BRKPT: |
printf ("Test completed successfully: hit breakpoint.\n"); |
return 0; |
|
default: |
printf ("ERROR: run failed\n"); |
return 1; |
} |
} /* main () */ |
lib-upcalls/lib-upcalls.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: lib-upcalls/Makefile.am
===================================================================
--- lib-upcalls/Makefile.am (nonexistent)
+++ lib-upcalls/Makefile.am (revision 93)
@@ -0,0 +1,33 @@
+# Makefile.am for libor1ksim test program: lib-upcalls
+
+# Copyright (C) Embecosm Limited, 2010
+
+# Contributor Jeremy Bennett
+
+# This file is part of OpenRISC 1000 Architectural Simulator.
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3 of the License, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see . */
+
+# -----------------------------------------------------------------------------
+# This code is commented throughout for use with Doxygen.
+# -----------------------------------------------------------------------------
+
+
+# A generic program to handle upcalls.
+check_PROGRAMS = lib-upcalls
+
+# Edge based interrupt
+lib_upcalls_SOURCES = lib-upcalls.c
+
+lib_upcalls_LDADD = $(top_builddir)/libsim.la
lib-upcalls/Makefile.am
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: Makefile.am
===================================================================
--- Makefile.am (revision 91)
+++ Makefile.am (revision 93)
@@ -26,4 +26,6 @@
# Subdirs for each test program.
-SUBDIRS = lib-iftest
+SUBDIRS = lib-iftest \
+ lib-inttest \
+ lib-upcalls
/lib-inttest/lib-inttest-edge.c
0,0 → 1,216
/* lib-inttest-edge.c. Test of Or1ksim library edge triggered interrupt funcs. |
|
Copyright (C) 1999-2006 OpenCores |
Copyright (C) 2010 Embecosm Limited |
|
Contributors various OpenCores participants |
Contributor Jeremy Bennett <jeremy.bennett@embecosm.com> |
|
This file is part of OpenRISC 1000 Architectural Simulator. |
|
This program is free software; you can redistribute it and/or modify it |
under the terms of the GNU General Public License as published by the Free |
Software Foundation; either version 3 of the License, or (at your option) |
any later version. |
|
This program is distributed in the hope that it will be useful, but WITHOUT |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
more details. |
|
You should have received a copy of the GNU General Public License along |
with this program. If not, see <http: www.gnu.org/licenses/>. */ |
|
/* ---------------------------------------------------------------------------- |
This code is commented throughout for use with Doxygen. |
--------------------------------------------------------------------------*/ |
|
#include <stdlib.h> |
#include <stdio.h> |
|
#include "or1ksim.h" |
|
|
/*! Number of interrupts in PIC */ |
#define NUM_INTS 32 |
|
/*! Globally shared pointer to the interrupts */ |
char **intv; |
|
/*! Number of interrupts to process */ |
int intc; |
|
|
/* --------------------------------------------------------------------------*/ |
/*!Trigger the next interrupt |
|
Generate the next edge triggered interrupt. Put out a message if doing so, |
and warn if the interrupt would be invalid. |
|
@return 1 (true) if an interrupt was triggered, 0 (false) otherwise. */ |
/* --------------------------------------------------------------------------*/ |
static int |
do_next_int () |
{ |
static int next_int = 0; /* Next interrupt to process */ |
|
while (next_int < intc) |
{ |
int inum = atoi (intv[next_int++]); |
|
if ((0 <= inum) && (inum < NUM_INTS)) |
{ |
printf ("Triggering interrupt %d\n", inum); |
or1ksim_interrupt (inum); |
return 1; |
} |
else |
{ |
printf ("Warning: Invalid interrupt # %d - ignored\n", inum); |
} |
} |
|
return 0; /* No more interrupts to trigger */ |
|
} /* do_next_int () */ |
|
|
/* --------------------------------------------------------------------------*/ |
/*!Read upcall |
|
Upcall from Or1ksim to read a word from an external peripheral. If called |
this will trigger an interrupt. |
|
@param[in] class_ptr A handle pass back from the initalization. Intended |
for C++ callers, not used here. |
@param[in] addr Address to read from. Ignored here. |
@param[in] mask Byte mask for the read. Ignored here. |
@param[out] rdata Buffer for the data read. Ignored here. |
@param[in] data_len Number of bytes in mask and rdata. |
|
@return Zero on success, non-zero on failure. Always zero here. */ |
/* --------------------------------------------------------------------------*/ |
static int |
read_upcall (void *class_ptr, |
unsigned long int addr, |
unsigned char mask[], |
unsigned char rdata[], |
int data_len) |
{ |
do_next_int (); |
|
return 0; /* Success */ |
|
} /* read_upcall () */ |
|
|
/* --------------------------------------------------------------------------*/ |
/*!Write upcall |
|
Upcall from Or1ksim to write a word to an external peripheral. If called |
this will trigger an interrupt. |
|
@param[in] class_ptr A handle pass back from the initalization. Intended |
for C++ callers, not used here. |
@param[in] addr Address to write to. Ignored here. |
@param[in] mask Byte mask for the write. Ignored here. |
@param[in] wdata The data to write. Ignored here. |
@param[in] data_len Number of bytes in mask and rdata. |
|
@return Zero on success, non-zero on failure. Always zero here. */ |
/* --------------------------------------------------------------------------*/ |
static int |
write_upcall (void *class_ptr, |
unsigned long int addr, |
unsigned char mask[], |
unsigned char wdata[], |
int data_len) |
{ |
do_next_int (); |
|
return 0; /* Success */ |
|
} /* write_upcall () */ |
|
|
/* --------------------------------------------------------------------------*/ |
/*!Main program |
|
Build an or1ksim program using the library which loads a program and config |
from the command line, and then drives interrupts. Usage: |
|
lib-inttest-edge <config-file> <image> <duration_ms> <int #> <int #> ... |
|
<image> is run for repeated perios of <duration_ms>, during which it |
will make upcalls. Between each period and during each upcall an edge based |
interrupt will be triggered, until all interrupts listed have been |
triggered. |
|
@param[in] argc Number of elements in argv |
@param[in] argv Vector of program name and arguments |
|
@return Return code for the program. */ |
/* --------------------------------------------------------------------------*/ |
int |
main (int argc, |
char *argv[]) |
{ |
/* Parse args */ |
if (argc < 5) |
{ |
fprintf (stderr, |
"usage: lib-inttest-edge <config-file> <image> <duration_ms> " |
"<int #> <int #> ...\n"); |
return 1; |
} |
|
int duration_ms = atoi (argv[3]); |
double duration = (double) duration_ms / 1.0e3; |
|
if (duration_ms <= 0) |
{ |
fprintf (stderr, "ERROR. Duration must be positive number of ms\n"); |
return 1; |
} |
|
/* Initialize the program. Put the initialization message afterwards, or it |
will get swamped by the Or1ksim header. */ |
if (0 == or1ksim_init (argv[1], argv[2], NULL, &read_upcall, &write_upcall)) |
{ |
printf ("Initalization succeeded.\n"); |
} |
else |
{ |
printf ("Initalization failed.\n"); |
return 1; |
} |
|
/* Do each interrupt in turn. Set up the shared pointer to the interrupts |
and counter. */ |
intv = &(argv[4]); |
intc = argc - 4; |
|
do |
{ |
/* Run the code */ |
if (OR1KSIM_RC_OK != or1ksim_run (duration)) |
{ |
printf ("ERROR: run failed\n"); |
return 1; |
} |
} |
while (do_next_int ()); |
|
/* One more run, to allow interrupt handler enough time to finish |
processing. */ |
if (OR1KSIM_RC_OK != or1ksim_run (duration)) |
{ |
printf ("ERROR: run failed\n"); |
return 1; |
} |
|
/* All interrupts should have been handled. */ |
printf ("Test completed successfully.\n"); |
return 0; |
|
} /* main () */ |
lib-inttest/lib-inttest-edge.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: lib-inttest/Makefile.in
===================================================================
--- lib-inttest/Makefile.in (nonexistent)
+++ lib-inttest/Makefile.in (revision 93)
@@ -0,0 +1,527 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Makefile.am for libor1ksim test program: lib-inttest
+
+# Copyright (C) Embecosm Limited, 2010
+
+# Contributor Jeremy Bennett
+
+# This file is part of OpenRISC 1000 Architectural Simulator.
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3 of the License, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see . */
+
+# -----------------------------------------------------------------------------
+# This code is commented throughout for use with Doxygen.
+# -----------------------------------------------------------------------------
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+check_PROGRAMS = lib-inttest-edge$(EXEEXT) lib-inttest-level$(EXEEXT)
+subdir = testsuite/test-code/lib-inttest
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am_lib_inttest_edge_OBJECTS = lib-inttest-edge.$(OBJEXT)
+lib_inttest_edge_OBJECTS = $(am_lib_inttest_edge_OBJECTS)
+lib_inttest_edge_DEPENDENCIES = $(top_builddir)/libsim.la
+am_lib_inttest_level_OBJECTS = lib-inttest-level.$(OBJEXT)
+lib_inttest_level_OBJECTS = $(am_lib_inttest_level_OBJECTS)
+lib_inttest_level_DEPENDENCIES = $(top_builddir)/libsim.la
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(lib_inttest_edge_SOURCES) $(lib_inttest_level_SOURCES)
+DIST_SOURCES = $(lib_inttest_edge_SOURCES) \
+ $(lib_inttest_level_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_DIR = @BUILD_DIR@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPU_ARCH = @CPU_ARCH@
+CYGPATH_W = @CYGPATH_W@
+DEBUGFLAGS = @DEBUGFLAGS@
+DEFS = @DEFS@
+DEJAGNU = @DEJAGNU@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INCLUDES = @INCLUDES@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCAL_CFLAGS = @LOCAL_CFLAGS@
+LOCAL_DEFS = @LOCAL_DEFS@
+LOCAL_LDFLAGS = @LOCAL_LDFLAGS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POW_LIB = @POW_LIB@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SUMVERSION = @SUMVERSION@
+TERMCAP_LIB = @TERMCAP_LIB@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Edge based interrupt
+lib_inttest_edge_SOURCES = lib-inttest-edge.c
+lib_inttest_edge_LDADD = $(top_builddir)/libsim.la
+
+# Level based interrupt
+lib_inttest_level_SOURCES = lib-inttest-level.c
+lib_inttest_level_LDADD = $(top_builddir)/libsim.la
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/test-code/lib-inttest/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu testsuite/test-code/lib-inttest/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+lib-inttest-edge$(EXEEXT): $(lib_inttest_edge_OBJECTS) $(lib_inttest_edge_DEPENDENCIES)
+ @rm -f lib-inttest-edge$(EXEEXT)
+ $(LINK) $(lib_inttest_edge_OBJECTS) $(lib_inttest_edge_LDADD) $(LIBS)
+lib-inttest-level$(EXEEXT): $(lib_inttest_level_OBJECTS) $(lib_inttest_level_DEPENDENCIES)
+ @rm -f lib-inttest-level$(EXEEXT)
+ $(LINK) $(lib_inttest_level_OBJECTS) $(lib_inttest_level_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-inttest-edge.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib-inttest-level.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool ctags \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: lib-inttest/lib-inttest-level.c
===================================================================
--- lib-inttest/lib-inttest-level.c (nonexistent)
+++ lib-inttest/lib-inttest-level.c (revision 93)
@@ -0,0 +1,295 @@
+/* lib-inttest-level.c. Test of Or1ksim library level triggered interrupt funcs.
+
+ Copyright (C) 1999-2006 OpenCores
+ Copyright (C) 2010 Embecosm Limited
+
+ Contributors various OpenCores participants
+ Contributor Jeremy Bennett
+
+ This file is part of OpenRISC 1000 Architectural Simulator.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program. If not, see . */
+
+/* ----------------------------------------------------------------------------
+ This code is commented throughout for use with Doxygen.
+ --------------------------------------------------------------------------*/
+
+#include
+#include
+#include
+
+#include "or1ksim.h"
+
+
+/*! Number of interrupts in PIC */
+#define NUM_INTS 32
+
+/*! Vector of interrupts to be raised */
+static int *raisev;
+
+/*! Count of interrupts to be raised */
+static int raisec = 0;
+
+/*! Next interrupt to be raised */
+static int next_raise = 0;
+
+/*! Vector of interrupts to be cleared */
+static int *clearv;
+
+/*! Count of interrupts to be cleared */
+static int clearc = 0;
+
+/*! Next interrupt to be cleared */
+static int next_clear = 0;
+
+
+/* --------------------------------------------------------------------------*/
+/*!Read upcall
+
+ Upcall from Or1ksim to read a word from an external peripheral. If called
+ this will raise the next interrupt.
+
+ @param[in] class_ptr A handle pass back from the initalization. Intended
+ for C++ callers, not used here.
+ @param[in] addr Address to read from. Ignored here.
+ @param[in] mask Byte mask for the read. Ignored here.
+ @param[out] rdata Buffer for the data read. Ignored here.
+ @param[in] data_len Number of bytes in mask and rdata.
+
+ @return Zero on success, non-zero on failure. Always zero here. */
+/* --------------------------------------------------------------------------*/
+static int
+read_upcall (void *class_ptr,
+ unsigned long int addr,
+ unsigned char mask[],
+ unsigned char rdata[],
+ int data_len)
+{
+ /* Raise an interrupt if there is one left to raise. */
+ if ((NULL != raisev) && (next_raise < raisec))
+ {
+ printf ("Raising interrupt %d\n", raisev[next_raise]);
+ or1ksim_interrupt_set (raisev[next_raise++]);
+ }
+
+ return 0; /* Success */
+
+} /* read_upcall () */
+
+
+/* --------------------------------------------------------------------------*/
+/*!Write upcall
+
+ Upcall from Or1ksim to write a word to an external peripheral. If called
+ this will clear the next interrupt.
+
+ @param[in] class_ptr A handle pass back from the initalization. Intended
+ for C++ callers, not used here.
+ @param[in] addr Address to write to. Ignored here.
+ @param[in] mask Byte mask for the write. Ignored here.
+ @param[in] wdata The data to write. Ignored here.
+ @param[in] data_len Number of bytes in mask and rdata.
+
+ @return Zero on success, non-zero on failure. Always zero here. */
+/* --------------------------------------------------------------------------*/
+static int
+write_upcall (void *class_ptr,
+ unsigned long int addr,
+ unsigned char mask[],
+ unsigned char wdata[],
+ int data_len)
+{
+ /* Clear an interrupt if there is one left to clear. */
+ if ((NULL != clearv) && (next_clear < clearc))
+ {
+ printf ("Clearing interrupt %d\n", clearv[next_clear]);
+ or1ksim_interrupt_clear (clearv[next_clear++]);
+ }
+
+ return 0; /* Success */
+
+} /* write_upcall () */
+
+
+/* --------------------------------------------------------------------------*/
+/*!Main program
+
+ Build an or1ksim program using the library which loads a program and config
+ from the command line, and then drives interrupts. Usage:
+
+ lib-inttest-level +|- +|- ...
+
+ is run continuously. It requests that an interrupt be raised by a
+ read upcall and cleared by a write upcall. The sequence of interrupts is
+ specified to be raised (if preceded by '+') or cleared (if preceded by
+ '-'). This allows the program to test the effect of clearing the wrong
+ interrupt.
+
+ @param[in] argc Number of elements in argv
+ @param[in] argv Vector of program name and arguments
+
+ @return Return code for the program. */
+/* --------------------------------------------------------------------------*/
+int
+main (int argc,
+ char *argv[])
+{
+ /* Parse args */
+ if (argc < 4)
+ {
+ fprintf (stderr,
+ "usage: lib-inttest-level "
+ "+|- +|- ...\n");
+ return 1;
+ }
+
+ /* Get all the interrupts sorted out. Count them, then place them in a
+ vector. */
+ int i;
+
+ for (i = 3; i < argc; i++)
+ {
+ int inum;
+
+ switch (argv[i][0])
+ {
+ case '+':
+ inum = atoi (&(argv[i][1]));
+
+ if ((0 <= inum) && (inum < NUM_INTS))
+ {
+ raisec++;
+ }
+ else
+ {
+ printf ("Warning: Invalid interrupt # %d to raise.\n", inum);
+ }
+
+ break;
+
+ case '-':
+ inum = atoi (&(argv[i][1]));
+
+ if ((0 <= inum) && (inum < NUM_INTS))
+ {
+ clearc++;
+ }
+ else
+ {
+ printf ("Warning: Invalid interrupt # %d to clear.\n", inum);
+ }
+
+ break;
+
+
+ default:
+ printf ("Warning: No raise/clear specified - ignored\n");
+ break;
+ }
+ }
+
+ if ((0 == raisec) && (0 == clearc))
+ {
+ printf ("ERROR: No interrupts specified.\n");
+ return 1;
+ }
+
+ /* Allocate space and populate the vectors. */
+ raisev = (raisec > 0) ? calloc (raisec, sizeof (int)) : NULL;
+ clearv = (clearc > 0) ? calloc (clearc, sizeof (int)) : NULL;
+
+ raisec = 0;
+ clearc = 0;
+
+ for (i = 3; i < argc; i++)
+ {
+ int inum;
+
+ switch (argv[i][0])
+ {
+ case '+':
+ inum = atoi (&(argv[i][1]));
+
+ if ((0 <= inum) && (inum < NUM_INTS))
+ {
+ raisev[raisec++] = inum;
+ }
+
+ break;
+
+ case '-':
+ inum = atoi (&(argv[i][1]));
+
+ if ((0 <= inum) && (inum < NUM_INTS))
+ {
+ clearv[clearc++] = inum;
+ }
+
+ break;
+
+
+ default:
+ printf ("Warning: No raise/clear specified - ignored\n");
+ break;
+ }
+ }
+
+ /* Start the counts */
+ next_raise = 0;
+ next_clear = 0;
+
+ /* Initialize the program. Put the initialization message afterwards, or it
+ will get swamped by the Or1ksim header. */
+ if (0 == or1ksim_init (argv[1], argv[2], NULL, &read_upcall, &write_upcall))
+ {
+ printf ("Initalization succeeded.\n");
+ }
+ else
+ {
+ printf ("Initalization failed.\n");
+ free (raisev);
+ free (clearv);
+ return 1;
+ }
+
+ /* Run in bursts of 1ms until all interrupts have been set and cleared. */
+ do
+ {
+ if (OR1KSIM_RC_OK != or1ksim_run (1.0e-3))
+ {
+ printf ("ERROR: run failed\n");
+ free (raisev);
+ free (clearv);
+ return 1;
+ }
+ }
+ while ((next_raise < raisec) || (next_clear < clearc));
+
+ /* One more burst to allow the device driver time to complete. */
+ if (OR1KSIM_RC_OK != or1ksim_run (1.0e-3))
+ {
+ printf ("ERROR: run failed\n");
+ free (raisev);
+ free (clearv);
+ return 1;
+ }
+
+ /* All interrupts should have been handled. */
+ free (raisev);
+ free (clearv);
+
+ printf ("Test completed successfully.\n");
+ return 0;
+
+} /* main () */
lib-inttest/lib-inttest-level.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: lib-inttest/Makefile.am
===================================================================
--- lib-inttest/Makefile.am (nonexistent)
+++ lib-inttest/Makefile.am (revision 93)
@@ -0,0 +1,40 @@
+# Makefile.am for libor1ksim test program: lib-inttest
+
+# Copyright (C) Embecosm Limited, 2010
+
+# Contributor Jeremy Bennett
+
+# This file is part of OpenRISC 1000 Architectural Simulator.
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3 of the License, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see . */
+
+# -----------------------------------------------------------------------------
+# This code is commented throughout for use with Doxygen.
+# -----------------------------------------------------------------------------
+
+
+# Test programs of the library interrupt driving functions. Two versions, one
+# to drive edge based interrupts, one to drive level based interrupts.
+check_PROGRAMS = lib-inttest-edge \
+ lib-inttest-level
+
+# Edge based interrupt
+lib_inttest_edge_SOURCES = lib-inttest-edge.c
+
+lib_inttest_edge_LDADD = $(top_builddir)/libsim.la
+
+# Level based interrupt
+lib_inttest_level_SOURCES = lib-inttest-level.c
+
+lib_inttest_level_LDADD = $(top_builddir)/libsim.la
lib-inttest/Makefile.am
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property