I have some basic code using data flow statements, but nor and nand functions are not working with this.
module basic_gates_bitwise_df(
input A,
input B,
output andd,orr,nota,nandd,norr,xorr,xnorr
);
assign andd=A&B;
assign orr=A|B;
assign nota=~A;
assign nandd=A~&B;
assign norr=A~|B ;
assign xorr=A^B;
assign xnorr=A~^B;
endmodule
I got errors like this:
ERROR:HDLCompiler:806 - "F:\basic.v" Line 37: Syntax error near "~&".
ERROR:HDLCompiler:806 - "F:\basic.v" Line 38: Syntax error near "~|".
ERROR:HDLCompiler:598 - "F:\basic.v" Line 21:
Module<basic_gates_bitwise_df> ignored due to previous errors.
What can I try to resolve this?
~&and others supposed to mean in your case? there are no such operators on two operands in verilog. They can only be used as unary reduction operators. What did you expect?