///////////////////////////////////////////////////////////////////////
// >>>>>>>>>>>>>>>>>>>>>>>>> COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<<
// ====================================================================
// Copyright 2002 (c) Lattice Semiconductor Corporation
// ALL RIGHTS RESERVED
//
// This confidential and proprietary software may be used only as
// authorised by a licensing agreement from Lattice Semiconductor
// Corporation.
// The entire notice above must be reproduced on all authorized
// copies and copies may only be made to the extent permitted
// by a licensing agreement from Lattice Semiconductor Corporation.
//

// ====================================================================
// File Details
// ====================================================================
// Project              :       ORSPII
// Filename             :       latspi4_inc.v
// Author               :       Ben_Kerr,bkerr@latticesemi.com
// Created on           :       Monday July 01 2002 (WW26)
// Last Modified By     :       $Author: rproudlo $
// Last Modified On     :       $Date: Thu Sep 26 11:40:09 2002 $ 
// Revision             :       $Revision: 1.6 $
// Status               :       Development
// Dependencies         :       None
//=====================================================================

//=====================================================================
// Description          :
//=====================================================================
// LatSPI4 specific constants. To avoid conflicts, all defines are
// prefixed LATSPI4_.  This file is required by all latspi4 modules.
//=====================================================================

//=====================================================================
// Revision History
//=====================================================================
// $Log: latspi4_inc.v.rca $
// 
//  Revision: 1.6 Thu Sep 26 11:40:09 2002 rproudlo
//  Reduced MB1 and MB2 to 50/30 %
// 
//  Revision: 1.5 Thu Sep 19 09:12:16 2002 rproudlo
//  Test dubug
// 
//  Revision: 1.4 Fri Sep 13 05:15:13 2002 rproudlo
//  Reduced MAXBURST1 & 2 levels
// 
//  Revision: 1.3 Wed Jul 10 12:20:12 2002 bkerr
//  Added DPRAM size and maxburst1 & maxburst2 levels for use by
//  latspi4_tx when dynamically calculating MB1 and MB2
// 
//  Revision: 1.2 Thu Jul  4 12:15:15 2002 bkerr
//  Added minimum SOP->SOP gap time enforcement
// 
//  Revision: 1.1 Tue Jul  2 03:53:50 2002 bkerr
//  Initial creation
//=====================================================================

// SPI4 EOPS values
`define LATSPI4_EOPS_CONT  2'b00
`define LATSPI4_EOPS_ABRT  2'b01
`define LATSPI4_EOPS_2VAL  2'b10
`define LATSPI4_EOPS_1VAL  2'b11

// SPI4 SOP values
`define LATSPI4_SOP        1'b1
`define LATSPI4_NSOP       1'b0

// SPI4 training patterns
`define LATSPI4_TCW        16'h0fff
`define LATSPI4_TDW        16'hf000

// SPI4 FIFO Status encoding
`define LATSPI4_STARVING   2'b00
`define LATSPI4_HUNGRY     2'b01
`define LATSPI4_SATISFIED  2'b10
`define LATSPI4_SYNC       2'b11

// SPI4 minimum cycles between SOPs
`define LATSPI4_MINSOP     8

// Total size of DUT DPRAM in bytes
`define LATSPI4_DPRAM_SIZE 8192

// Percentage level of Maxburst 1 & Maxburst 2 (fraction between 0 & 1)
`define LATSPI4_MAXBURST1_LEVEL 0.50
`define LATSPI4_MAXBURST2_LEVEL 0.30
