simple vhdl question

Discussion in 'Programmer's Corner' started by gammaman, Apr 10, 2009.

  1. gammaman

    Thread Starter Member

    Feb 14, 2009
    when "000" PRICE := "110010";

    How do I code the above so that it reads

    when "000" the price is "110010";
  2. electronictech

    Active Member

    Apr 1, 2009
    I'm more of a graphical (schematic entry) logic programmer....but if I was to guess how to code it, I would try:

    IF INPUT x = 000 'x is the port/condition to be checked
    PRICE = 110010 ' if x meets the condition, then PRICE now equals 110010
    ELSEIF ' if x didn't meet the condition, then continue without change

    of course the syntax will vary with the specific compiler you are using.

    Anyways have fun!