State the structure of verilog code you follow, Computer Engineering

Assignment Help:

State the structure of Verilog code you follow?

A good template for your Verilog file is shown below.

// timescale directive tells the simulator the base units and precision of the simulation

'timescale 1 ns / 10 ps

module name (input and outputs);

// parameter declarations

parameter parameter_name = parameter value;

// Input output declarations

input in1;

input in2; // single bit inputs

output [msb:lsb] out; // a bus output

// internal signal register type declaration  -  register types (only assigned within always statements).

reg register variable 1;

reg [msb:lsb] register variable 2;

// internal signal. net type declaration - (only assigned outside always statements) wire net variable 1;

// hierarchy - instantiating another module

reference name instance name (

.pin1 (net1),

.pin2 (net2),

.

.pinn (netn)

);

// synchronous procedures

always @ (posedge clock)

begin

.

end

// combinatinal procedures

always @ (signal1 or signal2 or signal3)

begin

.

end

assign net variable = combinational logic;

endmodule

 


Related Discussions:- State the structure of verilog code you follow

I2c protocol bus , I²C TECHNOLOGIES The I2C protocol bus is two bi-dire...

I²C TECHNOLOGIES The I2C protocol bus is two bi-directional wires, serial data (SDA) and serial clock (SCL), that transmit information between the devices connected to the bus.

increase the number of rows or columns in a worksheet, How can I increase ...

How can I increase the number of rows or columns in a worksheet? Ans) In Excel, each workbook has 255 columns and 65,526 rows. These values are fixed and cannot be changed. If

Use of parallel construct with private clause, Q. Use of parallel construct...

Q. Use of parallel construct with private clause? In this example we would see use of parallel construct with private and firstprivate clauses. At end of program i and j remain

What is the task of the pass 2 in a two-pass assembler, In a two-pass assem...

In a two-pass assembler, the task of the Pass II is to? Ans. The task of the Pass II is to synthesize the target program in a two-pass assembler.

Compute total and access methods, Write a program that input (from the user...

Write a program that input (from the user) the number of hours worked and hours pay rate for employees and output their total pay. The program should process an arbitrary number of

Grapgh, representation of the adjacency matrix and adjacency list

representation of the adjacency matrix and adjacency list

What is status control and registers, Q. What is Status Control and Registe...

Q. What is Status Control and Registers? Status Control and Registers: These registers can't be used by programmers though are used to control CPU or execution of a program.

Texts in the text elements of the program, Which Texts  in the text elemen...

Which Texts  in the text elements of the program helps in changing the displayed names of variables in the parameters statement. Selection text in the elements of the program

Explain the use of structures with pointers., Explain the use of structures...

Explain the use of structures with pointers C permits a pointer to a structure variable. In fact a pointer to a structure is same to a pointer to any other variable. The pointe

What is the use of the statement leave to list-processing, What is the use ...

What is the use of the statement Leave to List-processing? Leave to List-processing statement is used to make a list from a module pool.  Leave to list processing statement per

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd