![]() ![]() In the O/P why is $realtime scaled to precision value of 100ns i.e 0.1us ? I expected that the real numbers be rounded to 1 decimal place so parameter d should have been scaled to 15.5us ,ĭelay of #1.1499 be scaled to 11.5us, delay of #1.1551 be scaled to 11. The closest you can get to 0.0047 is then 0.0046875. You want to have at least 45, that requires 6 bits. I then tried a similar code from LRM Section 22.7 with the timescale and timeunit changed :: EDA_LINK You have a positive and negative number so you need a sign bit. ![]() Note: this gray to binary conversion doesnt require the feedback of the bi i+1 to produce the bi bit (it only relies on the. module b2g ( parameter N 4 ) ( output N -1:0 g, input N -1:0 b ) assign g b ( b > 1) endmodule. The individual segments are listed in the table below. Actually here is my preferred version of both an N-bit binary-to-gray and N-bit gray-to-binary conversion. They simply use a Look-Up Table to do the decoding from the hexadecimal input to the 7-segment output. Both the VHDL and Verilog code work the same way. (b) For `timescale 10 us / 100 ns, as 100ns is 0.1 us would the real numbers be rounded to 1 decimal place ?ĭoes the value specified in the timeunit and timeprecision i.e 10 and 100 in (b) contribute to how many decimal place the real number gets rounded to ? This allows for the decimal numbers 0-9 and the Hex Characters A-F to be displayed to the user. As 1ps is 0.001ns delays are rounded to 3 decimal places. (a) For `timescale 1 ns / 1 ps, Delays are rounded to real numbers with three decimal places-or precise to within one thousandth of a nanosecond-because the time_precision argument is “1 ps,” or one thousandth of a nanosecond. I have doubt related to " Delays are rounded to real numbers with n decimal places " The inputs can be specified in any base (binary, octal, decimal or hexadecimal). LRM Section 22.7 :: " The time_precision argument specifies how delay values are rounded before being used in simulation " My recent threads have made me realize that I need to brush-up concepts of timeunit and timeprecision. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |