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

Plastic Spool

About Plastic Spool

For package of enameled copper and aluminium wire ,we also product plastic spool.White ,black, blue, and can be producted by requirements of clients.most of products' material are ABS.

PT 25/ PT 60/ PT 90/ PT 200 and DIN 250 and etc.


Plastic SpoolPlastic Spool

Product Process:

Material Ready-Production-demolding-deburring-Quality test-packing-shipping.It depends on the parts we made. Besides, we will maintain or replace the mould by ourselves.Hot processing molding, injection molding, extrusion is process of Plastic spool or bobbin.


Plastic Spool,Plastic Small Empty Wire Bobbin,High Quality Plastic Bobbin,Small Empty Wire Bobbin

HENAN HUAYANG ELECTRICAL TECHNOLOGY GROUP CO.,LTD , https://www.huaonwire.com