Define is the preprocessor directive. It creates a macro for text substitution. This directive can be used both inside and outside module definitions. I usually define it in Verilog header files. After a text macro is defined, it can be used in the source description by using the (`) character, followed by the macro name.I use it to configure modules by using it directly in module specifications or by assigning it to module parameters. I'm comfortable to use verilog header files for this purpose because I can sort macros in regards to its types or meaning, and as a result ti is simple to change a configuration by switching header files and/or changing the macro in a convenient dedicated place.
packet_info_vector_o[i].packet_info.size_in_bytes <= 2+`BAUD_RATE_SIZE/8;
audio_extractor #(
.CHANNEL_NUM(8)
, .SYMBOL_WIDTH(`I2S_DATA_WIDTH)
, .JOIN_SUBFRAMES(1'b0)
, .BORDERED_SUBFRAME_COUNTER(1'b0)
, .SUBFRAME_COUNTER_BORDER(5)
, .SERVICE_CHANNEL_EXISTS(1'b1)
, .SERVICE_CHANNEL_NUMBER(8)
) audio_extractor_inst_0 (
.clk_i(ultranet_generated_clock_0)
, .nrst_i(nrst)
, .clr_i(clr)
, .biphase_decoded_data_i(biphase_decoded_data[0])
, .audio_channels_o(audio_channels_0)
, .user_data_o(user_data_0)
, .channel_status_o(channel_status_0)
);