Determine the uses of defparam, Computer Engineering

Assignment Help:

Using defparam

Parameter values can be changed in any module instance in the design with keyword defparam. Hierarchical name of the module instance can be used to override parameter values.

//Define a module hello-world

module hello-world;

parameter id-num = 0; //define a module identification number = 0

initial //display the module identification number

Sdisplay("Disp1aying hello-world id number = %dM, id-num);

Endmodule

//define top-level module

module top;

//change parameter values in the instantiated modules

//Use defparam statement

defparam wl.id-num = 1, w2.id-num = 2;

//instantiate two hello-world modules

hello-world wl0;

hello-world w2 ( ) ;

endmodule

Module hello-world was defined with a default id-num = 0. Though, when module instances wl  and w2 of the type hello-world are created, their id-num values are modified with defparam statement.

If we simulate above design, we would get the below output:

Displaying hello-world id number = 1

Displaying hello-world id number = 2

Multiple defparam  statements  can  appear  in  a  module.  Any parameter  can  be  overridden  with  the defparam statement.

 


Related Discussions:- Determine the uses of defparam

Give introduction to object oriented analysis and design, Introduction to o...

Introduction to object oriented Analysis & design: tools In case of OOAD, Unified Modelling Language (UML) is a well accepted language. It is used for constructing, visualizin

QUELING SYSTEM, Q.SHOW THAT AVERAGE NUMBER OF UNIT IN A (M/M/1) QUELING SYT...

Q.SHOW THAT AVERAGE NUMBER OF UNIT IN A (M/M/1) QUELING SYTEM IS EQUAL TO P/(1-p). NOTE:P=ROW

Bounded rationality in decision making, Q.What do you mean by the term 'bou...

Q.What do you mean by the term 'bounded rationality in decision making'? Maximizing the outcomes of a decision is an ideal stage. Habitually it is an impossible thing. The caus

What are the advantages of hierarchical networks, What are the advantages o...

What are the advantages of Hierarchical Networks? Hierarchical networks are able of handling heavy traffic where needed, and at similar time use minimal number of trunk groups

How to set a read or write watch point for a variable, By using Rwatch, Awa...

By using Rwatch, Awatch command in GDB we can set read or write watchpoint for a variable.

Functionality of hyper thread processor, Hyper-threading works by duplicati...

Hyper-threading works by duplicating those sections of processor that kept the architectural state-but not duplicates the main implementation resources. This allows a Hyper-threadi

How to clear computer motherboard cmos password, As CMOS is a special chip ...

As CMOS is a special chip with its own battery, the best way to clear out a CMOS chip is to cut off it from its power supply. To clear the CMOS password you just take away the

State about an active graphics device, State about An active graphics devic...

State about An active graphics device An active graphics device allows the user to communicate with the computer graphically. Generally, this implies that the user is supplyin

What is .net and .net framework, What is .NET / .NET Framework?  It is ...

What is .NET / .NET Framework?  It is a Framework in which Windows applications might be developed and run. The Microsoft .NET Framework is a platform for building, deploying,

Explain hypertext transfer protocol, Explain Hypertext Transfer Protocol. ...

Explain Hypertext Transfer Protocol. HTTP is used mainly in today's society like a set of rules for exchanging files (graphic images, text, sound, other multimedia files or vid

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