реклама на сайте
подробности

 
 
> Не работает конечный автомат!, Не работает конечный автомат!!!!!!!!
LeshiySoft
сообщение Jan 22 2006, 22:19
Сообщение #1





Группа: Новичок
Сообщений: 4
Регистрация: 22-01-06
Пользователь №: 13 475



Вот написал автоматик:

mashine:process(clk)
type TSS is (s0,s1,s2,s3,s4,s5,s6,s7,s8);
variable SS:TSS:=s0;
begin
if clk='1' and clk'event then
case SS is
when s0=> SS:=s1;
when s1=> SS:=s2;
when s2=> SS:=s3;
when s3=> SS:=s4;
when s4=> SS:=s5;
when s5=> SS:=s6;
when s6=> SS:=s7;
when s7=> SS:=s8;
when s8=> SS:=s1;
end case;
end if;
if SS=s8 then clk_out<='1'; else clk_out<='0'; end if;
end process;

А Quartus мне и говорит:
Warning: Can't display state machine states -- register holding state machine bit "|InBuffer|\mashine:SS.s0" was synthesized away
В симуляции на clk_out вечный false, что за беда такая, может кто знает?
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
Postoroniy_V
сообщение Jan 23 2006, 08:42
Сообщение #2


МедвеД Инженер I
****

Группа: Свой
Сообщений: 816
Регистрация: 21-10-04
Пользователь №: 951



1 не туда вставлен
if SS=s8 then clk_out<='1'; else clk_out<='0'; end if;
2 нет сброса - что не есть гуд
Итого имеем:

library IEEE;
use IEEE.STD_LOGIC_1164.all;

entity state is
port(
clk : in STD_LOGIC;
reset : in STD_LOGIC;
clk_out : out STD_LOGIC
);
end state;

--}} End of automatically maintained section

architecture state of state is
begin

mashine:process(clk,reset)
type TSS is (s0,s1,s2,s3,s4,s5,s6,s7,s8);
variable SS:TSS:=s0;
begin
if(reset='1') then
SS:=s0;
elsif clk='1' and clk'event then

if SS=s8 then
clk_out<='1';
else
clk_out<='0';
end if;

case SS is
when s0=> SS:=s1;
when s1=> SS:=s2;
when s2=> SS:=s3;
when s3=> SS:=s4;
when s4=> SS:=s5;
when s5=> SS:=s6;
when s6=> SS:=s7;
when s7=> SS:=s8;
when s8=> SS:=s1;
when others=>SS:=s0;
end case;
end if;

end process;

-- enter your statements here --

end state;


--------------------
Cogito ergo sum
Go to the top of the page
 
+Quote Post

Сообщений в этой теме
- LeshiySoft   Не работает конечный автомат!   Jan 22 2006, 22:19
- - des00   Цитата(LeshiySoft @ Jan 22 2006, 17:19) В...   Jan 23 2006, 08:28
|- - v_mirgorodsky   Цитата(des00 @ Jan 23 2006, 10:28) Пробле...   Jan 23 2006, 08:45
|- - des00   Цитата(v_mirgorodsky @ Jan 23 2006, 03:45...   Jan 23 2006, 09:32
- - v_mirgorodsky   Добавлением Reset'а должно полечиться. У вас м...   Jan 23 2006, 08:32
- - iosifk   Цитата(LeshiySoft @ Jan 23 2006, 01:19) В...   Jan 23 2006, 08:42
- - vikk   может счетчик поставить?   Jan 23 2006, 11:26
|- - Postoroniy_V   Цитата(vikk @ Jan 23 2006, 14:26) может с...   Jan 23 2006, 11:59
- - LeshiySoft   Postoroniy_V, огромное человечское спасибо, что не...   Feb 1 2006, 22:15
|- - Postoroniy_V   Цитата(LeshiySoft @ Feb 2 2006, 01:15) Po...   Feb 2 2006, 08:20
|- - nand_gates   Checkout this one!!! This will work wi...   Feb 2 2006, 09:44
- - Gorby   Люди добрые, чего вы паритесь?! Ставим Active...   Feb 8 2006, 12:37
|- - Postoroniy_V   Цитата(Gorby @ Feb 8 2006, 15:37) Люди до...   Feb 9 2006, 08:58
- - Gate   Я совершенно согласен с Gorby - писать вручную стэ...   Feb 9 2006, 15:23
|- - des00   Цитата(Gate @ Feb 9 2006, 10:23) Я соверш...   Feb 9 2006, 15:30
|- - Postoroniy_V   Цитата(Gate @ Feb 9 2006, 18:23) Я соверш...   Feb 10 2006, 07:40
- - Vjacheslav   Цитата(Gate @ Feb 9 2006, 18:23) Я соверш...   Feb 10 2006, 08:30


Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 21st July 2025 - 11:47
Рейтинг@Mail.ru


Страница сгенерированна за 0.01367 секунд с 7
ELECTRONIX ©2004-2016