///////////////////////////////////////////////////////////////////////////////////////////////////
// Company: <Name>
//
// File: clk_div.v
// File history:
// <Revision number>: <Date>: <Comments>
// <Revision number>: <Date>: <Comments>
// <Revision number>: <Date>: <Comments>
//
// Description:
//
// <Description here>
//
// Targeted device: <Family::ProASIC3> <Die::A3P250> <Package::256 FBGA>
// Author: <Name>
//
///////////////////////////////////////////////////////////////////////////////////////////////////
module igbt_clock_gen (clock,reset,clock1,clock2,clock3,clock4);
input clock,reset;
output clock1, clock2, clock3, clock4;
wire temp1;
freq_div f1 (clock,reset,temp1);
clock_multiplier c1 (temp1,clock1,clock2,clock3,clock4);
endmodule
module freq_div(clock, rst, clock_out);
input clock,rst;
output reg clock_out;
reg [15:0] counter;
always @(posedge clock or negedge rst)
begin
if(!rst)
begin
counter<=16'd0;
clock_out <= 1'b0;
end
else
if(counter==16'd6667)
begin
counter <= 16'd0;
clock_out <= ~clock_out;
end
else
begin
counter<=counter+1;
end
end
endmodule
module clock_multiplier (clock, clock1, clock2, clock3, clock4);
input clock;
output clock1, clock2, clock3, clock4;
assign clock1 = clock;
assign clock2 = ~clock1;
assign clock3 = clock1;
assign clock4 = ~clock1;
endmodule