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

Purpose of pointer phrase in string command, The Purpose of POINTER phrase ...

The Purpose of POINTER phrase is to verify the leftmost position within receiving field where the first transferred character will be kept

Function modules are also external subroutines, Function Modules are also e...

Function Modules are also external Subroutines. True.

Data packets - universal serial bus, Data packets: A data packet consi...

Data packets: A data packet consists of the PID which is followed a 16-bit CRC and by 0-1023 bytes of data payload (up to 1024 in high speed and at most 8 at low speed) The

Forward chaining, Forward Chaining: Now we have suppose we have a set ...

Forward Chaining: Now we have suppose we have a set of axioms that we know are true statements about the world. Whether we set these to each be an initial state of the segoal

Explain about decimal numbers, Q. Explain about Decimal Numbers? Deci...

Q. Explain about Decimal Numbers? Decimal number system has 10 digits signified by 0,1,2,3,4,5,6,7,8 and 9. Any decimal number can be signified as a string of these digits an

Don''t care states, The conflict between too hot and too cold or too slow a...

The conflict between too hot and too cold or too slow and too fast can be resolved using don't care states. Don't care states are used when i) the state of the output is not

How aliases are used in DNS, How aliases are used in DNS? Explain. CNAM...

How aliases are used in DNS? Explain. CNAME entries are analogous to a symbolic link in a file system- the entry gives an alias for other DNS entry. Corporation of expertsmind

Translating from english to first-order logic, Translating from English to ...

Translating from English to First-Order Logic: Still we have now seen some of examples of first order sentences, than you should practice writing down English sentences in fir

What is public, * Public, protected and private are 3 access specifier in C...

* Public, protected and private are 3 access specifier in C++. * Public data members and member functions are accessible outside the class. * Protected data members and memb

Rationales for an effective and independent regulator, Question: (a) W...

Question: (a) What are the rationales for an effective and independent regulator? (b) Across Africa, regulators have established Universal Service Funds (USFs) in order to

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