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

Write decoder functionality in only one statement in verilog, Write decoder...

Write decoder functionality in only one statement in verilog module decoder( // Outputs dout, // Inputs din ); input [3:0] din; output [15:0] dout;

Discuss about fourth generation electronic computers, Fourth Generation (19...

Fourth Generation (1972-1984) The next generation of computer systems used the large scale integration (LSI -1000 devices per chip) and very large scale integration (VLSI - 100

Design a BCD to excess 3 code converter using NAND gates, Design a BCD to e...

Design a BCD to excess 3 code converter using minimum number of NAND gates. Hint: use k map techniques. Ans. Firstly we make the truth table: BCD no

Explain sequential sharing, Explain Sequential sharing. Sequential s...

Explain Sequential sharing. Sequential sharing: In this technique of sharing, a file can be shared through only one program at a time, it is file accesses by P1 and P2 are

DW, Define a job scheduling strategy that will meet business requirement of...

Define a job scheduling strategy that will meet business requirement of reporting availability by 6am CST for the following cubes

Radius of curvature in differential calculas, find the radius of curvature ...

find the radius of curvature at the point (3,3) at a point x3+xy2-6y2=0?

What are stacks, What are stacks? A stack  is an abstract data type in...

What are stacks? A stack  is an abstract data type in which items are additional to and removed only from one end known as TOP. For example, consider the pile of papers on you

Explain the multiple bus organization structure, Explain the multiple bus o...

Explain the multiple bus organization structure with neat diagram. The multiple bus organization is using more buses instead of one bus to decrease the number of steps needed an

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