F
Frank
Guest
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
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