Walter, I agree with what you are saying in this email. I just wrote my previous message, because your previous email gave me a little bit of an impression that you would prefer to use float everywhere in place of integer. I was just trying to caution that while it doesn't matter for ignore bits, it may matter in other usages... Arpad ========================================================= -----Original Message----- From: Walter Katz [mailto:wkatz@xxxxxxxxxx] Sent: Thursday, February 11, 2010 6:06 AM To: Muranyi, Arpad; IBIS-ATM Subject: RE: [ibis-macro] Re: Definition of integer? Arpad, This is an interesting, but academic discussion, specifically for Ignore_Bits/Ignore_Time. Ignore_Bits is an Info parameter that tells the EDA tool how much of the beginning of a GetWave (time domain) simulation that the EDA Tool needs to ignore or discard the results because it takes time for the models filters to get in gear. The analysis occurs at the Rx decision point. Because of the various sources of jitter introduced by the Tx model, Rx models, channel, crosstalk and the pattern dependency of things like DFE the exact time that the Nth transition occurs in the output of Rx GetWave can only be approximate anyway. So 1e5 may be a perfectly good way of representing Ignore_Bits it would be a terrible way of representing the value of a 32-bit register. Walter Walter Katz 303.449-2308 Mobile 720.333-1107 wkatz@xxxxxxxxxx www.sisoft.com -----Original Message----- From: ibis-macro-bounce@xxxxxxxxxxxxx [mailto:ibis-macro-bounce@xxxxxxxxxxxxx]On Behalf Of Muranyi, Arpad Sent: Thursday, February 11, 2010 1:12 AM To: IBIS-ATM Subject: [ibis-macro] Re: Definition of integer? Walter, I can relate to your reasons, but at the same time I am getting red flags popping up in my mind. While it is true that 4 is legal for a float, you need to be very carful about it. I am not a seasoned programmer, but I have written a few programs and I remember switching over to integers (or had to painfully use round to the nearest xxx) whenever I had to compare numbers, because with float types I was not always getting the expected results even with simple numbers such as 2*5 (which didn't come out as being equal to 10). (And this was not happening on Pentium 5 CPU-s only)... :-) Also, as I mentioned in the meeting, if we used float for ignore bits, and the user types in 10.5 (legally) we need to define what will happen then. Is the expectation that the tool should round to the nearest integer, or use floor(), ceil(), or using the samples per bit value, chop things off proportionally in the middle of a bit depending on the value behind the decimal point. I agree, this may not be a big issue for ignore bits, but if we get into the habit of using float everywhere where integers may be intended, this could become an issue at times. Arpad ================================================================== -----Original Message----- From: Walter Katz [mailto:wkatz@xxxxxxxxxx] Sent: Wednesday, February 10, 2010 3:08 PM To: Muranyi, Arpad; IBIS-ATM Subject: RE: [ibis-macro] Definition of integer? Arpad, You have confirmed what I have seen in different compilers, and different simulators, and different platforms. That is why I want to allow Type Float for this. Since this is an Info parameter, there is no issue on how it gets passed to the DLL. Since it is specified by the model maker there is no issue on how it gets interpreted by the EDA tool. Please node that the value 4 is a legal Float number with value 4. If the DLL writer says 1.e5, then it really doesn't matter if the EDA tool ignores the first 100000, 100001, or 99999 bits. And if the model maker thinks there is an important difference between 100000, 100001, or 99999, then he should say Integer and set its value to 100000 So simply allowing Float makes everything very easy, gives the IC Vendor all the flexibility he needs. I am big on the EASY buttons these days. Walter Walter Katz 303.449-2308 Mobile 720.333-1107 wkatz@xxxxxxxxxx www.sisoft.com -----Original Message----- From: ibis-macro-bounce@xxxxxxxxxxxxx [mailto:ibis-macro-bounce@xxxxxxxxxxxxx]On Behalf Of Muranyi, Arpad Sent: Tuesday, February 09, 2010 11:03 PM To: IBIS-ATM Subject: [ibis-macro] Definition of integer? Hello everyone, After our ATM teleconference I got curious about the definition of the integer type in VHDL-AMS and ran a few tests to find out what it will do. I declared the following integer signals with initial values assigned to them to see which of these will generate an error: signal Test_1 : integer := 150; signal Test_2 : integer := 15e+1; signal Test_3 : integer := 1.5e+2; signal Test_4 : integer := 0.15e+3; signal Test_5 : integer := 150e-1; signal Test_6 : integer := 150e-2; signal Test_7 : integer := 150e-3; Based on math, except for the last two lines, the above should all resolve to an integer, and be accepted without error. However, I got the following error messages: signal Test_3 : integer := 1.5e+2; [Error] Type check error: expression is not of type STD.STANDARD.INTEGER signal Test_4 : integer := 0.15e+3; [Error] Type check error: expression is not of type STD.STANDARD.INTEGER signal Test_5 : integer := 150e-1; [Error] An integer expression cannot be raised to a negative power signal Test_6 : integer := 150e-2; [Error] An integer expression cannot be raised to a negative power signal Test_7 : integer := 150e-3; [Error] An integer expression cannot be raised to a negative power Then I redid the same experiment in C++ with these lines: int Test_1 = 150; int Test_2 = 15e+1; int Test_3 = 1.5e+2; int Test_4 = 0.15e+3; int Test_5 = 150e-1; int Test_6 = 150e-2; int Test_7 = 150e-3; Visual studio gave me these warnings on all but the first line: IntTest.cpp(1033) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data It seems that this may be related to how the number is stored or manipulated in the CPU more than what it evaluates to according to math, but I am not sure what the determining factors or rules are, especially since the compilers of these two languages gave me different answers... What shall be our definition for integer float in IBIS-AMI? Part of me says that we should try what C would do, since our AMI interface is based on C, but then we also say that any language can be used for writing AMI models as long as the DLL interface matches what we defined in the specification. What if different languages have different definitions for integer/float? Thanks, Arpad ===================================================================== --------------------------------------------------------------------- IBIS Macro website : http://www.eda.org/pub/ibis/macromodel_wip/ IBIS Macro reflector: //www.freelists.org/list/ibis-macro To unsubscribe send an email: To: ibis-macro-request@xxxxxxxxxxxxx Subject: unsubscribe --------------------------------------------------------------------- IBIS Macro website : http://www.eda.org/pub/ibis/macromodel_wip/ IBIS Macro reflector: //www.freelists.org/list/ibis-macro To unsubscribe send an email: To: ibis-macro-request@xxxxxxxxxxxxx Subject: unsubscribe --------------------------------------------------------------------- IBIS Macro website : http://www.eda.org/pub/ibis/macromodel_wip/ IBIS Macro reflector: //www.freelists.org/list/ibis-macro To unsubscribe send an email: To: ibis-macro-request@xxxxxxxxxxxxx Subject: unsubscribe