Forum Discussion
Altera_Forum
Honored Contributor
16 years agoPattern 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? thanks6 Replies
- Altera_Forum
Honored Contributor
sorry for my irrelevant post
- Altera_Forum
Honored Contributor
thanks a lot:D
- Altera_Forum
Honored 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: - Altera_Forum
Honored 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
Honored 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
Honored Contributor
yes, you either save the incoming frames while you are inserting... or use request signal to stop it...