Record Creation in VHDL

Discussion in 'VHDL' started by Smi, Nov 23, 2009.

  1. Smi

    Smi Guest

    HI

    I have created one record to make a frame fromat as follows
    type packet record is
    {
    preambler:std_logic_vector(3 downto 0);
    sync_bit:std_logic_vector(3 downto 0);
    data:std_logic;
    }
    signal tx_packet,rx_packet:packet
    my frame should be in format preambler,sync_bit,data.. now i need to
    send all this tx_packet to hardware to any gpio pin serially can any
    body tel me that how to do coding for this
    please help me out
     
    Smi, Nov 23, 2009
    #1
    1. Advertising

  2. Smi

    KJ Guest

    On Nov 23, 6:11 am, Smi <> wrote:
    > HI
    >
    > I have created one record to make a frame fromat as follows
    > type packet record is
    > {
    >   preambler:std_logic_vector(3 downto 0);
    > sync_bit:std_logic_vector(3 downto 0);
    > data:std_logic;}
    >
    > signal tx_packet,rx_packet:packet
    > my frame should be in format preambler,sync_bit,data.. now i need to
    > send all this tx_packet to hardware to any gpio pin serially can any
    > body tel me that how to do coding for this
    > please help me out


    There's two steps to this. First create a std_logic_vector out of
    your record. Peruse my post in this group called 'Length of range'
    for more info and links to details on how I would do that step.

    http://groups.google.com/group/comp...46114/05b06bca6030ed95?hl=en#05b06bca6030ed95

    Next you need a parallel to serial conversion. The input to this is
    the vector created above. The output is your serial stream. Parallel
    to serial conversion can be nothing more than a shift register and a
    counter to know when you're done.

    These two steps can be combined into one which essentially creates a
    converter from your record into a serial data stream. Doing so though
    is probably less useful than creating the individual parts since the
    technique of step #1 can be applied to many other cases, the serial to
    parallel convertor can be reused as-is. The combined covertor though
    will probably never be used again.

    Kevin Jennings
     
    KJ, Nov 23, 2009
    #2
    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. srinukasam

    memory creation with record

    srinukasam, Jun 30, 2005, in forum: VHDL
    Replies:
    1
    Views:
    586
    Jonathan Bromley
    Jun 30, 2005
  2. =?Utf-8?B?SnVzdGlu?=

    Retrieving Record Key while creating the record.

    =?Utf-8?B?SnVzdGlu?=, Oct 4, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    640
    =?Utf-8?B?SnVzdGlu?=
    Oct 5, 2004
  3. André
    Replies:
    0
    Views:
    3,755
    André
    Jun 25, 2006
  4. afd
    Replies:
    1
    Views:
    8,370
    Colin Paul Gloster
    Mar 23, 2007
  5. MRW
    Replies:
    0
    Views:
    381
Loading...

Share This Page