State the term- use a define function, Computer Engineering

Assignment Help:

State the term- Use a define function

This is almost exactly the same approach as #define and -D compiler arg that C programs use. In your  Verilog  code,  use  a  'define  to  define  the  variable  condition  and  then  use  Verilog preprocessor directives such as 'ifdef. Use the '+define+' Verilog command line option. For an illustration:

... to run the simulation ..

verilog testbench.v cpu.v +define+USEWCSDF

... in your code ...

'ifdef USEWCSDF

initial $sdf_annotate (testbench.cpu, "cpuwc.sdf");

'endif

+define+ can also be filled in from your Makefile invocation, which in turn, can be finally filled in your UNIX prompt command line.

Defines are a blunt weapon since they are very global and you can only do so much with them asthey are a pre-processor trick. Consider the subsequent approach before resorting to defines.

 


Related Discussions:- State the term- use a define function

Difference between abstract class and interface, Abstract class: Abstract c...

Abstract class: Abstract classes are the class where one or more methods are abstract but not essentially all method has to be abstract. Abstract methods are the methods, which are

Explain virtual memory, In a memory hierarchy system, data and programs are...

In a memory hierarchy system, data and programs are first stored in secondary or auxiliary memory. Program and its related data are brought in main memory for execution. What if th

Final project, I need help coming with an idea for BSCE final project, whic...

I need help coming with an idea for BSCE final project, which is solvable in about a semester

Write a pseudocode for a program, Write a pseudocode for a program that acc...

Write a pseudocode for a program that accepts 10 numbers from a user and calculates the sum of all the numbers entered that are greater than or equal to 10.

Illustrate domain name system, Q. Illustrate Domain Name System? Domain...

Q. Illustrate Domain Name System? Domain name is a name which is given to a network for ease of reference. Domain refers to a group of computers which are known by a single com

Inverse of exclusive or known as xnor gate, Truth table of NAND and NOR can...

Truth table of NAND and NOR can be made from NOT (A AND B) and NOT (A OR B) correspondingly. Exclusive OR (XOR) is a special gate whose output is one only if two inputs aren't equa

Define bootstrap loader, Define bootstrap loader? The ROM portion of ma...

Define bootstrap loader? The ROM portion of main memory is required for storing an initial program known as bootstrap loader. It is a program whose function is to start the com

Name the two operations of stack, Name the two operations of stack A st...

Name the two operations of stack A stack has only two operations and they are insertion and deletion of items. The operation insertion is called push (or push-down) as it can b

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