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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [or1ksim/] [cuc/] [insn.h] - Diff between revs 932 and 1748

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

Rev 932 Rev 1748
Line 1... Line 1...
/* insn.h -- OpenRISC Custom Unit Compiler, internal instruction definitions
/* insn.h -- OpenRISC Custom Unit Compiler, internal instruction definitions
 *    Copyright (C) 2002 Marko Mlinar, markom@opencores.org
 
 *
 
 *    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 2 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, write to the Free Software
 
 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 
 
 
#ifndef _DF_INSN_
   Copyright (C) 2002 Marko Mlinar, markom@opencores.org
#define _DF_INSN_
   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 INSN__H
 
#define INSN__H
 
 
#include "cuc.h"
#include "cuc.h"
 
 
/* Instruction types */
/* Instruction types */
#define II_ADD   0
#define II_ADD   0
Line 62... Line 69...
#define II_MEM_WIDTH(x) (((x) == II_LB || (x) == II_SB) ? 1 :\
#define II_MEM_WIDTH(x) (((x) == II_LB || (x) == II_SB) ? 1 :\
                         ((x) == II_LH || (x) == II_SH) ? 2 :\
                         ((x) == II_LH || (x) == II_SH) ? 2 :\
                         ((x) == II_LW || (x) == II_SW) ? 4 : -1)
                         ((x) == II_LW || (x) == II_SW) ? 4 : -1)
 
 
/* List of known instructions and their rtl representation */
/* List of known instructions and their rtl representation */
typedef struct {
typedef struct
 
{
        char *name;
        char *name;
        int  comutative;
        int  comutative;
        char *rtl;
        char *rtl;
} cuc_known_insn;
} cuc_known_insn;
 
 
extern const cuc_known_insn known[II_LAST + 1];
extern const cuc_known_insn known[II_LAST + 1];
 
 
/* Timing table -- same indexes as known table */
/* Timing table -- same indexes as known table */
typedef struct {
typedef struct
 
{
        double delay;
        double delay;
        double size;
        double size;
        double delayi;
        double delayi;
        double sizei;
        double sizei;
} cuc_timing_table;
} cuc_timing_table;
 
 
/* Conversion links */
/* Conversion links */
typedef struct {
typedef struct
 
{
        const char *from;
        const char *from;
        const int to;
        const int to;
} cuc_conv;
} cuc_conv;
 
 
/* normal (not immediate) size of a function */
/* normal (not immediate) size of a function */
Line 105... Line 115...
void load_timing_table (char *filename);
void load_timing_table (char *filename);
 
 
/* Displays shared instructions */
/* Displays shared instructions */
void print_shared (cuc_func *rf, cuc_shared_item *shared, int nshared);
void print_shared (cuc_func *rf, cuc_shared_item *shared, int nshared);
 
 
#endif /* _DF_INSN_ */
#endif  /* INSN__H */
 
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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