Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

sm_mdes.h

Go to the documentation of this file.
00001 /*****************************************************************************\
00002  *      File:   sm_mdes.h
00003  *      Author: John C. Gyllenhaal
00004  *      Creation Date:  March 1996
00005  *      Copyright (c) 1996 John C. Gyllenhaal, Wen-mei Hwu and
00006  *                         The Board of Trustees of the University of Illinois.
00007  *                         All rights reserved.
00008  *      The University of Illinois software License Agreement
00009  *      specifies the terms and conditions for redistribution.
00010 \*****************************************************************************/
00011 
00012 #ifndef SM_MDES_H
00013 #define SM_MDES_H
00014 
00015 #include "md.h"
00016 
00017 typedef struct SM_Resource
00018 {
00019     char                *name;
00020     unsigned int        mask;           /* Bit mask for this resource */
00021     unsigned short      offset;         /* Offset for this resource */
00022 } SM_Resource;
00023 
00024 typedef struct SM_Usage
00025 {
00026     unsigned int        resources_used; /* Bit mask of resources used */
00027     unsigned short      map_offset;     /* Offset into resource map */
00028 } SM_Usage;
00029 
00030 typedef struct SM_Option
00031 {
00032     SM_Usage            *first_usage;   /* Array of resource usages */
00033     SM_Usage            *last_usage;    /* Last usage in above array */
00034 } SM_Option;
00035 
00036 /* Possible names:
00037  * SM_Req SM_Required SM_Use SM_Used SM_Head SM_Tree SM_Node SM_Choice
00038  * SM_Selection
00039  */
00040 typedef struct SM_Choice
00041 {
00042     SM_Option           *first_option;  /* First in an array of options */
00043     SM_Option           *last_option;   /* Last option in above array*/
00044 } SM_Choice;
00045 
00046 typedef struct SM_Table
00047 {
00048     SM_Choice           *first_choice;    /* First in an array of choices*/
00049     SM_Choice           *last_choice;     /* Last choice in above array */
00050     SM_Choice           *slot_choice;     /* Choice that sets slot used */
00051     unsigned short      num_choices;      /* Number of choices (array size) */
00052     unsigned short      *slot_options;    /* Depends on the slot choice */
00053     unsigned short      max_usage_offset; /* Max offset of any usage in table*/
00054 } SM_Table;
00055 
00056 typedef struct SM_Mdes
00057 {
00058     struct Mdes2        *mdes2;                 /* What this was build from */
00059     MD                  *md_mdes;               /* The md version of the mdes*/
00060     SM_Resource         *resource;              /* Array of resources */
00061     unsigned int        num_resources;          /* Size of resource array */
00062     unsigned int        map_width;              /* words/cycle in map */
00063     unsigned int        time_shift;             /* Accounts for map width */
00064     unsigned int        max_num_choices;        /* Max across all tables */
00065 
00066     /*
00067      * Fields below used for building/freeing schedule manager's mdes.
00068      * In general not used directly by the schedule manager.
00069      */
00070     SM_Option           *unit_array;            /* Array of units */
00071     unsigned int        unit_array_size;        /* Size of unit array */
00072     SM_Choice           *choice_array;          /* Array of choices */
00073     unsigned int        choice_array_size;      /* Size of choice array */
00074     SM_Table            *table_array;           /* Array of tables */
00075     unsigned int        table_array_size;       /* Size of table array */
00076     /*
00077      * Fields above used for building/freeing schedule manager's mdes.
00078      * In general not used directly by the schedule manager.
00079      */
00080 } SM_Mdes;
00081 
00082 extern SM_Mdes *SM_build_mdes (struct Mdes2 *mdes2);
00083 
00084 #endif

Generated on Mon Jul 21 20:28:56 2003 for TINKER LEGO DOC by doxygen 1.3.2