Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > test pattern

Reply
Thread Tools

test pattern

 
 
martstev@gmail.com
Guest
Posts: n/a
 
      01-14-2009
I am still learning VHDL and need some help please! This is what i
have

clk: in std_logic;
data : in std_logic_vector ( 3 downto 0);
data_out: out std_logic_vector (3 downto 0);

clock is running at 20 MHz and data is synchronized with the clock.

if data is in this order "1111", "1010" "1111", "xxxx" than, data out
is "xxxx". So basically I have to look at the data pattern back to
back and then activate my output..if pattern matches, "1111", "0xa"
and "0xb", output is good to go, else have just wait...

I was thinking to have data stored in FIFO and the have some sort of
state machine to look for test pattern..but not sure if that's the
best of doing this...any advice???
 
Reply With Quote
 
 
 
 
LittleAlex
Guest
Posts: n/a
 
      01-14-2009
On Jan 14, 8:33 am, (E-Mail Removed) wrote:
> I am still learning VHDL and need some help please! This is what i
> have
>
> clk: in std_logic;
> data : in std_logic_vector ( 3 downto 0);
> data_out: out std_logic_vector (3 downto 0);
>
> clock is running at 20 MHz and data is synchronized with the clock.
>
> if data is in this order "1111", "1010" "1111", "xxxx" than, data out
> is "xxxx". So basically I have to look at the data pattern back to
> back and then activate my output..if pattern matches, "1111", "0xa"
> and "0xb", output is good to go, else have just wait...
>
> I was thinking to have data stored in FIFO and the have some sort of
> state machine to look for test pattern..but not sure if that's the
> best of doing this...any advice???


If I understand your question, you are looking for the sequence 'F'
'A' 'B', and if found, output the data.

This is a classic state-machine learning/homework study exercise.

There is no need to store the codes while waiting for the pattern.
When you get to the 'found' state, you know what the 3 previous codes
are.

That should be enough to get you started.

AL
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ and design Pattern (Composite design Pattern ) Pallav singh C++ 0 01-22-2012 10:25 PM
May I have a example of design pattern of "composite", I still feel fuzzy after reading book of Addison-Wesley's"design pattern " jones9413@yahoo.com C++ 1 08-31-2007 04:09 AM
documents related to factory design pattern and Abstract foctory pattern. sunny C++ 1 12-07-2006 04:26 AM
boolean endsWith(String s, Pattern pattern) lepikhin@gmail.com Java 17 11-16-2005 10:31 AM
test test test test test test test Computer Support 2 07-02-2003 06:02 PM



Advertisments