Path: blob/main/sys/contrib/alpine-hal/eth/al_hal_eth_alu.h
48255 views
/*******************************************************************************1Copyright (C) 2015 Annapurna Labs Ltd.23This file may be licensed under the terms of the Annapurna Labs Commercial4License Agreement.56Alternatively, this file can be distributed under the terms of the GNU General7Public License V2 as published by the Free Software Foundation and can be8found at http://www.gnu.org/licenses/gpl-2.0.html910Alternatively, redistribution and use in source and binary forms, with or11without modification, are permitted provided that the following conditions are12met:1314* Redistributions of source code must retain the above copyright notice,15this list of conditions and the following disclaimer.1617* Redistributions in binary form must reproduce the above copyright18notice, this list of conditions and the following disclaimer in19the documentation and/or other materials provided with the20distribution.2122THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND23ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED24WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE25DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR26ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES27(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;28LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON29ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT30(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS31SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.3233*******************************************************************************/3435/**36* @defgroup group_eth_alu_api API37* Ethernet Controller generic ALU API38* @ingroup group_eth39* @{40* @file al_hal_eth_alu.h41*42* @brief Header file for control parameters for the generic ALU unit in the Ethernet Datapath for Advanced Ethernet port.43*44*/4546#ifndef __AL_HAL_ETH_ALU_H__47#define __AL_HAL_ETH_ALU_H__4849/* *INDENT-OFF* */50#ifdef __cplusplus51extern "C" {52#endif53/* *INDENT-ON* */5455enum AL_ETH_ALU_OPCODE56{57AL_ALU_FWD_A = 0,58AL_ALU_ARITHMETIC_ADD = 1,59AL_ALU_ARITHMETIC_SUBTRACT = 2,60AL_ALU_BITWISE_AND = 3,61AL_ALU_BITWISE_OR = 4,62AL_ALU_SHIFT_RIGHT_A_BY_B = 5,63AL_ALU_SHIFT_LEFT_A_BY_B = 6,64AL_ALU_BITWISE_XOR = 7,65AL_ALU_FWD_INV_A = 16,66AL_ALU_ARITHMETIC_ADD_INV_A_AND_B = 17,67AL_ALU_ARITHMETIC_SUBTRACT_INV_A_AND_B = 18,68AL_ALU_BITWISE_AND_INV_A_AND_B = 19,69AL_ALU_BITWISE_OR_INV_A_AND_B = 20,70AL_ALU_SHIFT_RIGHT_INV_A_BY_B = 21,71AL_ALU_SHIFT_LEFT_INV_A_BY_B = 22,72AL_ALU_BITWISE_XOR_INV_A_AND_B = 23,73AL_ALU_ARITHMETIC_ADD_A_AND_INV_B = 33,74AL_ALU_ARITHMETIC_SUBTRACT_A_AND_INV_B = 34,75AL_ALU_BITWISE_AND_A_AND_INV_B = 35,76AL_ALU_BITWISE_OR_A_AND_INV_B = 36,77AL_ALU_SHIFT_RIGHT_A_BY_INV_B = 37,78AL_ALU_SHIFT_LEFT_A_BY_INV_B = 38,79AL_ALU_BITWISE_XOR_A_AND_INV_B = 39,80AL_ALU_ARITHMETIC_ADD_INV_A_AND_INV_B = 49,81AL_ALU_ARITHMETIC_SUBTRACT_INV_A_AND = 50,82AL_ALU_BITWISE_AND_INV_A_AND_INV_B = 51,83AL_ALU_BITWISE_OR_INV_A_AND_INV_B = 52,84AL_ALU_SHIFT_RIGHT_INV_A_BY_INV_B = 53,85AL_ALU_SHIFT_LEFT_INV_A_BY_INV_B = 54,86AL_ALU_BITWISE_XOR_INV_A_AND_INV_B = 5587};8889#ifdef __cplusplus90}91#endif92/* *INDENT-ON* */93#endif /* __AL_HAL_ETH_ALU_H__ */94/** @} end of Ethernet group */959697