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.

$display maximum value?

Status
Not open for further replies.

jmountney

Newbie level 2
Joined
Sep 3, 2013
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
14
Is there a maximum value $display can print to console window? I am running a 'for loop' and I want the console window to display some large values (e.g. 3.5 * 10^9). However, these numbers are getting displayed as large negative values. Does $display possibly interpret values as signed integers or two's compliment with a maximum bit width? Thanks in advance ...

Code:
for (k = 35000; k > 0; k = k - 1) begin
	#100000
	$display("Sector Erase finished in ", k*100000, " ns.");
end
 

Is there a maximum value $display can print to console window? I am running a 'for loop' and I want the console window to display some large values (e.g. 3.5 * 10^9). However, these numbers are getting displayed as large negative values. Does $display possibly interpret values as signed integers or two's compliment with a maximum bit width? Thanks in advance ...

Code:
for (k = 35000; k > 0; k = k - 1) begin
	#100000
	$display("Sector Erase finished in ", k*100000, " ns.");
end

"Expressions that are not written using a format specifier are written in decimal
format"

try $display("Sector Erase finished in %e", k*100000, " ns."); or
try $display("Sector Erase finished in %.1e", k*100000, " ns.");
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top