Verilog HDL language file calling problem: include usage method introduction

Electronic enthusiasts : Verilog can use the preprocessor command `include "filename" to include new files. The location of the `include "filename" needs to be after the module declaration.

Here is an example for everyone to understand, param.h stores the parameter LENTH, and the top mult.v uses it.

Mult.v code is as follows

1 module mult (

2 input clk,

3 input rst,

4 input [LENTH-1:0] A,

5 input [LENTH-1:0] B,

6 output [LENTH-1:0] C

7);

8

9 `include "param.h"

10

11 reg [LENTH-1:0] c_reg;

12

13 always@(posedge clk or negedge rst)

14 if(rst == 1'b0)begin

15 c_reg <= 32'b0;

16 end

17 else begin

18 c_reg <= A*B;

19 end

20

21 assign C = c_reg;

twenty two

23 endmodule24

Param.h code is as follows

1 parameter LENTH = 32;

Integrated RTL diagram

We offer Industry's leading lipo cells from Panasonic, Sanyo, Samsung, ATL, Wanma, HYB, DLG, BAK, as well as sourcing low cost cells from other small size Lipo cell factories.  There are regular lipo cells with discharge rate below 1C, and high discharge rate lipo cells up to 40C.  

lithium polymer battery, Lithium Ion Polymer Battery, polymer battery, lithium polymer, 3.7 v Lipo Battery , lipo, batterie lithium polymère,  li ion li polymer,  batterie lipo,  li po, lithium ion vs lithium polymer.

3 v battery, 3 volt lipo battery, 3v lithium, 3.2 v lipo battery,  
3.2 volt lithium battery, 3.2v Lithium Ion Battery, 3.3 v battery pack, 
3.3v lipo battery, 3.5 volt Rechargeable Batteries
3.6 Lithium Ion polymer battery, 3.6 v LiPo, 3.6 volt LIP,  
3.7 volt single cell battery pack, 3.7v 1s Lipo, 
3.8 lipo cell, 3.8 v Lipo Rechargeable Battery, 3.8v rechargeable batteries, 
3.7 Li-poly, 3.7 lithium-poly, 3.7 v battery cell.
4 v li battery, 4.2 v lipo battery, 4.2 volt lithium ion polymer rechargeable battery.

Lipo Battery

Lipo Battery,Lithium Ion Polymer Battery,Lipo Rechargeable Battery,Lithium-Poly Battery

Asarke Industry Co., Limited , https://www.asarke-industry.com