I am relatively new to FPGAs, and I am looking for some guidance for modern best practice regarding the declaration of modules in Verilog.
I have seen two ways of declaring a module in verilog. The first reminds me of Traditional C, such as the examples on wikipedia:
module toplevel(clock,reset);
input clock;
input reset;
/* snip */
endmodule
Whereas the alternative syntax has the input/output specifier as part of the argument list, not too dissimilar to VHDL, as in this example:
module fadder(
input a, //data in a
input b, //data in b
input cin, //carry in
output sum_out, //sum output
output c_out //carry output
);
/* snip */
endmodule
For newly written verilog code, which syntax is preferred? "Preferred", in this instance, means something written in a standard or related material (either explicitly written, or implicitly by examples given in the standard), or written in a well-regarded style guide. The question isn't asking for a personal preference!