C
Chris Hinsley
Guest
Sorry for asking such a simple question, but it's really anoying me !
I have a pice of code that does:
reg [31:0] cnt = 32'b0;
always @(posedge CLK_FPGA_50M)
begin
cnt += 1;
end
That counter is driving the rest of my design, and after doing timeing
analysis I find the longest path is the ripple carry adder that the +=
is generateing.
I have got my own modules for faster math, one is called add32. But I
can't get this to work:
reg [31:0] cnt = 32'b0;
always @(posedge CLK_FPGA_50M)
begin
add32 u1(cnt, 32'b1, cnt);
end
I keep getting a syntax error. I'm sure I've not understood some simple
Verilog issue here, but why can't I use my own module instead of the +=
?
Thanks in advance.
Chris
I have a pice of code that does:
reg [31:0] cnt = 32'b0;
always @(posedge CLK_FPGA_50M)
begin
cnt += 1;
end
That counter is driving the rest of my design, and after doing timeing
analysis I find the longest path is the ripple carry adder that the +=
is generateing.
I have got my own modules for faster math, one is called add32. But I
can't get this to work:
reg [31:0] cnt = 32'b0;
always @(posedge CLK_FPGA_50M)
begin
add32 u1(cnt, 32'b1, cnt);
end
I keep getting a syntax error. I'm sure I've not understood some simple
Verilog issue here, but why can't I use my own module instead of the +=
?
Thanks in advance.
Chris