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

Design requirements of sequential circuit, What are the Requirements to des...

What are the Requirements to design Sequential circuit Ans . Design Requirements of Sequential circuit: (i) The circuit specifications translated into a state diagram

Evidence of intelligent behavior - artificial intelligence, Evidence of int...

Evidence of intelligent behavior - Artificial Intelligence: Machines mean they could simply be personal computers, or they could be robots with embedded automative systems, or

How is the connectivity established in verilog, How is the connectivity est...

How is the connectivity established in Verilog when connecting wires of different widths? When connecting wires or ports of different widths, connections are right-justified, S

Designing logic circuits, When designing a logic circuit with multipleoutpu...

When designing a logic circuit with multipleoutputs it is usual to treat it as several circuitseach with one output. So for our example wewould design three circuits; one with outp

Illustrate about fat structure, Q. Illustrate about FAT structure? DOS ...

Q. Illustrate about FAT structure? DOS file system maintains a table of pointers known as FAT (File allocation table) that comprises an array of 16-bit values. There is one ent

Lifo under perpetual inventory procedure, Q. LIFO under perpetual inventory...

Q. LIFO under perpetual inventory procedure? LIFO under perpetual inventory procedure observes Exhibit to see the LIFO method using perpetual inventory procedure. In this proce

How to attain 180 degree precise phase shift, How to attain 180 degree prec...

How to attain 180 degree precise phase shift? Never tell using inverter: a. DCM an inbuilt resource into most of FPGA can be arranged to get 180 degree phase shift. b. BU

Explain naming convention globals, Explanation The values of global vari...

Explanation The values of global variables can be used and changed all over the project within all scripts and libraries. However it is highly recommended to remain the number o

Explain combinational logic circuits, Explain Combinational logic circuits ...

Explain Combinational logic circuits Ans. Combinational logic circuits:- (i) Outputs only depend upon present state of the input. (ii) No memory element present or no f

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