ERROR: Xst: 827, Signal next_states1 no se puede sintetizar, mala descripción síncrona

0

se muestra

  

ERROR: Xst: 827 - "C: / Users / namec / Desktop / Class / VHDL / Traffic_Light / Traffic_lig‌ ht.vhd" línea 46: La señal next_states1 no se puede sintetizar, mala descripción síncrona. El estilo de descripción que está utilizando para describir un elemento síncrono (registro, memoria, etc.) no se admite en la versión actual del software.

Highway: process(CLk) 
    variable counter: integer := 0;    
begin
    case traffic_states1 is
        when H0 => 
            if (Input='0' and rising_edge(clk)) then 
                next_states1 <= H0;
                counter := counter + 1;
            elsif (counter <=20) and rising_edge(clk) then
                next_states1 <= H0;
                counter := counter + 1;
            elsif Input='1' and rising_edge(clk) and (counter >20) then
                next_states1 <= H1;
                counter := 0;
                -- else next_states1 <= traffic_states1;
            end if;
        when H1 =>     
            if counter = 3 and rising_edge(clk) then
                next_states1 <= H2;
                counter := 0;
            else
                next_states1 <= H1;
                counter := counter + 1;    
            end if;
        when H2 =>
            if rising_edge(clk) and counter = 9 then
                next_states1 <= H0;
                counter := 0;
            else
                next_states1 <= H2;
                counter := counter + 1;
            end if;
        when others =>
            null;
    
pregunta Yuan Cao

1 respuesta

0

Creo que sería bueno para ti realizar un curso o tutorial sobre VHDL ... Pero de todos modos, la detección del borde del reloj no debería estar dentro de la declaración del caso de esta manera.

Highway: process(CLk) 
    variable counter: integer := 0;    
begin
    if rising_edge(clk) then
        case traffic_states1 is
            when H0 => 
                if (Input='0') then 
                    next_states1 <= H0;
                    counter := counter + 1;
                elsif (counter <=20) then
                    next_states1 <= H0;
                    counter := counter + 1;
                elsif (Input='1' and counter >20) then
                    next_states1 <= H1;
                    counter := 0;
                    -- else next_states1 <= traffic_states1;
                end if;
            when H1 =>     
                if (counter = 3) then
                    next_states1 <= H2;
                    counter := 0;
                else
                    next_states1 <= H1;
                    counter := counter + 1;    
                end if;
            when H2 =>
                if (counter = 9) then
                    next_states1 <= H0;
                    counter := 0;
                else
                    next_states1 <= H2;
                    counter := counter + 1;
                end if;
            when others =>
                null;
    
respondido por el JHBonarius

Lea otras preguntas en las etiquetas