Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

VHDL Code: Testing Equality of Vectors

  1. Dec 1, 2007 #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. Dec 2, 2007 #2
    Did you put the code inside a process? You can only use the "if" statement inside a process.
  4. Dec 2, 2007 #3
    Yes, it's in a process.
  5. Dec 3, 2007 #4
    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 this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: VHDL Code: Testing Equality of Vectors
  1. Testing verilog code (Replies: 6)