verilog - How do I fix "Error-[ICPSD] Invalid combination of drivers"? -


i trying debug code shown below. new systemverilog , can learn this. let me know of suggestions.

**the errors receiving are:

  error-[icpsd] invalid combination of drivers   variable "q" driven invalid combination of structural ,    procedural drivers. variables driven structural driver cannot have    other drivers.   "divide.v", 13: logic [7:0] q;   "divide.v", 16: divide8bit testcase1(x, y, clk, q, r);   "divide.v", 23: q = 8'b0;    error-[icpsd] invalid combination of drivers   variable "r" driven invalid combination of structural ,    procedural drivers. variables driven structural driver cannot have    other drivers.   "divide.v", 13: logic [7:0] r;   "divide.v", 16: divide8bit testcase1(x, y, clk, q, r);   "divide.v", 24: r = y; 

**my systemverilog code is:

module divide8bit(   input logic [7:0] x,y,   input logic clk,   output logic [7:0] q,r);    always_ff @(posedge clk)     begin       r <= r-x;       q <= q + 8'd1;     end endmodule  module test1;    logic [7:0] x,y,q,r;   logic clk;    divide8bit testcase1 (x,y,clk,q,r);    initial      begin             x = 8'd2;             y = 8'd8;             q = 8'd0;             r = y;             clk = 1'd0;             while(x <= r)                 begin                     #5 clk = ~clk;                 end             #5 $finish;          end endmodule 

same problem here: assigning q , r inside module test1. @ same time module testcase1 trying assing q , r. don't assign q , r in test1!


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -