help with write to fpga function

Discussion in 'VHDL' started by thomas, Oct 12, 2004.

  1. thomas

    thomas Guest

    Hi

    I am going to write a program in vhdl that can handle 5 write cycles to
    one address
    something like this

    data_reg is a array from 0 to 2 of 8 bits
    address is 5 bits
    data is 8bits

    if cs = 1 then
    if not_we = 0 then
    if address = "00001" :
    data_reg(1)(index) <= data;
    index = index +1;
    elsif address = "00010" :
    data_reg(2)(index) <= data;
    index = index +1;
    elsif address = "00011" :
    data_reg(3)(index) <= data;
    index = index +1;

    ......
    end if
    end if
    end if

    what the data in data_reg to be latch out when the index is 2

    is there a god way of doing this

    is there something i can read about this ???
    --
    thomas
    thomas, Oct 12, 2004
    #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. Weng Tianxiang
    Replies:
    12
    Views:
    1,401
  2. komal
    Replies:
    6
    Views:
    1,420
    msalters
    Jan 25, 2005
  3. Vikram
    Replies:
    0
    Views:
    812
    Vikram
    Jul 24, 2008
  4. TheRightInfo

    FPGA BOARD FOR NEWBIE TO FPGA

    TheRightInfo, Feb 2, 2011, in forum: VHDL
    Replies:
    1
    Views:
    1,341
    Tricky
    Feb 2, 2011
  5. Oliver Mattos

    Re: FPGA BOARD FOR NEWBIE TO FPGA

    Oliver Mattos, Feb 2, 2011, in forum: VHDL
    Replies:
    0
    Views:
    1,131
    Oliver Mattos
    Feb 2, 2011
Loading...

Share This Page