G
GamEmpire
Guest
Hi All,
Been trying to get a clock multiplier working for a CPU project I am
working on, but I've had little luck.
http://i41.tinypic.com/ivuzvs.png is basically what I need to do.
Basically, I need to create a module to double the input clock speed.
I found a way to do this, but it is not synthesizeable with synopsys.
Current Code is:
module cu_timer(clk, reset, clk2);
input clk, reset;
output clk2;
reg clk2;
wire w1;
assign w1 = ~clk;
always @ (posedge w1 or negedge reset)
begin
clk2 <= (reset) ? ~clk2 : 0;
end
endmodule
The error I get while synthesizing is: Error: ./src/cu_timer.v:16:
Cannot test variable 'reset' because it was not in the event
expression or with wrong polarity. (ELAB-300)
You can see the manual page for this error here http://i39.tinypic.com/4v4c39.png
(I couldn't copy and paste out of my x11 window for some reason).
If anyone has any ideas on how to make this synthesizeable, that would
be greatly appreciated.
-Josh
Been trying to get a clock multiplier working for a CPU project I am
working on, but I've had little luck.
http://i41.tinypic.com/ivuzvs.png is basically what I need to do.
Basically, I need to create a module to double the input clock speed.
I found a way to do this, but it is not synthesizeable with synopsys.
Current Code is:
module cu_timer(clk, reset, clk2);
input clk, reset;
output clk2;
reg clk2;
wire w1;
assign w1 = ~clk;
always @ (posedge w1 or negedge reset)
begin
clk2 <= (reset) ? ~clk2 : 0;
end
endmodule
The error I get while synthesizing is: Error: ./src/cu_timer.v:16:
Cannot test variable 'reset' because it was not in the event
expression or with wrong polarity. (ELAB-300)
You can see the manual page for this error here http://i39.tinypic.com/4v4c39.png
(I couldn't copy and paste out of my x11 window for some reason).
If anyone has any ideas on how to make this synthesizeable, that would
be greatly appreciated.
-Josh