Adnan86
Full Member level 2
Hi
I write this code for synchronizer :
but when i run it with ISE, i have 2 errors :
what can i do ?
I will appreciate for your advice.
thanks
I write this code for synchronizer :
Code:
module synchronizer (input clk, adata,
output reg synched);
always @ (posedge clk)
if (adata == 0)
synched <= 0;
else synched <= 1;
endmodule
// 2 ff
module ff2 (input clk, dataIn,
output reg dataOut);
wire synch;
synchronizer u1 (clk, dataIn, synch);
synchronizer u2 (clk, synch, dataOut);
endmodule
andreference to scalar reg 'dataOut' is not a legal net lvalue
for this line :Connection to output port 'synched' must be a net lvalue
Code:
synchronizer u2 (clk, synch, dataOut);
I will appreciate for your advice.
thanks