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 tree, Tree (recursive definition) A tree is a finite set of one...

Tree (recursive definition) A tree is a finite set of one or more than one nodes such that. (1) There is a specially designated node known as the root. (2) The left over

Related to Project, PROCEDURE TO CREATE PROJECT IN COLLABORATION SYSTEM

PROCEDURE TO CREATE PROJECT IN COLLABORATION SYSTEM

Define top-down parsing techniques, Define Top-down parsing Techniques ...

Define Top-down parsing Techniques Top-down parsing can be observed as an attempt to find left-most derivations of an input-stream through searching for parse trees using a top

State the datatypes of verilog, State the datatypes of Verilog Verilog....

State the datatypes of Verilog Verilog. Compared to VHDL, Verilog data types are very simple, easy to use and very much geared towards modeling hardware structure as opposed to

Draw a circuit of TTL gates with Wired-AND connection, Draw a circuit of TT...

Draw a circuit of TTL gates with Wired-AND connection and explain its operation. Wired - AND Connection In digital IC's NAND and NOR gates are most frequently used. For th

Determine the octal equivalent of decimal number, The octal equivalent of (...

The octal equivalent of (247) 10 is ? Ans. (247) 10 = (367) 8

System software, define the properties of interactive operating systems

define the properties of interactive operating systems

Explain the use of ssl to secure the network, Explain the use of SSL to sec...

Explain the use of SSL to secure the network.  SSL (Secure Sockets Layer) is a protocol developed by Netscape for transferring private documents by the Internet. SSL works by u

Define system space, Define system space.  Management routines are part...

Define system space.  Management routines are part of the operating system of the computer. It is suitable to assemble the OS routines into a virtual address space.

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