Results 1 to 5 of 5

Thread: Relational operators

  1. #1
    Join Date
    Dec 2016
    Posts
    12
    Rep Power
    1

    Question Relational operators

    Hi,

    I don't understand why the following code doesn't work, can you enlighten me ?

    Code:
    freq_authorization : process(clk)
    begin
        if rising_edge(clk) then
            
            if ((unsigned(freq) >= "00001100" ) and (unsigned(freq) <= "00111101" )) then --compare if freq entry is between 12 and 59
                    
                    allowed_freq <= '1';
    
                else 
                    allowed_freq <= '0';
            end if;
        end if;
    end process freq_authorization;
    If it can help, modelsim is returning # ** Warning: NUMERIC_STD.">=": metavalue detected, returning FALSE when I run.

    Thanks for your help.

    EDIT : freq is in std_logic_vector(7 downto 0);
    Last edited by FPGApadawan; January 28th, 2017 at 06:11 AM.

  2. #2
    Join Date
    Jan 2017
    Posts
    2
    Rep Power
    1

    Default Re: Relational operators

    freq has not been initialized

  3. #3
    Join Date
    Dec 2016
    Posts
    12
    Rep Power
    1

    Default Re: Relational operators

    What do you mean ? Freq is my entry port

  4. #4
    Tricky is offline Moderator **Forum Master**
    Join Date
    Oct 2008
    Posts
    5,382
    Rep Power
    1

    Default Re: Relational operators

    Quote Originally Posted by FPGApadawan View Post
    What do you mean ? Freq is my entry port
    Yes, have you set the value for Freq in your testbench? if it contains 'U' (uninitialised) or 'X' (unknown) then you get the warning you have.

  5. #5
    Join Date
    Dec 2016
    Posts
    12
    Rep Power
    1

    Default Re: Relational operators

    Thanks, your advices led me to solve my problem.

Similar Threads

  1. Relational locks in quartus?
    By ashishkaps in forum General Altera Discussion
    Replies: 0
    Last Post: January 18th, 2012, 03:49 AM
  2. Arithmetic Operators in vhdl
    By DE4User in forum General Altera Discussion
    Replies: 2
    Last Post: June 30th, 2011, 10:41 PM
  3. Error with operators
    By rafael_kl in forum Quartus II and EDA Tools Discussion
    Replies: 4
    Last Post: April 14th, 2011, 10:21 PM
  4. Signed operators in Verilog
    By digitalcop66 in forum General Altera Discussion
    Replies: 1
    Last Post: June 15th, 2010, 08:38 AM
  5. choosing default synthesis for arithmatic operators
    By AYALOZER in forum Quartus II and EDA Tools Discussion
    Replies: 3
    Last Post: February 27th, 2010, 09:22 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •