# Copyright 2023 Dual Tachyon
# https://github.com/DualTachyon
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[CRC]
@ = 0x40003000, 0x800

CR = 0x0000
> CRC_EN, 0, 1
= DISABLE, 0
= ENABLE, 1

> INPUT_REV, 1, 1
= NORMAL, 0
= REVERSED, 1

> INPUT_INV, 2, 2
= NORMAL, 0
= BIT_INVERTED, 1
= BYTE_INVERTED, 2
= BIT_BYTE_INVERTED, 3

> OUTPUT_REV, 4, 1
= NORMAL, 0
= REVERSED, 1

> OUTPUT_INV, 5, 2
= NORMAL, 0
= BIT_INVERTED, 1
= BYTE_INVERTED, 2
= BIT_BYTE_INVERTED, 3

> DATA_WIDTH, 7, 2
= 32, 0
= 16, 1
= 8, 2

> CRC_SEL, 9, 2
= CRC_16_CCITT, 0
= CRC_8_ATM, 1
= CRC_16, 2
= CRC_32_IEEE802_3, 3

IV = 0x0004
DATAIN = 0x0008
DATAOUT = 0x000C