Quick Verilog Questions

Status
Not open for further replies.

easytarget

Member level 1
Joined
Apr 12, 2005
Messages
36
Helped
5
Reputation
10
Reaction score
1
Trophy points
1,288
Activity points
1,627
Hi,

I'm learning Verilog and I have questions, I'll put them in this thread and your help is appreciated, questions in red are still not aswered, questions in blue are answered. I'll add the answers in this post so others can easily find them.

1- What does it mean when a variable is preceded by ` like this:

wire [`address_size-1:0] addr


Anwer (thanks to vomit):
`address_size is a macro.

2- Can you please explain this:

`define size (1 << `set_size)

Thanks for your help
 

These 2 questions are related: the address_size is not a variable but a macro. Where you use it you have to precede it by a tick mark.
 

    easytarget

    Points: 2
    Helpful Answer Positive Rating
Thanks vomit, there was no `define statement in that file, I guess it can be in another file.
I still don't know the answer to the other question, what's does this (1 << `set_size) do?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…