Hi Frank,
The tests that you wrote will create what is called "common sub-expressions".
These are typically eliminated very early in the flow through synthesis.
So, I am convinced that you are free to write the same tests in different processes,
and it should not affect the synthesis result.
Just try to keep them the same as much as possible, so that common subexpression
elimination is guaranteed to work.
Rob
"Frank" <> wrote in message news:43e176bb$...
>I put these conditions in different always and if-else-if statements, will
> design compiler & ISE be smart enough to recognise them and reduce
> hardware cost accordingly?
>
> I had a tendency to write the conditions with a wire & assign statement
> e.g.:
> wire cond1; assign cond1 = pop && (process == 8'h25) || kick;
> but if synthesizers handles these, then it will save me some thinking.
>
>
>
>
>
>
> always @ (posedge clk)
> begin
> if (pop && (process == 8'h25) || kick)
> whatever <= asdf;
> else if (pop1 && (process == 8'h25) || kick1)
> whatever <= asdf1;
> else if (pop2 && (process == 8'h25) || kick2)
> whatever <= asdf2;
> end
>
> always @ (posedge clk)
> begin
> if (pop && (process == 8'h25) || kick)
> whatever1 <= asdf3;
> else if (pop1 && (process == 8'h25) || kick1)
> whatever1 <= asdf4;
> else if (pop3 && (process == 8'h25) || kick3)
> whatever1 <= asdf5;
> end
>
>
>
>
|