N
Nahum Barnea
Guest
Hi.
I have a synthesizable verilog code that it's size could be reduced,
if I would use tasks and only change the parameters when I call the
task.
The problem is that I am afraid from synthesis missmathes with
simulation.
Does anyone here have experience with verilog task synthesis?
Does the following example make sense ?
module example(
input[3:0] wire i, j,
input wire clk,
output[3:0] reg out2 );
always@(posedge clk)
begin
or_task(i, j);
end
task or_task;
input a, b;
begin
out2 <= i | j;
end
endtask
endmodule
I have a synthesizable verilog code that it's size could be reduced,
if I would use tasks and only change the parameters when I call the
task.
The problem is that I am afraid from synthesis missmathes with
simulation.
Does anyone here have experience with verilog task synthesis?
Does the following example make sense ?
module example(
input[3:0] wire i, j,
input wire clk,
output[3:0] reg out2 );
always@(posedge clk)
begin
or_task(i, j);
end
task or_task;
input a, b;
begin
out2 <= i | j;
end
endtask
endmodule