Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9582751

Have any Question?


Related Questions in Computer Engineering

Anz is offering a product that pays out 3000 quarterly from

ANZ is offering a product that pays out $3,000 quarterly from the end of Mar 2021 to the end of Dec 2030 with annual interest rate 6% compounded quarterly. (e.g. payment is made at the end of every March, June, September ...

What are the minimum and maximum values in decimal if an

What are the minimum and maximum values (in decimal) if an 8-bit binary number is given unsigned and two's complement formats?

Cullumber inc has issued a three-year bond that pays a

Cullumber, Inc., has issued a three-year bond that pays a coupon rate of 7.3 percent. Coupon payments are made semiannually. Given the market rate of interest of 4.4 percent, what is the market value of the bond?  (Round ...

Referring to the in class rectangleclass examplelt

Referring to the in class RectangleClass example: class RectangleMain{ > static void main(String[] args)> use to test You will Create a Class named and RtTriangleMain { > args)> to test your The will: 1)Establish Two pub ...

Need a use case diagram for a case studythe case studypaul

Need a use case diagram for a case study: The case study Paul is the Director of IT Services for a consulting firm Avant. The firm has been growing fast since it was launched in 2010. With over 100 employees and hundreds ...

Starting with this provided code add the following

Starting with this provided code, add the following functionality: Add the numbers 3 through 10 to the hashtable continuing in the same manner as shown. Prompt the user for a string, and display the corresponding number. ...

Can someone answer this c questionimplement a base class

Can someone answer this C++ question? Implement a base class Person. Derive classes Student and Instructor from Person. A person has a name and a birthday. A student has a major, and an instructor has a salary. Write the ...

Question a student has a first name fname a last name lname

Question : A student has a first name (fname), a last name (lname), an identification number (id), a gender (male/female), a course name (cname) and the number of lectures (lcount) attended by the student. a. Define gend ...

Question what specific benefits does the ebk provide to any

Question : What specific benefits does the EBK provide to any organization? Why are those particular benefits important to the overall organization? Specifically, what is it about the EBK that makes it particularly usefu ...

Determine the number of moles of oleic acid in the

Determine the number of moles of oleic acid in the monolayer. Assume the nubmer of grams of oleic acid in the monolayer is  7.12×10 -6  g MW for oleic acid is 282 g/mol.

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As