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

Explain macro definition, Explain macro definition. A unit of specifica...

Explain macro definition. A unit of specification for a program generation is termed as a macro. This consists of name, body of code and set of formal parameters.

Why smtp used as transfer protocol for web pages, Can SMTP be used as trans...

Can SMTP be used as transfer protocol for Web pages? Why? SMTP is an easy mail transfer protocol. This uses ASCII text for all communications. SMTP needs reliable delivery- the

Explain the following gray code, Q. Explain the following: a) Gray code ...

Q. Explain the following: a) Gray code b) Parity code c) Overflow Q. Give the counting up to 30 in Base 5. Q. Convert (175.6)8 into Gray code and Excess-3 code.

Explain micro-operations performed by cpu, Q. Explain Micro-operations perf...

Q. Explain Micro-operations performed by CPU? The micro-operations performed by CPU can be categorized as:    Micro-operations for data transfer from register-memory, re

Minterms, A minterm is an AND expression involving all input variables in e...

A minterm is an AND expression involving all input variables in either inverted or non-inverted form.For one particular row the associated mintermis the only minterm which equals l

Concept of multithreading, Concept of Multithreading: This problem ris...

Concept of Multithreading: This problem rises in design of large scale multiprocessors like MPP. So a solution for optimizing this latency must be acquired at. The idea of Mul

What is assembly language, What is assembly language? A complete set of...

What is assembly language? A complete set of symbolic names and rules for the use of machines comprise a programming language, usually referred to as an assembly language.

What is virtual memory, What is virtual memory? Method that automatical...

What is virtual memory? Method that automatically move program and datablocks into the physical main memory when they are needed for execution are known as virtual memory.

Classify process and differentiate program, Classify Process, differentiate...

Classify Process, differentiate program, process A process maybe concerned to be a program being run. A program isn't a process of itself; it's a passive Entity while the proce

Internal structure of agents - artificial intelligence, Internal Structure ...

Internal Structure of Agents: We have looked at agents in terms of their external influences and behaviors: they put in from the surroundings and perform rational actions to a

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