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 "at exit-command", What is "at exit-command:? The flow logic K...

What is "at exit-command:? The flow logic Keyword at EXIT-COMMAND is a special addition to the MODULE statement in the Flow Logic .AT EXIT-COMMAND lets you call a module befor

Processes vs threads, One might argue that in general processes are more ?e...

One might argue that in general processes are more ?exible than threads. For one thing, they can live in two different machines, and communicate via sockets; they are easy to spawn

Explain step by step switching system with neat diagram, With the help of a...

With the help of a neat diagram explain a step by step switching system. Configuration of a step by step switching system: A step by step switching system may be constr

Explain the message passing interface, Q. Explain the Message Passing Inter...

Q. Explain the Message Passing Interface? The Message Passing Interface (MPI) is a universal benchmark for providing communication among multiple simultaneous processes on a di

Shell scripting, Write a script called addnames that is to be called as fol...

Write a script called addnames that is to be called as follows, where classlist is the name of the classlist file, and username is a particular student''s username. ./addnames cla

Replacement and substitution, Replacement and substitution: However, e...

Replacement and substitution: However, equivalences allow us to change one sentence with another without affecting the meaning, it means we know already that replacing one sid

Define parsing, Define Parsing Parsing is the method of analyzing a te...

Define Parsing Parsing is the method of analyzing a text, made up of a sequence of tokens, to define its grammatical structure with respect to a given formal grammar. Parsing

What is the cih, CIH, also known  as Chernobyl or Spacefiller, is a Microso...

CIH, also known  as Chernobyl or Spacefiller, is a Microsoft Windows computer virus which first emerged in 1998. It is one of the most damaging viruses, overwriting critical inform

Discuss the classifications of switching systems, Discuss the classificatio...

Discuss the classifications of switching systems. The categorizations of switching systems are specified in the block diagram given below:

Design a alarm system - microprocessor system, A burglar alarm system is co...

A burglar alarm system is controlled by a microprocessor system. The system has three independent circuit each consisting of 7 passive infra red sensors. The controller can be prog

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