VHDL Code: Testing Equality of Vectors

  1. Hi all, I have the following code:

    where checkHR and checkMIN are 8 bit vectors (7 downto 0)... and SECL, SECH, MINL, MINH, HRL, and HRH are all 4 bit vectors (3 downto 0).

    What I'm trying to do is check to see if the first four bits of checkHR is equal to HRH.

    Can someone tell me whats wrong? I'm getting the error: Line 74. = can not have such operands in this context.
     
  2. jcsd
  3. Did you put the code inside a process? You can only use the "if" statement inside a process.
     
  4. Yes, it's in a process.
     
  5. In the portion of code that you posted there is no syntax error. There must be some conflicting code somewhere else. You should post the whole process. Also tell us which of SECL, SECH, MINL, MINH, HRL, HRH, checkHR and checkMIN, are signals and which are ports.
     
Know someone interested in this topic? Share a link to this question via email, Google+, Twitter, or Facebook

Have something to add?