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

Importance of spectrum to the mobile sector, (a) The statement "Standards ...

(a) The statement "Standards create markets or markets create standards" has been the subject of considerable debate. Discuss the advantages and disadvantages to having multiple

Illustrate clock signals of clock pulse generator, Q. Illustrate Clock sign...

Q. Illustrate Clock signals of clock pulse generator? Synchronization in a sequential circuit is attained by a clock pulse generator that gives continuous clock pulse.  Figure

Define the karnaugh maps (k maps), Define The Karnaugh Maps (K Maps) Th...

Define The Karnaugh Maps (K Maps) The Karnaugh map (K map) provides the systematic method for simplifying a Boolean expression or a truth table function when used properly the

Simplified boolean expression, Simplified the Boolean Algebra (x + y)(x + z...

Simplified the Boolean Algebra (x + y)(x + z) simplifies to ? Ans. x + yz as simplified the Boolean Algebra expression. [(x + y) (x + z)] = xx + xz + xy + yz = x + xz + xy + y

C++, explain parallel database system

explain parallel database system

Comparison between risc and cisc - computer architecture, Comparison betwee...

Comparison between risc and cisc - computer architecture: CISC  Emphasis on hardware  Includes multi-clock complex instructions  Memory-to-memory

What are the steps in executing the program, What are the steps in executin...

What are the steps in executing the program? 1.Fetch 2.Decode 3.Execute 4.Store

What is an interrupt, What is an interrupt?  An interrupt is an event t...

What is an interrupt?  An interrupt is an event that causes the implementation of one program to be suspended and another program to be implemented.

Hazard, how to calculate delay for hazard?

how to calculate delay for hazard?

Explain problem-oriented and procedure-oriented language, Explain differenc...

Explain difference between Problem-oriented and procedure-oriented language. Problem-oriented and procedure-oriented language: The programming languages which can be utilized

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