📄 scratchring.h
字号:
;------------------------------------------------------------------------------------
;
; I N T E L P R O P R I E T A R Y
;
; COPYRIGHT (c) 2001 BY INTEL CORPORATION. ALL RIGHTS
; RESERVED. NO PART OF THIS PROGRAM OR PUBLICATION MAY
; BE REPRODUCED, TRANSMITTED, TRANSCRIBED, STORED IN A
; RETRIEVAL SYSTEM, OR TRANSLATED INTO ANY LANGUAGE OR COMPUTER
; LANGUAGE IN ANY FORM OR BY ANY MEANS, ELECTRONIC, MECHANICAL,
; MAGNETIC, OPTICAL, CHEMICAL, MANUAL, OR OTHERWISE, WITHOUT
; THE PRIOR WRITTEN PERMISSION OF :
;
; INTEL CORPORATION
;
; 2200 MISSION COLLEGE BLVD
;
; SANTA CLARA, CALIFORNIA 95052-8119
;
;------------------------------------------------------------------------------------
#ifndef EXAMPLE_SCRATCH_RING_H
#define EXAMPLE_SCRATCH_RING_H
// Ring size [31:30]. Hardware representation
// 00 = 128
// 01 = 256
// 10 = 512
// 11 = 1024
#define RING_SIZE_128 0
#define RING_SIZE_256 1
#define RING_SIZE_512 2
#define RING_SIZE_1024 3
// Valid values for RING_SIZE are 128, 256, 512 or 1024.
#define RING_SIZE 128
// Base Address for Scratch Ring is 0x1000. Should be aligned on a 4 x RING_SIZE byte boundary.
#define RING_BASE 0x1000
// Ring number to use. 0-15.
#define RING_NUMBER 0
// Eventhough 0-15 rings are possible, the "ring full"input state can be used
// only on rings 0-11. i.e SCR_Ring#_Full is valid only for # = 0-11.
#ifdef RING_NUMBER
#if (RING_NUMBER > 11)
#error "For Ring Number Greater than 11, we cannot use the SCR_Ring#_Full input state. Check RING_NUMBER"
#else
#define_eval RING_FULL SCR_Ring/**/RING_NUMBER/**/_Full
#endif
#endif // RING_NUMBER
// Symbolic name for signal 1.
// Once we have the automatic signal allocator, this can be removed
// SIG_WAKE_CONS is used to signal the consumer that the ring full of items to consume.
#define SIG_WAKE_CONS 1
// SIG_WAKE_PROD is used to signal the producer that the ring is empty, so producer can start
// producing
#define SIG_WAKE_PROD 2
#endif //EXAMPLE_SCRATCH_RING_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -