Using the NOT unary operand "~" with the input on the RHS in a continuous assignment, that will assign the NOT result to y on the LHS.
Code
/* NOT Gate
* Inputs: a (1-bit)
* Output: y (1-bit)
* Truth Table
* a | y
* ----------
* 0 | 1
* 1 | 0
*/
module top_module (
input a,
output y
);
assign y = ~ a;
endmodule