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

Breadth first search, Breadth First Search: Given a set of operators o...

Breadth First Search: Given a set of operators o1, ..., on in a breadth first search, every time a new state is reached, an action for each operator on  s  is added to the bot

Hazard in pipeline - computer architecture, Hazard in pipeline - computer a...

Hazard in pipeline - computer architecture: A hazard in pipeline .-removing a hazard frequently need that some instructions in the pipeline to be permitted to proceed as othe

No-signs to the write statement, Suppressing the number signs (+/-) is carr...

Suppressing the number signs (+/-) is carried out using the addition NO-SIGNS to the Write statement.  Statement is wrong.

Role of world wide web in the field of e-commerce, Explain the role of Worl...

Explain the role of World Wide Web in the field of e-commerce.  In the 1990s, the arrival of the World Wide Web on the Internet had shown a turning point in e-commerce by givin

Explain the use of ssl to secure the network, Explain the use of SSL to sec...

Explain the use of SSL to secure the network.  SSL (Secure Sockets Layer) is a protocol developed by Netscape for transferring private documents by the Internet. SSL works by u

Explain the passive matrix in lcd technology, Q. Explain the Passive Matrix...

Q. Explain the Passive Matrix in lcd technology? In a passive matrix arrangement LCD panel has a grid of vertical and horizontal conductors and every pixel is positioned at an

Power supply in computer system, Q. Power supply in computer system? Co...

Q. Power supply in computer system? Computer operate electronically- either by power supply attained from your electric plug or batteries in case of portable computers. Though

create a class called auditorium, Create a class called auditorium that sp...

Create a class called auditorium that specifies the seats in the auditorium. The class should include at least one data item: seat (two dimensional array of Char) and at least thre

Design and development of an information system, This assignment consists o...

This assignment consists of design and development of an information system. The first part of the assignment consists of the design, which includes construction of ER and DFD diag

What is a unix device driver, A UNIX device driver is ? Ans. A UNIX devi...

A UNIX device driver is ? Ans. A UNIX device driver is structured in two halves termed as top half and bottom half.

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