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

What do you meant by hosts, Q. What do you meant by Hosts? Hosts are in...

Q. What do you meant by Hosts? Hosts are in general, individual machines at a specific location. Resources of a host machine is generally shared and can be utilized by any user

And-introduction rule, And-Introduction: In generally English says tha...

And-Introduction: In generally English says that "if we know that a lot of things are true, so we know that the conjunction of all of them is true", then we can introduce conj

.master-slave flip flop, JK, SR, D master FF 1)draw block diagram 2) combin...

JK, SR, D master FF 1)draw block diagram 2) combinational circuits using NOR & NAND gate thank you

Explain program interpretation process, Explain program interpretation pr...

Explain program interpretation process. In a program interpretation process , the interpreter reads the source program and stores this in its memory. This bridges an executi

Determine the input and output devices, I/O devices need to be matched up t...

I/O devices need to be matched up to computer application. -  Computer-aided design (graph plotters, large screens, etc.) -  Virtual reality (data gloves, data goggles, etc.)

What is bea weblogic?, Ans) BEA Web Logic is a J2EE application server and ...

Ans) BEA Web Logic is a J2EE application server and also an HTTP web server by BEA Systems of San Jose, California, for UNIX, Linux, Microsoft Windows, and other platforms. Web Log

By which many computers are connected in geographical area, A large numbers...

A large numbers of computers in a wide geographical area can be efficiently connected using? A large numbers of computers in a broad geographical area can be efficiently linked

Program in java, Write a program to display grade message according to the ...

Write a program to display grade message according to the marks

How and what data is gathered- simulation, How and what data is gathered- S...

How and what data is gathered- Simulation To make this as realistic as possible, data is required to be gathered over a long period of time. This can be done by sensors near/i

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