Altera_Forum
Honored Contributor
13 years agoQuartus doesnt recognize my FSM as a FSM
Hello guys i have a "problem", i can't see my FSM as a FSM inside quartus state machine view or RTL viewer or whatever, is this a problem?
I use two processes, one is combinational and the other is sequential An example of my FSM is here :
process (reset_n, sysclk) is
begin
if reset_n = '0' then
state_core <= WAIT_START_CALC;
mean_reg <= (others => '0');
first_time_reg <= '1';
aux_a_reg <= (others => '0');
contador_ph <= 0;
mag_out_reg <= (others => '0');
finish_calc_reg <= '0';
read_counter <= 0;
elsif rising_edge(sysclk) then
state_core <= state_core_next;
mean_reg <= mean_reg_next;
aux_a_reg <= aux_a_next;
first_time_reg <= first_time_next;
contador_ph <= contador_ph_next;
mag_out_reg <= mag_out_next;
finish_calc_reg <= finish_calc_next;
read_counter <= read_counter_next;
end if;
end process;
process (aux_a_reg, contador_ph, finish_calc_reg, first_time_reg,
mag_out_reg, mean_reg, memory_mean, read_counter, start_calc,
state_core)
begin
state_core_next <= state_core;
mean_reg_next <= mean_reg;
first_time_next <= first_time_reg;
contador_ph_next <= contador_ph;
aux_a_next <= aux_a_reg;
mag_out_next <= mag_out_reg;
finish_calc_next <= finish_calc_reg;
read_counter_next <= read_counter;
case state_core is
when WAIT_START_CALC =>
if start_calc = '1' then
first_time_next <= '1';
if contador_ph = 31 then
contador_ph_next <= 0;
state_core_next <= READY;
else
contador_ph_next <= contador_ph + 1;
end if;
end if;
when READY =>
finish_calc_next <= '0';
if first_time_reg = '1' then
first_time_next <= '0';
state_core_next <= SUM_P1;
else
first_time_next <= '0';
if start_calc = '1' then
if contador_ph = 31 then
contador_ph_next <= 0;
else
contador_ph_next <= contador_ph + 1;
end if;
state_core_next <= SUM_P1;
end if;
end if;
when SUM_P1 =>
mean_reg_next <= "00000" & memory_mean(read_counter);
state_core_next <= SUM_P2;
when SUM_P2 =>
aux_a_next <= aux_a_reg + mean_reg;
if read_counter = 31 then
state_core_next <= DONE;
else
read_counter_next <= read_counter + 1;
state_core_next <= SUM_P1;
end if;
when DONE =>
mag_out_next <= aux_a_reg(20 downto 5);
read_counter_next <= 0;
finish_calc_next <= '1';
aux_a_next <= (others => '0');
state_core_next <= READY;
when others =>
state_core_next <= WAIT_START_CALC;
end case;
end process;
My design is working but could i achieve better results with other FSM implementation recognized by Quartus? (LE wise and timing wise).