Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
21618 Discussions

Pattern inclusion

Altera_Forum
Honored Contributor II
1,875 Views

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
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
715 Views

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

0 Kudos
Altera_Forum
Honored Contributor II
715 Views

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?
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

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)
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

 

--- 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:
0 Kudos
Altera_Forum
Honored Contributor II
715 Views

thanks a lot:D

0 Kudos
Altera_Forum
Honored Contributor II
715 Views

sorry for my irrelevant post

0 Kudos
Reply