simos_interface.h 1.35 KB
/*
 * Copyright (C) 1996-1998 by the Board of Trustees
 *    of Leland Stanford Junior University.
 * 
 * This file is part of the SimOS distribution. 
 * See LICENSE file for terms of the license. 
 *
 */

/*****************************************************************
 * interface.h
 * 
 * Author: $author$
 * Date: $date$
 *****************************************************************
 * Simple implementation of DMA transfer:
 *
 * During the DMA transfer, each line generates a call to the memory system,
 * either a GET (DMARead) or a GETX (DMAWrite). The line will then be owned
 * owned by the requesting processor (the one that initiated the IO operation.
 * Unlike calls to the memory system initiated by the CPU, the line does not 
 * end up in the cache hierarchy.
 * *******************************************************************/

#ifndef DISKMODEL_INTERFACE
#define DISKMODEL_INTERFACE

typedef void (*dmaRoutine_t)( int len , SimTime, void (*done)(int), int);
typedef void (*doneRoutine_t) ( int );

extern void DiskModelInit(int maxNumDisk, double scaling);
extern void DiskModelRequest(int machine, int diskNum, int sector,
                             int nsectors, int iswrite, 
                             dmaRoutine_t  dmaRoutine, 
                             doneRoutine_t doneRoutine , int doneArg);

extern void AdvanceTime(void);

#endif