State the use parameters and parameter definition modules, Computer Engineering

Assignment Help:

State the Use parameters and parameter definition modules.

Parameters aren't preprocessor definitions and they have scope (for example parameters are associated with specific modules). Parameters  are hence more clean, and if you are in the habit of using a lot of defines; consider switching to parameters. As an instance, let's say we have a test (e.g. test12) that needs many parameters to have specific settings. In your code, you might have this sort of stuff:

module testbench_uart1 (....) 

parameter BAUDRATE = 9600;

...

if (BAUDRATE > 9600) begin

... E.g. use parameter in your code like you might any general variable

... BAUDRATE is completely local to this module and this instance. You might

... have the same parameters in 3 other UART instances and they'd all be different

... values...

Now,  your  test12  has  all  sorts of  settings  required  for  it.  Let's  define  a  special  module  known as testparams  that specifies  all  these  settings.  It  would itself  be  a  module  instantiated  under  testbench:

module testparams;

defparam testbench.cpu.uart1.BAUDRATE = 19200;

defparam testbench.cpu.uart2.BAUDRATE = 9600;

defparam testbench.cpu.uart3.BAUDRATE = 9600;

defparam testbench.clockrate CLOCKRATE = 200; // Period in ns.

... etc ...

endmodule

Above  module  always  has  same  module  name  though you  would  have  many  different filenames;  one  for  each  test.  So,  above  would  be  kept  in  test12_params.v.  Your  Makefile includes appropriate  params file given desired make target. (BTW: You may run across this sort of approach by ASIC vendors who might have a module containing parameters for a memory model or you might see this used to collect together a large number of system calls which turn off timing or warnings on particular troublesome nets, etc.)

 


Related Discussions:- State the use parameters and parameter definition modules

Search mechanisms in prolog - artificial intelligence, Search mechanisms in...

Search mechanisms in Prolog We can utilize this simple Prolog program to describe how Prolog searches: president(X) :- first_name(X, georgedubya), second_name(X, bush). p

C, Write a ‘C’ functions to arrange the elements of an integer array in suc...

Write a ‘C’ functions to arrange the elements of an integer array in such a way that all the negative elements are before the positive elements. The array is passed to it as an arg

What are difference between latches and flipflops, What are difference betw...

What are difference between latches and flipflops? Difference : Latches are level-sensitive, while, flipflops is edge sensitive. It means to say edge sensitive that O/p change

Conversion of decimal number 82.67 to its binary equivalent, Conversion of ...

Conversion of Decimal number 82.67 to its Binary Equivalent Ans. Firstly see the integer part 82 and determine its binary equivalent  as The Binary equivalent is (101001

How do we draw in a different color in gimp, At the bottom of the toolbar t...

At the bottom of the toolbar there is a box with two lesser boxes and an arrow. The uppermost box displays the present foreground color; the lowermost box shows the present backgro

Explain direct broadcast & limited broadcast, Explain Direct broadcast & li...

Explain Direct broadcast & limited broadcast. Broadcast is a method to send a packet to all the stat ions on an exact network at once. Broadcast systems permit the possibility

Digital Design, Design a serial 2’s complementer with a shift register and ...

Design a serial 2’s complementer with a shift register and a flip-flop

Illustrate the purchase consummation activity, Illustrate the Purchase Cons...

Illustrate the Purchase Consummation activity? Purchase Consummation: This model lists three activities in the purchase consummation phase: • Receipt of product. • Pl

Swing, how to make a dfd of simple calculator?

how to make a dfd of simple calculator?

History of e-commerce, In 1960: The purpose of e-commerce was to exchange t...

In 1960: The purpose of e-commerce was to exchange the electronic data. In 1970s: Electronic Fund Transfers or EFT was developed which considered as huge impact in the emerging

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