B
bxbxb3
Guest
Hi,
Is the code correct/allowed? Actually I am trying to write the first part
in
structural style to save clock cycles, the second part is process which is
sequential.
architecture x of x is
begin
u<="01" when (rst='0' and s="000") else
u<="10" when (rst='0' and s="001") ELSE
PROCESS(clk)
begin
if(clk'event and clk='1') then
case state is
when state0=>
if (rst='0' and s="010") then
u<="11";
state<=state1;
elsif (rst='1'and ="011") then
u<="00";
state<=state2;
end if;
when state1=>
u<="01";
state<=state0;
when state2=>
u<="10";
state<=state0;
end case;
and if;
end process;
end x;
I want the 'u' to assign values immediately when the first two conditions
are true. If they
are false then the 'u' must be assigned a perticular value in the first
clock cycle and
another in the next clock cycle.I want to ask whether "ELSE PROCESS"
statement is correct,
I have never seen such a clause in literature. Thanks for the help.
Is the code correct/allowed? Actually I am trying to write the first part
in
structural style to save clock cycles, the second part is process which is
sequential.
architecture x of x is
begin
u<="01" when (rst='0' and s="000") else
u<="10" when (rst='0' and s="001") ELSE
PROCESS(clk)
begin
if(clk'event and clk='1') then
case state is
when state0=>
if (rst='0' and s="010") then
u<="11";
state<=state1;
elsif (rst='1'and ="011") then
u<="00";
state<=state2;
end if;
when state1=>
u<="01";
state<=state0;
when state2=>
u<="10";
state<=state0;
end case;
and if;
end process;
end x;
I want the 'u' to assign values immediately when the first two conditions
are true. If they
are false then the 'u' must be assigned a perticular value in the first
clock cycle and
another in the next clock cycle.I want to ask whether "ELSE PROCESS"
statement is correct,
I have never seen such a clause in literature. Thanks for the help.