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 is analysis and list its sub stages, What is analysis, list its sub st...

What is analysis, list its sub stages? Understand the requirement by constructing models. The goal of analysis is to state what need is to be done and not how it is to be done.

C program, In this problem you are given a board in which some of the eleme...

In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color. Fill the other elements in the board, suc

Network properties, Network Properties There are many properties are as...

Network Properties There are many properties are associated with interconnection networks:- 1) Topology: It signify how the nodes a network are organised. A variety of top

Explain communications and synchronization, Communications Parallel t...

Communications Parallel tasks normally have to exchange data. There are various manners in which this can be achieved like over a network or through a shared memory bus. The

Explain about two-pass assembler, Q. Explain about Two-pass assembler? ...

Q. Explain about Two-pass assembler? Assemblers usually make two or more passes through a source program in order to resolve forward references in a program. A forward referenc

Explain the advantages of computer, Explain the advantages of computer ...

Explain the advantages of computer Computer is one of the main components of an Information Technology network and getting increasing popularity. Nowadays, computer technology

Describe the three mapping techniques, Describe the three mapping technique...

Describe the three mapping techniques used in cache memories with suitable Example. The cache memory is a fast memory that is inserted among the larger slower main memory and t

What is ''LRU'' page replacement policy, 'LRU' page replacement policy is ?...

'LRU' page replacement policy is ? Ans. Least Recently Used.

Show the features of hyper-threading, Q. Show the Features of Hyper-threadi...

Q. Show the Features of Hyper-threading? The significant characteristics of hyper threading are: i) Improved response time and reaction, as well as increased number of users

Computer graphics, what isAdvantages of scan line algorithm, Computer Graph...

what isAdvantages of scan line algorithm, Computer Graphics?

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