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

Explain about the public key cryptography, Explain about the Public Key Cry...

Explain about the Public Key Cryptography. Public Key Cryptography: It is a cryptographic system which uses two keys as a public key identified to everyone and a private

stores on each line a part number, Make a file "parts_inv.dat" that stores...

Make a file "parts_inv.dat" that stores on each line a part number, cost, and quantity in inventory, e.g.: 123 5.99 52 456 3.97 100 333 2.22 567 Use fscanf to read this infor

Design 4 to 1 multiplexer with strobe input using nand gates, Design a 4 : ...

Design a 4 : 1 multiplexer with strobe input using NAND gates. Ans. Design of 4 : 1 multiplexer with strobe input using NAND gates.

Create an input buffer, Q. Create an input buffer ? CODE SEGMENT ......

Q. Create an input buffer ? CODE SEGMENT ... MOV AH, 0AH                       ; Move 04 to AH register MOV DX, BUFF                   ; BUFF must be defined in data

Define addressing modes, Define addressing modes. The dissimilar ways i...

Define addressing modes. The dissimilar ways in which the location of an operand is specified in an instruction are referred to as addressing modes.

Pebble merchant, There is a pebble merchant.He sells the pebbles,that are u...

There is a pebble merchant.He sells the pebbles,that are used for shining the floor.His main duty is to take length of the room''s sides. program 1 : package test.padovanstring

Automatic switching system and manual switching system, Discuss the advanta...

Discuss the advantages of automatic switching systems over manual switching system. Automatic switching systems have some advantages over the manual exchanges: 1. In a manua

Important steps of the boot process, Question: Computer forensic examin...

Question: Computer forensic examiners should be concerned with at least two important settings stored in RTC/NVRAM, which is accessed by the BIOS software most often called Set

Show the responsibilities of session layer, Q. Show the Responsibilities of...

Q. Show the Responsibilities of session layer? Session layer: Main functions of this layer are to establish, synchronize and maintain the interaction between two communicatio

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