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

Memory, #all type of memory

#all type of memory

Input a list of positive numbers, Input a list of positive numbers, termina...

Input a list of positive numbers, terminated by 0, into an array Numbers. Then display the array and the largest and smallest number in it.

What is store program control, What is store program control (SPC)?  I...

What is store program control (SPC)?  In  stored  program  control  systems,  a  set  of  instructions  or  program  to  the computer  is  stored  in  its  memory  and  instru

To show - hide the ssi document in the page, Step 1: Click on Edit Step ...

Step 1: Click on Edit Step 2: Select reference Step 3: Select Translation Step 4: Click on SSI Step 5: For showing the SSI file; choose one of the following options:

What is byte addressable memory, What is byte addressable memory? The a...

What is byte addressable memory? The assignment of successive addresses to successive byte locations in the memory is known as byte addressable memory.

Describe the graphic accelerators, Q. Describe the Graphic Accelerators? ...

Q. Describe the Graphic Accelerators? A Graphic Accelerator is actually a chip as a matter of fact most significant chip in your video card. The Graphic Accelerator is essentia

How to make frames for web documents, Q. How to make frames for web documen...

Q. How to make frames for web documents? Intelligent use of frames can give your pages a cleaner look and make easier to navigate. The fundamental concept goes like this: Every

Design principles, The usability and user experience goalsprovidet heintera...

The usability and user experience goalsprovidet heinteraction designer with high-level goals for the interactivep roduct. Thenextissueis how to design a product that satisfies thes

What is priority interrupt, What is Priority interrupt. It is a system ...

What is Priority interrupt. It is a system that establishes a priority over the several resources to determined which condition are to be serviced first when two or more reques

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