reef88
Junior Member level 2
hi,
can anyone in this forum translate this verilog code to vhdl code...please...
this is the code:
module FSM_COMP(
input [9:0] COUNT,
input [9:0] V_COUNT,
input CLK_DIV,
input RST,
output reg H_D,
output reg H_S,
output reg V_D,
output reg V_S
);
always @(posedge CLK_DIV)
begin
if (RST)
begin
V_D<=0;
H_D<=0;
end
else
if ((COUNT>=12'h90) && (COUNT<=12'h30F))
H_D<=1;
else
H_D<=0;
if ((COUNT>=12'h5F) && (COUNT<=12'h31E))
H_S<=1;
else
H_S<=0;
if ((V_COUNT>=12'h20) && (V_COUNT<=12'h1FF))
V_D<=1;
else
V_D<=0;
if ((V_COUNT>=12'h1) && (V_COUNT<=12'h207))
V_S<=1;
else
V_S<=0;
end
endmodule
can anyone in this forum translate this verilog code to vhdl code...please...
this is the code:
module FSM_COMP(
input [9:0] COUNT,
input [9:0] V_COUNT,
input CLK_DIV,
input RST,
output reg H_D,
output reg H_S,
output reg V_D,
output reg V_S
);
always @(posedge CLK_DIV)
begin
if (RST)
begin
V_D<=0;
H_D<=0;
end
else
if ((COUNT>=12'h90) && (COUNT<=12'h30F))
H_D<=1;
else
H_D<=0;
if ((COUNT>=12'h5F) && (COUNT<=12'h31E))
H_S<=1;
else
H_S<=0;
if ((V_COUNT>=12'h20) && (V_COUNT<=12'h1FF))
V_D<=1;
else
V_D<=0;
if ((V_COUNT>=12'h1) && (V_COUNT<=12'h207))
V_S<=1;
else
V_S<=0;
end
endmodule