How to make equal value

Discussion in 'VHDL' started by shah_satish2002, Jul 17, 2007.

  1. shah_satish2002

    shah_satish2002

    Joined:
    Jul 10, 2007
    Messages:
    11
    Hi..
    I have very basic question..

    Here is my code..

    Library IEEE;
    Use IEEE.std_logic_1164.all;

    Entity Del is
    port( MTDAT0,MTDAT1,MTDAT2,SEL: in bit;
    bit1,Bit2,bit3: out bit);
    End Entity Del;

    Architecture FA_calc of Del is

    begin


    process (SEL,MTDAT0,MTDAT1,MTDAT2)

    variable IN_vector: bit_vector(3 downto 0);
    begin

    loop1: for i in 0 to 11 loop

    IN_vector := SEL & MTDAT0 & MTDAT1 & MTDAT2 ;

    case IN_vector is

    when "0000" => bit1<='0'; bit2 <= '0';bit3 <= '0';
    when "0100" => bit1<='0'; bit2 <= '0';bit3 <= '0';

    when "1100" => bit1<='1'; bit2 <= '0';bit3 <= '0';
    when "1110" => bit1<='1'; bit2 <= '0';bit3 <= '0';
    when "0110" => bit1<='1'; bit2 <= '1';bit3 <= '0';

    when "0010" => bit1<='1'; bit2 <= '1';bit3 <= '0';

    when "1010" => bit1<='0'; bit2 <= '1';bit3 <= '0';

    when "1011" => bit1<='0'; bit2 <= '1';bit3 <= '0';

    when "0011" => bit1<='0'; bit2 <= '1';bit3 <= '1';

    when "0111" => bit1<='0'; bit2 <= '1';bit3 <= '1';

    when "1111" => bit1<='1'; bit2 <= '1';bit3 <= '1';

    when "1101" => bit1<='1'; bit2 <= '1';bit3 <= '1';

    when "0101" => bit1<='1'; bit2 <= '0';bit3 <= '1';

    when "0001" => bit1<='1'; bit2 <= '0';bit3 <= '1';

    when "1001" => bit1<='0'; bit2 <= '0';bit3 <= '1';

    when "1000" => bit1<='0'; bit2 <= '0';bit3 <= '1';

    End case;

    -- SEL <= bit3 ; // Here i want to make value of SEL is equal to bit3

    end loop loop1;
    end process;

    End Architecture FA_calc ;



    In my code, I want to make SEL is equal to bit 3 at the end of each loop..so on next cycle, the value of SEL become equal to bit3.

    How can i make it.. ??

    Thanks..
     
    shah_satish2002, Jul 17, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ron Vecchi

    Need to make control equal to control

    Ron Vecchi, Dec 11, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    442
    Jacob Yang [MSFT]
    Dec 12, 2003
  2. Eric Lilja
    Replies:
    4
    Views:
    374
    Shezan Baig
    Feb 28, 2005
  3. Martin Manns

    How can I make a function equal to 0?

    Martin Manns, Mar 21, 2008, in forum: Python
    Replies:
    13
    Views:
    461
    John Machin
    Mar 22, 2008
  4. mitch-co2
    Replies:
    2
    Views:
    279
    mitch-co2
    Feb 22, 2005
  5. ll
    Replies:
    2
    Views:
    339
    GArlington
    Aug 22, 2008
Loading...

Share This Page