Re: string recognize and led
- From: "KJ" <kkjennings@xxxxxxxxxxxxx>
- Date: Thu, 8 Nov 2007 07:20:48 -0500
"Amit" <amit.kohan@xxxxxxxxx> wrote in message
news:1194495166.085775.169570@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Not how I would approach it, but OK.
Hello group,
I'm writing a code to recognize two strings of 0s and 1s base on a
Moore machine.
The goal is to wait for two numbers (let's say 75). Oneprocess(Clock)
string will represent 7 and the other represents 5.
Let's say:
5= 000010000100
7= 000010000110
Now, when the appropriate string (digit) is recongnized the number
must be displayed on an LED on Altera board (DE2). I understand that
I have to add a mulitplexer to do this but the thing I am not sure
that how can I keep the number (7) intact till recognizing the next
appropriate number (5)? (other numbers must be ignored)
begin
if rising_edge(Clock) then
if (Input_String = "000010000100") then
Led_Display <= Whatever you need to display a '5'
elsif (Input_String = "000010000110") then
Led_Display <= Whatever you need to display a '7'
end if;
end if;
end process;
A flip flop(s) to hold the data.
Do I need a latch?
if this is right, then can I only simulate it usingWhy restrict yourself to only one statement type. Use the appropriate
if statement?
statements.
KJ
.
- References:
- string recognize and led
- From: Amit
- string recognize and led
- Prev by Date: Re: What are twisted ports
- Next by Date: inout std_logic_vector to array of std_logic_vector of generic length conversion...
- Previous by thread: string recognize and led
- Next by thread: inout std_logic_vector to array of std_logic_vector of generic length conversion...
- Index(es):
Relevant Pages
|