Mar 14, 2011 #1 J 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
can somebody please explain the following assign for me: bit_counter <= `COMMAND_BITS; I couldn't know what does the quote mark do? thank
Mar 14, 2011 #2 mrflibble Advanced Member level 5 Joined Apr 19, 2010 Messages 2,720 Helped 679 Reputation 1,360 Reaction score 652 Trophy points 1,393 Activity points 19,551 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.
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.
Mar 15, 2011 #3 J 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 Thank you very much. you were really helpful. thanks again.