Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Verilog Help (quote mark)

Status
Not open for further replies.

jihadmoussa

Newbie level 5
Joined
Sep 28, 2010
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,342
can somebody please explain the following assign for me:
bit_counter <= `COMMAND_BITS;

I couldn't know what does the quote mark do?
thank
 

Code:
`define COMMAND_BITS 4

bit_counter <= `COMMAND_BITS;

Does the same as:
Code:
bit_counter <= 4;

But with regard to coding style, you will probably want to use the "parameter" or "localparam" verilog directive for that.

Code:
parameter COMMAND_BITS = 4;

bit_counter <= (COMMAND_BITS); // better style IMO

Hope that helps.
 
  • Like
Reactions: jihadmoussa

    V

    Points: 2
    Helpful Answer Positive Rating

    jihadmoussa

    Points: 2
    Helpful Answer Positive Rating
Thank you very much.
you were really helpful.

thanks again.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top