OpenCores
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-or1k/eth
    from Rev 110 to Rev 112
    Reverse comparison

Rev 110 → Rev 112

/Makefile.in
72,7 → 72,7
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am_eth_OBJECTS = eth-eth.$(OBJEXT)
am_eth_OBJECTS = eth.$(OBJEXT)
eth_OBJECTS = $(am_eth_OBJECTS)
eth_DEPENDENCIES = ../except/except.lo ../support/libsupport.la
eth_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
210,8 → 210,10
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
eth_SOURCES = eth.c
eth_CPPFLAGS = -I$(srcdir)/../../../peripheral
eth_SOURCES = eth.c \
eth.h \
fields.h
 
eth_LDFLAGS = -T$(srcdir)/../default.ld
eth_LDADD = ../except/except.lo \
../support/libsupport.la
269,7 → 271,7
distclean-compile:
-rm -f *.tab.c
 
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eth-eth.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eth.Po@am__quote@
 
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
292,20 → 294,6
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
 
eth-eth.o: eth.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(eth_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eth-eth.o -MD -MP -MF $(DEPDIR)/eth-eth.Tpo -c -o eth-eth.o `test -f 'eth.c' || echo '$(srcdir)/'`eth.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/eth-eth.Tpo $(DEPDIR)/eth-eth.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eth.c' object='eth-eth.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(eth_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eth-eth.o `test -f 'eth.c' || echo '$(srcdir)/'`eth.c
 
eth-eth.obj: eth.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(eth_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eth-eth.obj -MD -MP -MF $(DEPDIR)/eth-eth.Tpo -c -o eth-eth.obj `if test -f 'eth.c'; then $(CYGPATH_W) 'eth.c'; else $(CYGPATH_W) '$(srcdir)/eth.c'; fi`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/eth-eth.Tpo $(DEPDIR)/eth-eth.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eth.c' object='eth-eth.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(eth_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eth-eth.obj `if test -f 'eth.c'; then $(CYGPATH_W) 'eth.c'; else $(CYGPATH_W) '$(srcdir)/eth.c'; fi`
 
mostlyclean-libtool:
-rm -f *.lo
 
/Makefile.am
27,7 → 27,9
# A test program of the OR1K Ethernet
check_PROGRAMS = eth
 
eth_SOURCES = eth.c
eth_SOURCES = eth.c \
eth.h \
fields.h
 
eth_LDFLAGS = -T$(srcdir)/../default.ld
 
/fields.h
0,0 → 1,64
/* fields.h -- Some macros to help with bit field definitions
 
Copyright (C) 2001 by Erez Volk, erez@opencores.org
Copyright (C) 2008 Embecosm Limited
 
Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
 
This file is part of Or1ksim, the 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 program is commented throughout in a fashion suitable for processing
with Doxygen. */
 
 
#ifndef FIELDS__H
#define FIELDS__H
 
 
/* Macros to get/set a field in a register
* Example:
* unsigned long done, priority, channel_csr;
*
* priority = GET_FIELD( channel_csr, DMA_CH_CSR, PRIORITY );
* SET_FIELD( channel_csr, DMA_CH_CSR, PRIORITY, priority );
*
* done = TEST_FLAG( channel_csr, DMA_CH_CSR, DONE );
* SET_FLAG( channel_csr, DMA_CH_CSR, DONE );
* CLEAR_FLAG( channel_csr, DMA_CH_CSR, DONE );
* ASSIGN_FLAG( channel_csr, DMA_CH_CSR, done );
*
* For each field, we then define e.g.
* #define DMA_CH_CSR_PRIORITY_OFFSET 13
* #define DMA_CH_CSR_PRIORITY_WIDTH 3 // not needed for flags, which always have width = 1
*/
 
#define FLAG_SHIFT(reg_name,flag_name) (reg_name##_##flag_name##_OFFSET)
#define FLAG_MASK(reg_name,flag_name) (1LU << reg_name##_##flag_name##_OFFSET)
 
#define TEST_FLAG(reg_value,reg_name,flag_name) (((reg_value ) >> reg_name##_##flag_name##_OFFSET) & 1LU)
#define SET_FLAG(reg_value,reg_name,flag_name) { (reg_value) |= 1LU << reg_name##_##flag_name##_OFFSET; }
#define CLEAR_FLAG(reg_value,reg_name,flag_name) { (reg_value) &= ~(1LU << reg_name##_##flag_name##_OFFSET); }
#define ASSIGN_FLAG(reg_value,reg_name,flag_name,flag_value) { \
(reg_value) = flag_value ? ((reg_value) | (1LU << reg_name##_##flag_name##_OFFSET)) : ((reg_value) & ~(1LU << reg_name##_##flag_name##_OFFSET)); }
 
#define FIELD_SHIFT(reg_name,field_name) (reg_name##_##field_name##_OFFSET)
#define FIELD_MASK(reg_name,field_name) ((~(~0LU << reg_name##_##field_name##_WIDTH)) << reg_name##_##field_name##_OFFSET)
 
#define GET_FIELD(reg_value,reg_name,field_name) (((reg_value) >> reg_name##_##field_name##_OFFSET) & (~(~0LU << reg_name##_##field_name##_WIDTH)))
#define SET_FIELD(reg_value,reg_name,field_name,field_value) { \
(reg_value) = ((reg_value) & ~((~(~0LU << reg_name##_##field_name##_WIDTH)) << reg_name##_##field_name##_OFFSET)) | ((field_value) << reg_name##_##field_name##_OFFSET); }
 
#endif /* FIELDS__H */
fields.h 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

powered by: WebSVN 2.1.0

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