文章详情

ID: 5871
实例类型: faq
分类: Lattice IP/Reference Design
相关:
产品系列: All Devices

搜索答案数据库

Search Text Image

All Devices: ERROR - (line_num): net is constantly driven from multiple places at instance , on port How to fix it?

The error is caused by modifying a register on two or more different processes, with the first instance found on the line mentioned by the error message (line_num).

Sample Code:

module sample_multiple_instance(in1, in2, out1); input in1,in2; output out1;

reg samp_reg; assign out1 = samp_reg; always@(in1) begin samp_reg <= samp_reg-1; end always@(in2) begin samp_reg <= samp_reg+1;

end endmodule 

ERROR - .../sample.v(13): net out1 is constantly driven from multiple places at instance sub_3, on port o[0].

The register that is causing the error is "samp_reg" which being modified on two processes, the first of which is found on line 13.