1 | library IEEE;
|
2 | use IEEE.STD_LOGIC_1164.ALL;
|
3 | use IEEE.NUMERIC_STD.ALL;
|
4 |
|
5 | entity test_record is
|
6 | end test_record;
|
7 |
|
8 | architecture tb of test_record is
|
9 |
|
10 | type TPhOptions is record
|
11 | sigPrintheadKCE : std_logic;
|
12 | sigPH_PICAIIRohm : std_logic;
|
13 | sigReg_Chan_Offs_6 : std_logic_vector( 7 downto 0);
|
14 | sigReg_Chan_Offs_5 : std_logic_vector( 7 downto 0);
|
15 | sigReg_Chan_Offs_4 : std_logic_vector( 7 downto 0);
|
16 | sigReg_Chan_Offs_3 : std_logic_vector( 7 downto 0);
|
17 | sigReg_Chan_Offs_2 : std_logic_vector( 7 downto 0);
|
18 | sigReg_Chan_Offs_1 : std_logic_vector( 7 downto 0);
|
19 | sigReg_Words_Per_Ch : std_logic_vector( 7 downto 0);
|
20 | sigReg_LineOffs : std_logic_vector( 7 downto 0);
|
21 | sigSPI_Clk_Duration : std_logic_vector( 3 downto 0);
|
22 | sigSPI_Clk_Duty : std_logic_vector( 3 downto 0);
|
23 | sigSPI_DataSwitch : std_logic_vector( 3 downto 0);
|
24 | Bit16perLine : std_logic_vector( 7 downto 0);
|
25 | sigEnableChannel : std_logic_vector( 5 downto 0);
|
26 | REG_Latch_Setup_Time : std_logic_vector( 7 downto 0);
|
27 | REG_Latch_End_Time : std_logic_vector( 7 downto 0);
|
28 | REG_Strobe_Setup_Time : std_logic_vector( 7 downto 0);
|
29 | REG_Burn_Prescaler : std_logic_vector( 7 downto 0);
|
30 | sigReg_HeadFill32 : std_logic_vector( 7 downto 0);
|
31 | end record;
|
32 |
|
33 | signal REC : TPhOptions;
|
34 |
|
35 | constant REC_LEN : integer :=
|
36 | 1 +
|
37 | 1 +
|
38 | REC.sigReg_Chan_Offs_6'length +
|
39 | REC.sigReg_Chan_Offs_5'length +
|
40 | REC.sigReg_Chan_Offs_4'length +
|
41 | REC.sigReg_Chan_Offs_3'length +
|
42 | REC.sigReg_Chan_Offs_2'length +
|
43 | REC.sigReg_Chan_Offs_1'length +
|
44 | REC.sigReg_Words_Per_Ch'length +
|
45 | REC.sigReg_LineOffs'length +
|
46 | REC.sigSPI_Clk_Duration'length +
|
47 | REC.sigSPI_Clk_Duty'length +
|
48 | REC.sigSPI_DataSwitch'length +
|
49 | REC.Bit16perLine'length +
|
50 | REC.sigEnableChannel'length +
|
51 | REC.REG_Latch_Setup_Time'length +
|
52 | REC.REG_Latch_End_Time'length +
|
53 | REC.REG_Strobe_Setup_Time'length +
|
54 | REC.REG_Burn_Prescaler'length +
|
55 | REC.sigReg_HeadFill32'length;
|
56 |
|
57 | begin
|
58 |
|
59 | process begin
|
60 | wait for 10 ns;
|
61 | report "REC_LEN: " & integer'image(REC_LEN);
|
62 | wait;
|
63 | end process;
|
64 |
|
65 | end;
|