我有一个verilog 代码这样写,调用了2个子模块OEH_OEV_CKV、Phase_3_Generator 按照下面的写法编译器不会出现警告
`define AP_FREQ_SCALE 96
module Analog_panel_timming( CLK,RST ,OEH,OEV,CKV,VCOM,AnalogBegin,STH_LR,P );
input CLK; input RST; output [2:0]P , STH_LR; output OEH; output OEV; output CKV; output VCOM; output AnalogBegin; //analog signal begin output
integer i; reg LineRst;
initial begin i=0; //LineRst=0; end
always @ (posedge CLK) begin if(RST) begin i=0; end else begin if(i%`AP_FREQ_SCALE==0) begin end end
end OEH_OEV_CKV U1(CLK,RST,OEH,OEV,CKV,VCOM,,AnalogBegin); Phase_3_Generator P3G1(LineRst,CLK,STH_LR,P ); endmodule
但是我如果写成以下文字,编译器就会有错误提示: 但是我如果写成以下文字,编译器就会有错误提示: 但是我如果写成以下文字,编译器就会有错误提示: 但是我如果写成以下文字,编译器就会有错误提示: 但是我如果写成以下文字,编译器就会有错误提示: Starting: analyse source files hierarchy on 16:20:47 August 25, 2008 -- Analyzing Verilog file C:/ispTOOLS7_1/ispcpld/../cae_library/synthesis/verilog/ec.v -- Analyzing Verilog file Untitled.h -- Analyzing Verilog file phase_3_generator.v -- Analyzing Verilog file pinassign_pll.v -- Analyzing Verilog file ec_pll.v -- Analyzing Verilog file oeh_oev_ckv.v -- Analyzing Verilog file analog_panel_timming.v analog_panel_timming.v(34): ERROR: syntax error near U1 analog_panel_timming.v(36): ERROR: syntax error near P3G1 analog_panel_timming.v(47): ERROR: module Analog_panel_timming ignored due to previous errors -- Verilog file analog_panel_timming.v ignored due to errors Fail to analyse source files hierarchy. --------以下是更改后的源文件,为什么会出错呀?--------- --------以下是更改后的源文件,为什么会出错呀?--------- --------以下是更改后的源文件,为什么会出错呀?--------- --------以下是更改后的源文件,为什么会出错呀?--------- --------以下是更改后的源文件,为什么会出错呀?--------- --------以下是更改后的源文件,为什么会出错呀?--------- `define AP_FREQ_SCALE 96
module Analog_panel_timming( CLK,RST ,OEH,OEV,CKV,VCOM,AnalogBegin,STH_LR,P );
input CLK; input RST; output [2:0]P , STH_LR; output OEH; output OEV; output CKV; output VCOM; output AnalogBegin; //analog signal begin output
integer i; reg LineRst;
initial begin i=0; //LineRst=0; end
always @ (posedge CLK) begin if(RST) begin i=0; end else begin if(i%`AP_FREQ_SCALE==0) begin OEH_OEV_CKV U1(CLK,RST,OEH,OEV,CKV,VCOM,,AnalogBegin); end Phase_3_Generator P3G1(LineRst,CLK,STH_LR,P ); end
end endmodule
|