Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Pattern inclusion

Hallo there,

I need some help or ideas,

i have a data stream and one time in this stream i have a frame "80008000" the next frame is then a counter value, for example "00000008"

and then again "normal" frames (for me not interesting how they look).

Now when i found this "80008000" i have to read out the next frame (counter value) and then i have to fill in the stream on this location with "80008000" frames. I have to fill in this frame as often as the counter value shows.

How can i do this? Should i take a fifo so that the frames which came after the counter value could be saved for the time i fill in the "80008000" frames?

has anybody an idea how i can do this?

thanks

6 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    yes, you either save the incoming frames while you are inserting... or use request signal to stop it...

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    thanks,

    one more question,

    how can i read out the frame after the "80008000" frame?

    I can search for "80008000" and then i want to read out the frame after that,

    how can i realize this in vhdl?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    you can use shift register to detect any pattern:

    e.g. assuming data_in = 8 bits, for x"80008000" use 32 bit shift register:

    on the clk edge:

    shift_reg <= shift_reg(23 downto 0) & data_in;

    if(shift_reg = x"80008000")then

    action...

    end if;

    take care with byte/shift orientaion(MSB isuses)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    for what are you waiting?

    --- Quote End ---

    its a spam bot, you should give some negative reps and report the post as spam. :cool: