Importance of using module-instance parameter, Computer Engineering

Assignment Help:

Using Module-Instance Parameter:

Parameter values can be overridden while a module is instantiated. New parameter values are passed at the time of module instantiation. Top-level module can pass parameters.

//define top-level module

module top;

//instantiate two hello-world modules; pass new parameter values

hello-world #(l) wl; //pass value 1 to module wl

hello-world #(2) w2; //pass value 2 to module w2

endmodule

If multiple parameters are defined in module, during module instantiation they can be overridden by specifying new values in the same order as the parameter declarations in the module. If an overriding value isn't specified, default parameter declaration values are taken.

//define module with delays

module bus-master;

parameter delayl = 2;

parameter delay2 = 3;

parameter delay3 = 7;

...

...

Endmodule

 

//top-level module; instantiates two bus-master modules

module top;

//Instantiate the modules with new delay values

bus-master # (4, 5, 6) bl ( ) ; //bl : delayl = 4, delay2 = 5, delay3 = 6

bus-master # (9,4) b2 ( ) ; //b2: delayl = 9, delay2 = 4, delay3 = 7 (default)

endmodule

Module-instance,  parameter  value  assignment  is  a  very  useful  method  used  to  override  parameter values and to customize module instances.

 


Related Discussions:- Importance of using module-instance parameter

Explain about double error detection bit, Q. Explain about Double Error Det...

Q. Explain about Double Error Detection bit? Let's presume now that two bit errors take place in data. Data received: So on -matching we conclude P3-D3 pair doesn't

Hashing, what is hashing in database management system?

what is hashing in database management system?

Should we use cgi or an api, APIs are proprietary programming interfaces su...

APIs are proprietary programming interfaces supported by certain platforms. By using an API, you lose all portability. If you know your application will only ever run on single pla

What is immediate addressing, What is Immediate addressing The  data  i...

What is Immediate addressing The  data  itself,  beside  the address,  is  given  as  the  operand or operands  of  the instruction.

Explain the accuracy of an ADC, Explain the Accuracy o f an ADC. Ans...

Explain the Accuracy o f an ADC. Ans Accuracy- The accuracy of D to A converter is the difference among actual output voltage and the expected output voltage in D to A c

Explain the action of an interrupt processing routine, Explain the action o...

Explain the action of an interrupt processing routine? Action of an interrupt processing routine is as follows : 1. Save contents of registers of CPU. This action is not e

i open an ms access database, How can I open an MS Access database that ha...

How can I open an MS Access database that has been converted to a current version? Ans) MS Access is not backwards compatible. A workaround to share tables among different versi

Explain the advantages of object oriented analysis design, Advantages of Ob...

Advantages of Object oriented analysis design The OO approach inherently makes every object a standalone component which can be reused within specific stat problem domains we

Pipelined processor, Pipelined Processor Having discussed pipelining; n...

Pipelined Processor Having discussed pipelining; now we can describe a pipeline processor. A pipeline processor can be distinct as a processor that consists of a series of proc

Arrays, how to calculate students''s averange test scores

how to calculate students''s averange test scores

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