Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Modelsim - VHDL common question.

Dear all my friend

I make this thread to post the question related to Modelsim and VHDL

I hope everybody can help me answer.

Thank you very much.

Best regards.

40 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    the design is only using memory blocks, take a look at the Total memory bits used in your report

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    the design is only using memory blocks, take a look at the Total memory bits used in your report

    --- Quote End ---

    Thanks thepancake very much. I thought it had logic gate because i have some code to read the memory.

    Do you know about altrom?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    you specified unregistered outputs in the instantiation of the ROM, but then inferred output registers in the code, so i imagine the output registers were packed into the block RAM

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    you specified unregistered outputs in the instantiation of the ROM, but then inferred output registers in the code, so i imagine the output registers were packed into the block RAM

    --- Quote End ---

    Thank you.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Dear my friends

    When i simulate VHDL code by Modelsim, I got some warning about arithmetic

    --- Quote Start ---

    # ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).

    # Time: 1020 ns Iteration: 1 Instance: /testbench_svpwm/u/state

    # ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).

    # Time: 1020 ns Iteration: 1 Instance: /testbench_svpwm/u/state

    # ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).

    # Time: 1260 ns Iteration: 1 Instance: /testbench_svpwm/u/state

    # ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).

    # Time: 1260 ns Iteration: 1 Instance: /testbench_svpwm/u/state

    # ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).

    # Time: 1380 ns Iteration: 1 Instance: /testbench_svpwm/u/state

    --- Quote End ---

    And when I run step by step my code, I saw, when this code was executed, the warning display. I don't know why this this warning display. Could you help me?

    This is my declare

    
    use IEEE.std_logic_arith.all;
    use IEEE.std_logic_signed.all;
    signal TAA,TBB          : STD_LOGIC_VECTOR(11 downto 0):=(others =>'0');
    signal TAM				: STD_LOGIC_VECTOR(11 downto 0):=(others =>'0');
    signal TAO,TBO,TCO		: STD_LOGIC_VECTOR(11 downto 0):=(others =>'0');
    

    and this code has warning when i run it by modelsim

    
    elsif CNT=x"08" then
    	TAM  <= x"410" -TAA -TBB;    
    elsif CNT=x"09" then
    	TAO  <= '0' & TAM(11 downto 1);  
    elsif CNT=x"0A" then
    	TBO  <= TAO + TAA;
    elsif CNT=x"0B" then
    	TCO  <= TBO + TBB; ;
    

    Thank you very much.

    Happy new year to all my best friend
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    and when i us IEEE.numeric_std.all; it's still has this warning. Thanks again

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    this comes up every now and then, try searching the forum. there are instructions on suppressing the warning, and maybe an explanation of why it happens

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Your warning are most likely due to the default state of signals (like the CNT signal earlier in this post) beginning the simulation as 'X' or 'U', since you have no reset circuitry.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    hi

    I need a simple calculator with -,+,/,* operation & logic operation & shift right & shift left that I enter digits from keyboard and show them on lcd.So I must have keyboard component and lcd component for digits (VHDL). can u help me? I've found calculator codes from this site but that doesnt have logic and shift operations. please help me. I cant find component lcd and keyboard from internet. Can you give me codes of this calculator that I want? please help me. thanks a lot