cachemgr.h
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:3k
源码类别:

DVD

开发平台:

Others

  1. /****************************************************************************************
  2.  *  Copyright (c) 2002 ZORAN Corporation, All Rights Reserved
  3.  *  THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
  4.  *
  5.  *  File: $Workfile: cachemgr.h $             
  6.  *
  7.  * Description: 
  8.  * ============
  9.  * 
  10.  * 
  11.  * Log:
  12.  * ====
  13.  * $Revision: 5 $
  14.  * Last Modified by $Author: Leonh $ at $Modtime: 11/24/03 7:57a $ 
  15.  ****************************************************************************************
  16.  * Updates:
  17.  ****************************************************************************************
  18.  * $Log: /I76/I76_Common/I76_Reference/Playcore/ScPad/cachemgr.h $
  19.  * 
  20.  * 5     11/24/03 8:03a Leonh
  21.  * change the cache size after caculate
  22.  * 
  23.  * 4     11/18/03 3:53p Leonh
  24.  * adjust the cache size to avoid scratch pad crash
  25.  * 
  26.  * 3     10/20/03 11:43a Leslie
  27.  * update the change from I64
  28.  * 
  29.  * 7     10/17/03 6:35p Leonh
  30.  * clean up code and avoid psn error
  31.  * 
  32.  * 6     03-09-26 18:25 Angieh
  33.  * Add prototype.
  34.  * 
  35.  * 5     9/25/03 3:48p Leonh
  36.  * Fix the psn error
  37.  * 
  38.  * 4     9/24/03 4:59p Leonh
  39.  * Added prototype
  40.  * 
  41.  * 3     9/24/03 3:37p Leonh
  42.  * Added prototype
  43.  * 
  44.  * 2     9/19/03 8:02p Leonh
  45.  * avoid cache beyond SDRAM range 
  46.  * 
  47.  * 1     03-07-09 10:22 Leonh
  48.  * cache enable
  49.  * 
  50.  * 3     23/04/02 9:36 Nirm
  51.  * - Added dependency in "Config.h".
  52.  * 
  53.  * 2     9/01/02 16:53 Nirm
  54.  * Corrected Include-Paths.
  55.  ****************************************************************************************/
  56. #include "Config.h" // Global Configuration - do not remove!
  57. #ifndef __CACHEMGR_H
  58. #define __CACHEMGR_H
  59. #include "Includesysdefs.h"
  60. typedef struct
  61. {
  62. DWORD tag;
  63. BYTE    prev;
  64. BYTE    next;
  65. }TAG_LIST_ITEM;
  66. #ifdef NEW_2X16M_MAPPING
  67. #define CACHE_NBR_SLOT 71UL//JaneG_2004_0903:SC_FOR_CLIPS/DISC CACHE reduced to 143k, change from 73UL ->71UL,
  68. #else
  69. #define CACHE_NBR_SLOT 96UL//LeonH_0919_2003_a:notice: not let cache address crash scratch pad address for 32M SDRAM Mapping
  70. #endif
  71. BOOL dc_cache_sector( DWORD lbn);
  72. BYTE dc_cache_hit( DWORD lbn);
  73. BOOL cache_GetBytes(DWORD l_lbn, DWORD l_Offset, WORD i_NbrBytes, BYTE *buff);
  74. BOOL sc_CopyFromCache( DWORD dw_lbn, DWORD dw_offset, WORD n_byte_count, WORD sc_handle );
  75. void slot_list_move2head( BYTE slot_id);
  76. void slot_list_test(void);
  77. DWORD slot_get_tag( BYTE slot_id);
  78. void slot_set_tag( BYTE slot_id, DWORD lbn);
  79. void  sc_cache_getBytes( DWORD sc_handle, WORD i_byte_offset, WORD i_byte_count, BYTE *p_buff );
  80. //<<<LeonH_0924_2003_a: Added prototype
  81. BOOL dc_cache_GetData( DWORD lbn, DWORD offset, WORD bytes, BYTE *buffer );
  82. BOOL dc_cache_PreCacheData( DWORD l_lbn, DWORD l_Offset, WORD i_NbrBytes );
  83. BOOL dc_cache_CacheData( DWORD lbn, DWORD offset, WORD  bytes , WORD sc_handle );
  84. void dc_cache_init(void);
  85. //>>>LeonH_0924_2003_a: Added prototype
  86. #endif //__CACHEMGR_H