RCMS.xcc
Benoit Dupont de Dinechin (Benoit.Dupont-de-Dinechinst.com). Frederic Brault (frederic.braultinria.fr).
Copyright 2008 STMicroelectronics. Copyright 2008 INRIA Orsay
This program is free software; you can redistribute it and/or modify it under the terms of either (at your option): the GNU General Public License (GPL) version 2; the GNU Lesser General Public License (LGPL) version 2.1; any later version of these licences as published by the Free Software Foundation.
RCMSStatus— Enumerate the RCMS statuses.
typedef enum { RCMSStatus_Success, RCMSStatus_Failure, } RCMSStatus;
RCMSNodeType— Enumerate the RCMS node types.
typedef enum { RCMSNodeType_Root, // Root node in case of margins. RCMSNodeType_Dummy, // Dummy node such as START and STOP. RCMSNodeType_Actual, // Actual node to schedule. RCMSNodeType_Killer, // Lifetime killer node. RCMSNodeType__ } RCMSNodeType; extern const char * RCMSNodeType_name_(RCMSNodeType this);
RCMSArcType— Enumerate the RCMS arc types.
typedef enum { RCMSArcType_Relax, // Relaxed dependence arc. RCMSArcType_Flow, // Flow dependence arc. RCMSArcType_Anti, // Anti dependence arc. RCMSArcType_Output, // Output dependence arc. RCMSArcType_Life, // Consumer to killer arc. RCMSArcType_Link, // Producer to killer arc. RCMSArcType_Reuse, // Register reuse arc. RCMSArcType_Some, // Some dependence arc. RCMSArcType_Margin, // Margin-enforcing arc. RCMSArcType__ } RCMSArcType; extern const char * RCMSArcType_name_(RCMSArcType this);
RCMSCallback— Callback structure for the RCMS. Context to provide as first argument to RCMSCallback methods.Add an arc to the LAO graph from RCMS.regFileId is 0 if arc type is RCMSArcType_Other. Freeze a node at the date tau + II*phi. typedef struct RCMSCallback_ { void Context; RCMSStatus (AddArc)(void context, RCMSNodeId source_nodeId, RCMSNodeId target_nodeId, RCMSArcType arcType, RCMSRegFileId regFileId, int latency, int distance); RCMSStatus (FreezeNode)(void *context, RCMSNodeId nodeId, int tau, int phi); } RCMSCallback_, *RCMSCallback;
RCMSInterface— Interface structure for the RCMS. First function to call.options is a string formatted like the RCMS command line.
- Return
- RCMSStatus.
- Make a new resource of the given name and the number of available units.Return
- RCMSResourceId. Make a new reservation table of the given name and provide the firstnum_entries of the table, assuming column order. The rows correspond to the resources previously declared by MakeResource.
- Return
- RCMSReservationId.
- Make a new RegFile of the given name and the number of allocatable registers.Return
- RCMSRegFileId. Make a new dependence node with num_write writes to allocatable registers.The variable argument list is an array of num_write RCMSRegFileId(s).
- Return
- RCMSNodeId. Make a new dependence arc with given type and destination Regfile.regFileId is 0 if arc type is RCMSArcType_Other.
- Return
- RCMSArcId. Call RCMS, giving it a minimum II, a latency and distance for the time horizon,and a callback structure.
- Return
- The new minimum II.
- Close RCMS after each Process.Return
- RCMSStatus. The current size of struct RCMSInterface_, for compatibility checking. typedef struct RCMSInterface_ { RCMSStatus (*Open)(const char *procedure_name, const char *label_name, const char options); RCMSResourceId (MakeResource)(const char name, int num_available); RCMSReservationId (MakeReservation)(const char name, int num_entries, int entries[]); RCMSRegFileId (MakeRegFile)(const char name, int num_allocatable); RCMSNodeId (MakeNode)(RCMSReservationId reservationId, RCMSNodeType nodeType, int num_write, RCMSRegFileId regFileIds[], const char operator); RCMSArcId (MakeArc)(RCMSNodeId source_nodeId, RCMSNodeId target_nodeId, RCMSArcType arcType, RCMSRegFileId regFileId, int latency, int distance, const char temporary); int (Process)(int minII, int latency, int distance, RCMSCallback callback); RCMSStatus (*Close)(void); size_t SizeOf; } RCMSInterface_, *RCMSInterface;