Use verilog function to define the width of a multi-bit port, Computer Engineering

Assignment Help:

Can I use a Verilog function to define the width of a multi-bit port, wire, or reg type?

Width  elements  of  ports,  wire  or  reg  declarations  require  a  constant  in  both  LSB and  MSB  . Before  Verilog  2001,  it's  a  syntax  error  to  specify  a  function  call  to  evaluate  the  value  of  these widths. For instance, the below code is erroneous before Verilog 2001 version.

reg [ get_high(val1:vla2) : get_low (val3:val4)] reg1;

In the above illustration, get_high and get_low are both function calls of evaluating a constant result for MSB and LSB correspondingly. However, Verilog-2001 allows the use of a function call to evaluate LSB or MSB of a width declaration.

 


Related Discussions:- Use verilog function to define the width of a multi-bit port

A subroutine can be terminated unconditionally using exit, A subroutine can...

A subroutine can be terminated unconditionally using EXIT. True.

Illustrate about the three state table buffers, Three state table buffers ...

Three state table buffers Three state table buffers: A bus system can be constructed with the help of three state gates instead of multiplexers. A three states gate is digital

Phython, super ascii string checker

super ascii string checker

What is a digital multiplexer, What is a digital multiplexer?  Ans: ...

What is a digital multiplexer?  Ans: Multiplexer: Data selector or MUX is a logic circuit selects binary information from one of several input and directs this to a sing

Average waiting time, Customer arrivals at a gas station can be characteriz...

Customer arrivals at a gas station can be characterized by exponential distribution with mean of 10 minutes. The amount of time they take to pump gas can be characterized by an ex

Pros and cons of general purpose register architecture, Q. Pros and Cons of...

Q. Pros and Cons of general purpose register architecture? General Purpose Register Architecture: Pros and Cons Registers can be employed to store variables as it decrea

Explain is cgi a script or a program, The distinction is semantic. Traditio...

The distinction is semantic. Traditionally, compiled executables (binaries) are known as programs, and interpreted programs are usually known as scripts. In the context of CGI, the

Compare ss7 architecture with seven-layer osi architecture, Compare the arc...

Compare the architecture of SS7 with seven-layer OSI architecture The relationship among these levels and the layers of the OSI model is demonstrated in figure. The user part i

Define exception, Define exception. The term exception is used to trans...

Define exception. The term exception is used to transfer to any event that causes an interruption

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