I guess it is a better coding practice to Have sewuential logic and Combinational logoc separate. Some experienced coder doesnt like the idea as their code becomes more redable try to club them together appropriately
You can easy mix them together. Sometime, the structure of your program will become more clear with mixed type of definition. Also, it will be more easy for synthesizer to optimize your code. For example, if you want to define simple adder with latch on output, I think this construction:
Code:
PROCESS(clk)
BEGIN
IF (clk'EVENT AND clk='1') THEN
C_latch<=A+B;
END IF;
END PROCESS;
will look much better than this:
Code:
PROCESS(A,B)
BEGIN
C<=A+B;
END IF;
PROCESS(clk)
BEGIN
IF (clk'EVENT AND clk='1') THEN
C_latch<=C;
END IF;
END PROCESS;
i don't agree with you Gute...
one can have combinational circuit...and sequential circuits.....
but it all depends on the design requirements....combination of combinational logic and sequential logic is SYNTHESIZABLE.....
yes i do agree with nand gates .when u synthesize your code u should be able to ciscern whether u have got the correct results or not by an inspection.so if u seperate your code and use good coding practices like not using variables in clocked processes and also code so that unnecessary muxes are not inferred ur design should be prefectly synthesizable.