cachemgr.h
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:3k
- /****************************************************************************************
- * Copyright (c) 2002 ZORAN Corporation, All Rights Reserved
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
- *
- * File: $Workfile: cachemgr.h $
- *
- * Description:
- * ============
- *
- *
- * Log:
- * ====
- * $Revision: 5 $
- * Last Modified by $Author: Leonh $ at $Modtime: 11/24/03 7:57a $
- ****************************************************************************************
- * Updates:
- ****************************************************************************************
- * $Log: /I76/I76_Common/I76_Reference/Playcore/ScPad/cachemgr.h $
- *
- * 5 11/24/03 8:03a Leonh
- * change the cache size after caculate
- *
- * 4 11/18/03 3:53p Leonh
- * adjust the cache size to avoid scratch pad crash
- *
- * 3 10/20/03 11:43a Leslie
- * update the change from I64
- *
- * 7 10/17/03 6:35p Leonh
- * clean up code and avoid psn error
- *
- * 6 03-09-26 18:25 Angieh
- * Add prototype.
- *
- * 5 9/25/03 3:48p Leonh
- * Fix the psn error
- *
- * 4 9/24/03 4:59p Leonh
- * Added prototype
- *
- * 3 9/24/03 3:37p Leonh
- * Added prototype
- *
- * 2 9/19/03 8:02p Leonh
- * avoid cache beyond SDRAM range
- *
- * 1 03-07-09 10:22 Leonh
- * cache enable
- *
- * 3 23/04/02 9:36 Nirm
- * - Added dependency in "Config.h".
- *
- * 2 9/01/02 16:53 Nirm
- * Corrected Include-Paths.
- ****************************************************************************************/
- #include "Config.h" // Global Configuration - do not remove!
- #ifndef __CACHEMGR_H
- #define __CACHEMGR_H
- #include "Includesysdefs.h"
- typedef struct
- {
- DWORD tag;
- BYTE prev;
- BYTE next;
- }TAG_LIST_ITEM;
- #ifdef NEW_2X16M_MAPPING
- #define CACHE_NBR_SLOT 71UL//JaneG_2004_0903:SC_FOR_CLIPS/DISC CACHE reduced to 143k, change from 73UL ->71UL,
- #else
- #define CACHE_NBR_SLOT 96UL//LeonH_0919_2003_a:notice: not let cache address crash scratch pad address for 32M SDRAM Mapping
- #endif
- BOOL dc_cache_sector( DWORD lbn);
- BYTE dc_cache_hit( DWORD lbn);
- BOOL cache_GetBytes(DWORD l_lbn, DWORD l_Offset, WORD i_NbrBytes, BYTE *buff);
- BOOL sc_CopyFromCache( DWORD dw_lbn, DWORD dw_offset, WORD n_byte_count, WORD sc_handle );
- void slot_list_move2head( BYTE slot_id);
- void slot_list_test(void);
- DWORD slot_get_tag( BYTE slot_id);
- void slot_set_tag( BYTE slot_id, DWORD lbn);
- void sc_cache_getBytes( DWORD sc_handle, WORD i_byte_offset, WORD i_byte_count, BYTE *p_buff );
- //<<<LeonH_0924_2003_a: Added prototype
- BOOL dc_cache_GetData( DWORD lbn, DWORD offset, WORD bytes, BYTE *buffer );
- BOOL dc_cache_PreCacheData( DWORD l_lbn, DWORD l_Offset, WORD i_NbrBytes );
- BOOL dc_cache_CacheData( DWORD lbn, DWORD offset, WORD bytes , WORD sc_handle );
- void dc_cache_init(void);
- //>>>LeonH_0924_2003_a: Added prototype
- #endif //__CACHEMGR_H