Project

General

Profile

User story #123

MARTe-EX-F-1.1.8: A framework developer shall be capble of querying the family and model of the CPU where MARTe is running.

Added by André Neto about 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
2.00 h
Git branch (link):
Git merge to develop (link):
SVN commit (link/?p=rev):

Description

Implement requirement MARTe-EX-F-1.1.8 based on the original MARTe implementation

Note: Being able to know the number CPU family and model may allow framework developers to take run-time decisions about the distribution of resources (e.g. availability of operating system specific features).

NOTE: User story moved back to implementation in order to fix complex bug (found by Llorenc)

Source code files modified

  • Source\Core\L0Portability\Architecture\x86_cl\ProcessorA.h
  • Source\Core\L0Portability\Architecture\x86_gcc\ProcessorA.h
  • Source\Core\L0Portability\OperatingSystem\Linux\ProcessorOS.h
  • Source\Core\L0Portability\OperatingSystem\Windows\ProcessorOS.h
  • Source\Core\L0Portability\Processor.cpp
  • Source\Core\L0Portability\Processor.h
  • Source\Core\L0Portability\ProcessorType.cpp
  • Source\Core\L0Portability\ProcessorType.h
  • Test/Core/L0Portability/ProcessorTest.h
  • Test/Core/L0Portability/ProcessorTest.cpp
  • Test/Core/L0Portability/ProcessorTypeTest.h
  • Test/Core/L0Portability/ProcessorTypeTest.cpp
  • Test/GTest/ProcessorGTest.cpp
  • Test/GTest/ProcessorTypeGTest.cpp

Architecture & design review

Date of the review: 12/06/2015

Person who did the review: André Neto

Version of architecture & design document: N/A. As per the original MARTe implementation, this is a support function and does not require formal design in UML.

Result of review: N/A

Code and documentation review

Date of the review: 18/06/2015

Person who did the review: Ivan Herrero

Result of review: PASS

List of non-conformities: N/A

Unit test review

Date of the review: 01/07/2015

Person who did the review: André Neto

Result of coverage tests review: PASS [100%]

Result of functional tests review: PASS [100%]

Result of review: PASS

List of non-conformities: N/A
See #122

Associated revisions

Revision 58852254 (diff)
Added by Giuseppe Ferrò almost 10 years ago

Added processor related functions. #122 #123

Revision 142aa3bd (diff)
Added by Giuseppe Ferrò almost 10 years ago

Formatted code using new templates.
#122 #123

Revision 886334a7 (diff)
Added by Giuseppe Ferrò almost 10 years ago

Moved a global variable into the class.
#122 #123

Revision 3573b526 (diff)
Added by Giuseppe Ferrò almost 10 years ago

Fixed errors accordingly with revision.
#122 #123

Revision 56f896af (diff)
Added by Giuseppe Ferrò almost 10 years ago

Added Threads and ThreadsDatabase tests.
#110 #123 #103 #104 #112 #107 #108 #111 #106 #105 #109 #113

Revision a1ee0477 (diff)
Added by Giuseppe Ferrò almost 10 years ago

Added Threads unit tests.
Renamed previous tests because they are integration tests.
#110 #123 #103 #104 #112 #107 #108 #111 #106 #105 #109 #113

Revision 3d7d5f94 (diff)
Added by Giuseppe Ferrò almost 10 years ago

Added Processor and ProcessorType tests.
#122 #123

Revision 95c810f0 (diff)
Added by Giuseppe Ferrò almost 10 years ago

Added Processor and ProcessorType GTests.
#122 #123

Revision ba754568 (diff)
Added by Llorenc Capella almost 10 years ago

US #123 - Processor and ProcessorType test updated.

List of changes: * Printf added on the ProcessorTest.cpp in order check that the
infomation about the CUP is correct. * Minor modification on the ProcessorTypeTest.cpp. * Format files.

Revision ce744402 (diff)
Added by André Neto almost 10 years ago

Fixed processor model reported in #123. Implementation of #156.

The bug related to the computation of the processor model was fixed (see
comment in #123).

As part of the linting process (#156) the code structure was slightly
changed in order to delegate the implementation of the Processor
operating system functionality to a .cpp unit. This improves the
consistency with the other operating system classes.

History

#1 Updated by Riccardo Vitelli about 10 years ago

  • Target version changed from Backlog to 0.1
  • Start date deleted (29.05.2015)
  • Estimated time set to 2.00 h

#2 Updated by Riccardo Vitelli almost 10 years ago

  • Status changed from New to Arch: Rev

#3 Updated by Riccardo Vitelli almost 10 years ago

  • Assignee set to André Neto

#4 Updated by André Neto almost 10 years ago

  • Description updated (diff)

#5 Updated by Riccardo Vitelli almost 10 years ago

  • Status changed from Arch: Rev to Code: Impl

#6 Updated by Riccardo Vitelli almost 10 years ago

  • Assignee changed from André Neto to Giuseppe Ferro

#7 Updated by Ivan Herrero almost 10 years ago

  • Description updated (diff)

#8 Updated by Ivan Herrero almost 10 years ago

  • Description updated (diff)

#9 Updated by Ivan Herrero almost 10 years ago

  • Status changed from Code: Impl to Code: Rev

#10 Updated by Ivan Herrero almost 10 years ago

  • Description updated (diff)

#11 Updated by Ivan Herrero almost 10 years ago

  • Status changed from Code: Rev to Unit: Impl

#12 Updated by Ivan Herrero almost 10 years ago

  • Assignee deleted (Giuseppe Ferro)

#13 Updated by Ivan Herrero almost 10 years ago

  • Description updated (diff)

#14 Updated by Ivan Herrero almost 10 years ago

Code and documentation review passed. Unit testing implementation pending.

#15 Updated by Riccardo Vitelli almost 10 years ago

  • Status changed from Unit: Impl to Unit: Rev

#16 Updated by André Neto almost 10 years ago

  • Assignee set to André Neto

#17 Updated by André Neto almost 10 years ago

  • Description updated (diff)

#18 Updated by Riccardo Vitelli almost 10 years ago

  • Status changed from Unit: Rev to Unit: Impl

#19 Updated by Riccardo Vitelli almost 10 years ago

  • Assignee deleted (André Neto)

#20 Updated by Riccardo Vitelli almost 10 years ago

  • Target version changed from 0.1 to 0.2

#21 Updated by Llorenc Capella almost 10 years ago

  • Assignee set to Llorenc Capella

#22 Updated by Llorenc Capella almost 10 years ago

  • Status changed from Unit: Impl to Unit: Rev

#23 Updated by Llorenc Capella almost 10 years ago

  • Assignee deleted (Llorenc Capella)

The ProcessorTest only check that the returned values of the class are meaningless, but does not check if the values are correct...
I print the returned values on the screen and I compared them with the lscpu. As a result I found that the Model from the test and using the lscpu command is different.

#24 Updated by Riccardo Vitelli almost 10 years ago

  • Status changed from Unit: Rev to Code: Impl

#25 Updated by Riccardo Vitelli almost 10 years ago

  • Description updated (diff)

#26 Updated by Ivan Herrero almost 10 years ago

Llorenc Capella wrote:

The ProcessorTest only check that the returned values of the class are meaningless, but does not check if the values are correct...
I print the returned values on the screen and I compared them with the lscpu. As a result I found that the Model from the test and using the lscpu command is different.

In fact there is a bug in the implementation, or better, the implementation is not complete:

Intel and AMD have suggested applications to display the family of a CPU as the sum of the "Family" and the "Extended Family" fields shown above, and the model as the sum of the "Model" and the 4-bit left-shifted "Extended Model" fields. If "Family" is different than 6 or 15, only the "Family" and "Model" fields should be used while the "Extended Family" and "Extended Model" bits are reserved. If "Family" is set to 15, then "Extended Family" and the 4-bit left-shifted "Extended Model" should be added to the respective base values, and if "Family" is set to 6, then only the 4-bit left-shifted "Extended Model" should be added to "Model". [Source: https://en.wikipedia.org/wiki/CPUID]

It needs to be reimplemented.

#27 Updated by Riccardo Vitelli almost 10 years ago

  • Description updated (diff)

#28 Updated by Riccardo Vitelli almost 10 years ago

  • Status changed from Code: Impl to Closed

Also available in: Atom PDF