EmbDev.net

Forum: FPGA, VHDL & Verilog Compile warnings in model sim


von Peter Reitinger (Guest)


Rate this post
useful
not useful
Hello, I get compile warnings (and later compile errors from other 
parts, but one after another...) in model sim with the following code.
I do not get compile warnings when synthesizing the code with Lattice 
Diamond nor when compiling it with Active HDL.

What is wrong with the following code?
1
type TPhOptions is record
2
3
sigPrintheadKCE      : std_logic;
4
sigPH_PICAIIRohm    : std_logic;
5
sigReg_Chan_Offs_6    : std_logic_vector( 7 downto 0);   sigReg_Chan_Offs_5    : std_logic_vector( 7 downto 0);   sigReg_Chan_Offs_4    : std_logic_vector( 7 downto 0);   sigReg_Chan_Offs_3    : std_logic_vector( 7 downto 0);   sigReg_Chan_Offs_2    : std_logic_vector( 7 downto 0);   sigReg_Chan_Offs_1    : std_logic_vector( 7 downto 0); 
6
7
sigReg_Words_Per_Ch    : std_logic_vector( 7 downto 0);
8
sigReg_LineOffs      : std_logic_vector( 7 downto 0);
9
sigSPI_Clk_Duration    : std_logic_vector( 3 downto 0);
10
sigSPI_Clk_Duty      : std_logic_vector( 3 downto 0);
11
sigSPI_DataSwitch    : std_logic_vector( 3 downto 0);
12
Bit16perLine      : std_logic_vector( 7 downto 0);
13
sigEnableChannel      : std_logic_vector( 5 downto 0);
14
REG_Latch_Setup_Time  : std_logic_vector( 7 downto 0);
15
REG_Latch_End_Time    : std_logic_vector( 7 downto 0);
16
REG_Strobe_Setup_Time  : std_logic_vector( 7 downto 0);
17
REG_Burn_Prescaler    : std_logic_vector( 7 downto 0);
18
sigReg_HeadFill32    : std_logic_vector( 7 downto 0);
19
20
end record;
21
22
-- then usage of length attribute in following constant definition
23
24
  constant PH_OPTIONS_LEN: integer := 
25
    1 + 
26
    1 + 
27
    work.fpga_configP_helper.TPhOptions.sigReg_Chan_Offs_6'length +
28
    TPhOptions.sigReg_Chan_Offs_5'length +
29
    TPhOptions.sigReg_Chan_Offs_4'length +
30
    TPhOptions.sigReg_Chan_Offs_3'length +
31
    TPhOptions.sigReg_Chan_Offs_2'length +
32
    TPhOptions.sigReg_Chan_Offs_1'length +
33
    TPhOptions.sigReg_Words_Per_Ch'length +
34
    TPhOptions.sigReg_LineOffs'length +
35
    TPhOptions.sigSPI_Clk_Duration'length +
36
    TPhOptions.sigSPI_Clk_Duty'length +
37
    TPhOptions.sigSPI_DataSwitch'length +
38
    TPhOptions.Bit16perLine'length +
39
    
40
    TPhOptions.sigEnableChannel'length +
41
    TPhOptions.REG_Latch_Setup_Time'length +
42
    TPhOptions.REG_Latch_End_Time'length +
43
    TPhOptions.REG_Strobe_Setup_Time'length +
44
    TPhOptions.REG_Burn_Prescaler'length +
45
    TPhOptions.sigReg_HeadFill32'length
46
  ;
1
-- warnings:
2
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(38): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
3
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(39): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
4
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(40): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
5
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(41): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
6
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(42): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
7
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(43): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
8
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(44): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
9
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(45): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
10
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(46): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
11
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(47): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
12
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(48): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
13
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(49): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
14
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(51): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
15
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(52): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
16
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(53): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
17
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(54): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
18
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(55): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.
19
# ** Warning: E:/SAUBER/lfe5um25_octavo/impl1/source/fpga_configP.vhd(56): (vcom-1260) Type mark (TPhOptions) cannot be prefix of selected name.

von -gb- (Guest)


Rate this post
useful
not useful
And this is how it works:
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;

Alles Gute alles Liebe (-:

von -gb- (Guest)


Attached files:

Rate this post
useful
not useful
Sorry for the formatting, this is done by the Forumsoftware and just 
awful (in school i learned awefull). So here is the code as .vhd file 
too.

von -gb- (Guest)


Attached files:

Rate this post
useful
not useful
Wahhhh!!!! the "highlighted code" function just renders as bad as inline 
code. don't click that!
The image shows how the code is supposed to look - and did before the 
forumsoftware was "schlimmbessered".

von Gustl B. (-gb-)


Rate this post
useful
not useful
-gb- wrote:
> "schlimmbessered"

This is the german word for "trying with best intentions, but failing in 
an so absurd way, that the outcome is even worse than the starting 
condition."

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.