Jun 25, 2009 #1 B balan Member level 2 Joined Feb 18, 2007 Messages 44 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,286 Activity points 1,518 Let me know the output of this program module tb; reg [15:0] a; initial begin a=28'hff00; $display("a = %h",a); $display("a = %0h",a); $display("a = %7h",a); end endmodule
Let me know the output of this program module tb; reg [15:0] a; initial begin a=28'hff00; $display("a = %h",a); $display("a = %0h",a); $display("a = %7h",a); end endmodule
Jun 27, 2009 #2 B balan Member level 2 Joined Feb 18, 2007 Messages 44 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,286 Activity points 1,518 whether the result which i get is expected. 1st display ff00 2nd display ff00 3rd display ff00 Is that correct
whether the result which i get is expected. 1st display ff00 2nd display ff00 3rd display ff00 Is that correct
Jun 27, 2009 #3 S sheik_vb Member level 3 Joined Jul 21, 2006 Messages 58 Helped 3 Reputation 6 Reaction score 0 Trophy points 1,286 Activity points 1,510 Yes Correct.
Jun 28, 2009 #4 B balan Member level 2 Joined Feb 18, 2007 Messages 44 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,286 Activity points 1,518 The reg a is 16 bit, but the assignment is a = 28'h ff00 (assigned as 28 bit). In the display we have given as $display("%7h",a) I expect the value to be 000ff00. Please let me know does %7h has any effect.
The reg a is 16 bit, but the assignment is a = 28'h ff00 (assigned as 28 bit). In the display we have given as $display("%7h",a) I expect the value to be 000ff00. Please let me know does %7h has any effect.
Jun 28, 2009 #5 T tiger_cn Newbie level 2 Joined Jun 28, 2009 Messages 2 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,288 There must be something wrong with your answer. you can simular with modelsim and you can see de result are: 1st display ff00 2nd display ff 3rd display ___ff00 (_means Space bar)
There must be something wrong with your answer. you can simular with modelsim and you can see de result are: 1st display ff00 2nd display ff 3rd display ___ff00 (_means Space bar)