Opened 12 years ago
Closed 12 years ago
#1961 closed defect (fixed)
Modelica.Electrical.Digital.Sources.Table
Reported by: | Christian Schubert | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | blocker | Milestone: | 1.9.0 |
Component: | Frontend | Version: | trunk |
Keywords: | enumeration to integer conversion | Cc: | Willi Braun, Martin Sjölund |
Description
Hi,
while comparing results I found that Modelica.Electrical.Digital.Sources.Table produces wrong results which causes many MSL Models to fail comparison.
The table is written as a simple algorithm and the data is stored as an array. Thus it is all pure Modelica and therefore critical.
See the attached picture and model for details.
Attachments (3)
Change History (10)
by , 12 years ago
Attachment: | TableTest.mo added |
---|
by , 12 years ago
Attachment: | TableTest.mos added |
---|
by , 12 years ago
Attachment: | Result_Comparison.png added |
---|
comment:1 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 12 years ago
Component: | Run-time → Frontend |
---|---|
Keywords: | enumaration integer added; wrong results removed |
comment:3 by , 12 years ago
Did you use the exact same version of MSL? It might be that the trunk uses a different table.
comment:4 by , 12 years ago
I've reran it again with Dymola and MSL 3.2.1 and I got the same result.
But surely, Logic.'U' and Logic.'X' should be mapped to different integer values, right?
comment:5 by , 12 years ago
Ok, this is a bit weird... I got the following array in the code using just that assignment...
static const modelica_integer _OMC_LIT0_data[] = {1, 1, 2, 3, 4, 5, 6, 7, 8};
Maybe I can fix this before I go to Canada...
comment:7 by , 12 years ago
Cc: | added |
---|---|
Keywords: | enumeration to conversion added; enumaration removed |
Resolution: | → fixed |
Status: | assigned → closed |
This seems to be fixed now. Christian, can you enable the test for it in msl32?
As far as I see it's not a runtime issue. Just the enumeration to integer are translated different:
x={Logic.'U',Logic.'X',Logic.'0',Logic.'1',Logic.'Z',Logic.'W',Logic.'L',Logic.'H',Logic.'-'})
OM: x = {1,1,2,3,4,5,6,7,8};
Dymola: x = {1,2,3,4,5,6,7,8,9};