1-------------------------------------------------------------------------------
2--
3-- File: PkgRhPersonality.vhd
4-- Author: National Instruments
5-- Original Project: N32x
6-- Date: 15 Dec 2017
7--
8-------------------------------------------------------------------------------
9-- Copyright 2017 Ettus Research, A National Instruments Company
10-- SPDX-License-Identifier: GPL-3.0
11-------------------------------------------------------------------------------
12--
13-- Purpose: This package contains constants and helpful functions that enable
14--          the FPGA to be compiled with different features.
15--
16-------------------------------------------------------------------------------
17
18library ieee;
19  use ieee.std_logic_1164.all;
20  use ieee.numeric_std.all;
21
22library work;
23  use work.PkgRegs.all;
24
25
26package PkgRhPersonality is
27
28  -- Rhodium daughterboard ID definition.
29  constant kDbId     : integer := 16#152#;
30  constant kDbIdSize : integer := 16;
31
32
33  -- RegPort Address Definitions : ------------------------------------------------------
34  --
35  -- DB Regs ...
36  --
37  -- Clocking             Offset: 0x 000    Width: 0x 200
38  -- Tdco0                Offset: 0x 200    Width: 0x 200
39  -- Tdco1                Offset: 0x 400    Width: 0x 200
40  -- Daughterboard Ctrl   Offset: 0x 600    Width: 0x 200
41  --                                        Total: 0x2000
42  -- JESD 2x - A          Offset: 0x2000    Width: 0x1000
43  -- JESD 2x - B          Offset: 0x3000    Width: 0x1000
44  --                                        Total: 0x4000
45  --                      Total: 0x8000 for two DBs
46  -- ------------------------------------------------------------------------------------
47
48  -- A single RegPort runs to the JESD204B Core.
49  constant kJesdRegGroupInDbRegs          : RegOffset_t := (kOffset => 16#2000#,   -- 0x2000 to
50                                                            kWidth  => 16#1000#);  -- 0x2FFF
51
52  -- DB Regs : --------------------------------------------------------------------------
53  constant kClockingOffsetInEndpoint      : RegOffset_t := (kOffset => 16#0000#,   -- 0x0000 to
54                                                            kWidth  => 16#0200#);  -- 0x01FF
55  constant kTdc0OffsetsInEndpoint         : RegOffset_t := (kOffset => 16#0200#,   -- 0x0200 to
56                                                            kWidth  => 16#0200#);  -- 0x03FF
57  constant kTdc1OffsetsInEndpoint         : RegOffset_t := (kOffset => 16#0400#,   -- 0x0400 to
58                                                            kWidth  => 16#0200#);  -- 0x05FF
59  constant kDaughterboardOffsetInEndpoint : RegOffset_t := (kOffset => 16#0600#,   -- 0x0600 to
60                                                            kWidth  => 16#0200#);  -- 0x07FF
61
62end package PkgRhPersonality;
63