This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Component Implementation

1 - CM800A_SycnCrc_MDD

Module Design Document

For

SyncCrc

July 5, 2017

Prepared For:

Software Engineering

Nexteer Automotive,

Saginaw, MI, USA

Prepared By:

Kevin Smith,

Nexteer Automotive,

Saginaw, MI, USA
Change History

DescriptionAuthorVersionDateApproved By
Initial VersionK. Smith107-Oct-15
Updates to meet the Rev1 of the FDDK. Smith211-Jan-16
Updates to support OS version and hardware differencesK. Smith314-Jun-17
Updates for anomaly EA4#13207K. Smith405-Jul-17


Table of Contents

1 Introduction 5

1.1 Purpose 5

1.2 Scope 5

2 SyncCrc & High-Level Description 6

3 Design details of software module 7

3.1 Graphical representation of SyncCrc 7

3.2 Data Flow Diagram 7

3.2.1 Component level DFD 7

3.2.2 Function level DFD 7

4 Constant Data Dictionary 8

4.1 Program (fixed) Constants 8

4.1.1 Embedded Constants 8

4.2 Variable Data Dictionary 8

4.2.1 User Defined Typedef Definition/Declaration 8

4.2.2 User Defined Enumerated Types 9

5 Software Component Implementation 10

5.1 Sub-Module Functions 10

5.1.1 Init: SyncCrcInit0 10

5.1.1.1 Design Rationale 10

5.1.1.2 Processing 10

5.1.1.3 Module Outputs 10

5.1.2 Init: SyncCrcInit1 10

5.1.2.1 Design Rationale 10

5.1.2.2 Processing 10

5.1.2.3 Module Outputs 10

5.2 Server Runnables 11

5.2.1 ResvCrcHwUnit 11

5.2.1.1 Design Rationale 11

5.2.1.2 (Processing of function)……… 11

5.2.1.3 Module Outputs 13

5.2.2 CRC API Server Runnables 14

5.2.2.1 API Design Rationale 14

5.2.2.2 API Processing 14

5.3 Interrupt Functions 17

5.4 Module Internal (Local) Functions 17

5.4.1 RelsCrcHwUnit 17

5.4.1.1 Design Rationale 17

5.4.1.2 Processing 17

5.4.2 NONTRUSTED_NtWrapS_SyncCrc_RelsCrcHwUnit 18

5.4.2.1 Design Rationale 18

5.4.2.2 Processing 18

5.4.3 GetAvlCrcHwUnit 19

5.4.3.1 Design Rationale 19

5.4.3.2 Processing 19

5.4.4 NONTRUSTED_NtWrapS_SyncCrc_GetAvlCrcHwUnit 20

5.4.4.1 Design Rationale 20

5.4.4.2 Processing 20

5.4.5 CrcRegCfg 21

5.4.5.1 Design Rationale 21

5.4.5.2 Processing 21

5.5 GLOBAL Function/Macro Definitions 23

6 Known Limitations with Design 24

7 UNIT TEST CONSIDERATION 25

Appendix A Abbreviations and Acronyms 26

Appendix B Glossary 27

Appendix C References 28

Introduction

Purpose

This MDD aids in documenting the implementation of CM800A for the synchronous CRC API with the EA4 hardware CRC units.

Scope

The following definitions are used throughout this document:

  • Shall: indicates a mandatory requirement without exception in compliance.

  • Should: indicates a mandatory requirement; exceptions allowed only with documented justification.

  • May: indicates an optional action.

SyncCrc & High-Level Description

Provides an API interface for other BSW and application level software components to calculate a synchronous CRC calculation using the EA4 hardware peripherals.

Design details of software module

Graphical representation of SyncCrc

Data Flow Diagram

Component level DFD

Function level DFD

Constant Data Dictionary

Program (fixed) Constants

Embedded Constants

Local Constants

Values between the brackets [] are the ranges that the configurable constants could be defined as for a given integration. These values are generated by Configurator before the software build.

Constant NameResolutionUnitsValue
CRCININVAL8BIT_CNT_U08Uint8Cnt0xFF
CRCININVAL16BIT_CNT_U16Uint16Cnt0xFFFF
CRCININVAL32BIT_CNT_U32Uint32Cnt0xFFFFFFFF
CRCERRVAL_CNT_U08Uint8Cnt0
CRCHWRESVCFGRNG_CNT_U08Uint8Cnt7
INVLDTASKID_CNT_U16Uint16Cnt0xFFFF
NROFCRCHWUNIT_CNT_U08Uint8Cnt[0 – 8]*
NROFACTVCRCHWUNIT_CNT_U08Uint8Cnt[0 – 8]†
ARWRPRENAD_CNT_U08Uint8Cnt[STD_OFF – STD_ON]**
CRCOSREF_CNT_U08Uint8Cnt[0-255]***
MAXNROFCRCHWUNIT_CNT_U08Uint8Cnt8

* Based on the value of “Device Type” as defined in Configurator.
** Based on the value of “Autosar Wrapper Enable” as defined in Configurator.
***Based on the value of “Crc Os Application Reference” as defined in Configurator.
† The number is calculated by NROFCRCHWUNIT_CNT_U08 – “Reserved CRC Hardware Units” as defined in Configurator.

Variable Data Dictionary

The following type definitions are found in the private header of this component.

User Defined Typedef Definition/Declaration

Typedef NameElement NameUser Defined Type

Legal Range

(min)

Legal Range

(max)

NtCrcIdRecCrcHwIdxUint80255
NtResvCallRecResvCallBooleanFALSETRUE

User Defined Enumerated Types

Enum NameElement NameValue
CrcDataAcsWidth1CRCDATAACSWIDTH_32BIT0
CRCDATAACSWIDTH_16BIT1
CRCDATAACSWIDTH_8BIT2
CrcAlg1CRCALG_32BITETH0
CRCALG_16BIT1
CRCALG_8BIT2
CRCALG_8BITH2F3

Software Component Implementation

Sub-Module Functions

Init: SyncCrcInit0

Design Rationale

This function initializes the PIM with the proper status for the CRC hardware units for use by the application components. This function is defined in the CDD_SyncCrcNonRte.c file as it shall be called prior to the RTE Init functions.

Processing

Module Outputs

None

Init: SyncCrcInit1

Design Rationale

Stub function for mapping the server runnable functions within a memory region.

Processing

None

Module Outputs

None

Server Runnables

ResvCrcHwUnit

Design Rationale

This function allows the caller to reserve a single CRC hardware unit until it is released. This will allow features such as the DMA to perform a CRC calculation over a large portion of data and does not need to permanently reserve a CRC hardware unit. This function can be called from within or outside a task. This server runnables must be defined with “can be invoked concurrently” enabled in Developer.

(Processing of function)………

Top Level Logic

Reserve CRC

Release CRC

Module Outputs

None

CRC API Server Runnables

API Design Rationale

The following flow chart is applicable to all CRC API functions in this document. However, the highlighted green squares vary by the API. These differences will be pointed out in each sub-function section. All API client calls must be called from within a task. These server runnables must be defined with “can be invoked concurrently” enabled in Developer.

API Processing

Calc8BitCrc_Oper

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Ctrl_rec.Bit_b08.ISZ = CRCDATAACSWIDTH_8BIT;

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Ctrl_rec.Bit_b08.POL = CRCALG_8BIT;

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Outp_u32 = CRCININVAL8BIT_CNT_U16;

Calc8BitCrc0X2F_Oper

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Ctrl_rec.Bit_b08.ISZ = CRCDATAACSWIDTH_8BIT;

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Ctrl_rec.Bit_b08.POL = CRCALG_8BITH2F;

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Outp_u32 = CRCININVAL8BIT_CNT_U16;

Calc16BitCrc_u08_Oper

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Ctrl_rec.Bit_b08.ISZ = CRCDATAACSWIDTH;

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Ctrl_rec.Bit_b08.POL = CRCALG_16BIT;

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Outp_u32 = CRCININVAL16BIT_CNT_U16;

Calc16BitCrc_u16_Oper

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Ctrl_rec.Bit_b08.ISZ = CRCDATAACSWIDTH_16BIT;

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Ctrl_rec.Bit_b08.POL = CRCALG_16BIT;

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Outp_u32 = CRCININVAL16BIT_CNT_U16;

Calc32BitCrc_u08_Oper

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Ctrl_rec.Bit_b08.ISZ = CRCDATAACSWIDTH;

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Ctrl_rec.Bit_b08.POL = CRCALG_32BITETH;

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Outp_u32 = CRCININVAL32BIT_CNT_U16;

Calc32BitCrc_u16_Oper

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Ctrl_rec.Bit_b08.ISZ = CRCDATAACSWIDTH_16BIT;

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Ctrl_rec.Bit_b08.POL = CRCALG_32BITETH;

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Outp_u32 = CRCININVAL32BIT_CNT_U16;

Calc32BitCrc_u32_Oper

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Ctrl_rec.Bit_b08.ISZ = CRCDATAACSWIDTH_32BIT;

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Ctrl_rec.Bit_b08.POL = CRCALG_32BITETH;

CRCREG_REC[CrcHwIdx_Cnt_T_u08].Reg_rec->Outp_u32 = CRCININVAL32BIT_CNT_U16;

Interrupt Functions

None

Module Internal (Local) Functions

RelsCrcHwUnit

Function NameRelsCrcHwUnitTypeMinMax
Arguments PassedCrcHwIdx_Cnt_T_u08Uint808
Return ValueN/A

Design Rationale

To minimize time in Exclusive areas, the Enter and Exit calls were placed within this function. All API server runnables that use this function are defined in Developer to have access to the exclusive area.

Processing

NONTRUSTED_NtWrapS_SyncCrc_RelsCrcHwUnit

Function NameNONTRUSTED_NtWrapS_SyncCrc_RelsCrcHwUnitTypeMinMax
Arguments PassedFunctionIndexUint16065535
FunctionParamsVoid*02^32-1
Return ValueN/A

Design Rationale

Function is required to prevent MPU violations when the API modifies the per-instance-memory used by all API functions.

Processing

GetAvlCrcHwUnit

Function NameGetAvlCrcHwUnitTypeMinMax
Arguments PassedN/A
Return ValueN/A

Design Rationale

Processing

NONTRUSTED_NtWrapS_SyncCrc_GetAvlCrcHwUnit

Function NameNONTRUSTED_NtWrapS_SyncCrc_GetAvlCrcHwUnitTypeMinMax
Arguments PassedFunctionIndexUint16065535
FunctionParamsVoid*02^32-1
Return ValueN/A

Design Rationale

Function is required to prevent MPU violations when the API modifies the per-instance-memory used by all API functions.

Processing

CrcRegCfg

Function NameCrcRegCfgTypeMinMax
Arguments PassedCrcHwIdx_ArgUint80255
CrcCfg_ArgCrcHwResvCfg106
StrtVal_ArgUint3204294967295
Return ValueN/A

Design Rationale

Function created to reduce the complexity of the ResvCrcHwUnit_Oper function.

Processing

GLOBAL Function/Macro Definitions

None

Known Limitations with Design

  1. API client calls, except ResvCrcHwUnit, must be called from within a task.

  2. To meet design and coding standards, ‘For’ loops called out by the FDD were implemented with ‘While’ loops to break out of the loops without using the ‘break’ keyword.

  3. The GetTaskID function call provided by the OS between different versions have different arguments. One version, the argument is a uint16, where another is a pointer to an enumerated type. The design simply casts the function call to a uint16. There are no expectations that there are going to be more than 65,535 tasks, so the uint16 width should provide adequate room for growth.

  4. In the function ResvCrcHwUnit, the else condition in the main logic path is considered dead code by Polyspace. This is because it is limiting the function to the bounds of the input of the Mod and configuration argument. However, the code is present to provide error handling in the event of an invalid input being passed into the function.

UNIT TEST CONSIDERATION

The constants NROFACTVCRCHWUNIT_CNT_U08, ARWRPRENAD_CNT_U08, and CRCOSREF_CNT_U08, and NROFCRCHWUNIT_CNT_U08 shall be tested to their full range as defined in the constant section.

Abbreviations and Acronyms

Abbreviation or AcronymDescription

Glossary

Note: Terms and definitions from the source “Nexteer Automotive” take precedence over all other definitions of the same term. Terms and definitions from the source “Nexteer Automotive” are formulated from multiple sources, including the following:

  • ISO 9000

  • ISO/IEC 12207

  • ISO/IEC 15504

  • Automotive SPICE® Process Reference Model (PRM)

  • Automotive SPICE® Process Assessment Model (PAM)

  • ISO/IEC 15288

  • ISO 26262

  • IEEE Standards

  • SWEBOK

  • PMBOK

  • Existing Nexteer Automotive documentation

TermDefinitionSource
MDDModule Design Document
DFDData Flow Diagram

References

Ref. #TitleVersion
1AUTOSAR Specification of Memory Mapping (Link:AUTOSAR_SWS_MemoryMapping.pdf)v1.3.0 R4.0 Rev 2
2MDD GuidelineEA4 01.00.01
3Software Naming Conventions.doc1.0
4Software Design and Coding Standards.doc2.1

2 - CM800A_SyncCrc_Integration_Manual

Integration Manual

For

CM800A SyncCrc

VERSION: 3.0

DATE: 19-May-2017

Prepared By:

Kevin Smith

Nexteer Automotive,

Saginaw, MI, USA

Location: The official version of this document is stored in the Nexteer Configuration Management System.

Revision History

Sl. No.DescriptionAuthorVersionDateApproved By
1Initial versionK. Smith1.005-Oct-15-
2Added exclusive area details and updates for version 1.0.0 of the component design.K. Smith2.011-Jan-16-
3Updated configuration parametersK. Smith3.019-May-17-

Table of Contents

1 Abbrevations And Acronyms 4

2 References 5

3 Dependencies 6

3.1 SWCs 6

3.2 Global Functions(Non RTE) to be provided to Integration Project 6

4 Configuration REQUIREMeNTS 7

4.1 Build Time Config 7

4.2 Configuration Files to be provided by Integration Project 7

4.3 Da Vinci Parameter Configuration Changes 7

4.4 DaVinci Interrupt Configuration Changes 7

4.5 Manual Configuration Changes 7

4.6 Exclusive Area Changes 7

5 Integration DATAFLOW REQUIREMENTS 8

5.1 Required Global Data Inputs 8

5.2 Required Global Data Outputs 8

5.3 Specific Include Path present 8

6 Runnable Scheduling 9

7 Memory Map REQUIREMENTS 10

7.1 Mapping 10

7.2 Usage 10

7.3 NvM Blocks 10

8 Compiler Settings 11

8.1 Preprocessor MACRO 11

8.2 Optimization Settings 11

9 Appendix 12

Abbrevations And Acronyms

AbbreviationDescription
DFDDesign functional diagram
MDDModule design Document

References

This section lists the title & version of all the documents that are referred for development of this document

Sr. No.TitleVersion
1MDD GuidelinesProcess 04.04.02
2Software Naming ConventionsProcess 04.04.02
3Coding standardsProcess 04.04.02
4CM800A_SyncCrc_DesignSee Synergy subproject version

Dependencies

SWCs

ModuleRequired Feature
None

Note : Referencing the external components should be avoided in most cases. Only in unavoidable circumstance external components should be referred. Developer should track the references.

Global Functions(Non RTE) to be provided to Integration Project

SyncCrcInit0*

Calc16BitCrc_u16_Oper

Calc16BitCrc_u08_Oper

Calc32BitCrc_u16_Oper

Calc32BitCrc_u32_Oper

Calc32BitCrc_u08_Oper

Calc8BitCrc0X2F_Oper

Calc8BitCrc_Oper

ResvCrcHwUnit_Oper*

The following functions are available if the Autosar Wrapper is enabled

Crc_CalculateCRC8

Crc_CalculateCRC8H2F

Crc_CalculateCRC16

Crc_CalculateCRC32

*All functions except marked must be called from within a task.

Configuration REQUIREMeNTS

Build Time Config

ModulesNotes
None

Configuration Files to be provided by Integration Project

  1. CDD_SyncCrc_Cfg_private.h

Da Vinci Parameter Configuration Changes

ParameterNotesSWC
/Nexteer/EcucDefs_SyncCrc/SyncCrc/SyncCrcCommon/AutosarWrapperEnableEnables the AUTOSAR API Wrapper functions. This should only be enabled if the Crc BSW is not to be used in a projectSyncCrc
/Nexteer/EcucDefs_SyncCrc/SyncCrc/SyncCrcCommon/ReservedCRCHardwareUnitsDefines the number of CRC hardware units reserved for dedicated use outside of the the application. Zero (0) shall be used as a default value unless there is a specific need to reserve one or more units for other software components.SyncCrc
/Nexteer/EcucDefs_SyncCrc/SyncCrc/SyncCrcCommon/CrcOsApplicationReferenceValue shall be the application in which the SyncCrc is integrated. Due to the nature of CRC usage, an ASIL D application should be selected unless the program is directed otherwise.SyncCrc
/Nexteer/EcucDefs_SyncCrc/SyncCrc/SyncCrcCommon/DeviceTypeSelects the physical device type of the RH850. This value will configure the SyncCrc component with how many CRC hardware units are available.SyncCrc

DaVinci Interrupt Configuration Changes

ISR NameVIM #Priority DependencyNotes
None

Manual Configuration Changes

ConstantNotesSWC
None

Exclusive Area Changes

NameNotesSWC
SyncCrcExclusiveAreaThe exclusive area defined in this component is used by all API functions. The area is used to prevent interruption when searching for an available CRC hardware unit. Presently MtrCtrl function design should not be performing CRC calculations. As a result, the area shall be configured to block all OS related interrupts.SyncCrc

Integration DATAFLOW REQUIREMENTS

Required Global Data Inputs

Required Global Data Outputs

Specific Include Path present

Yes

Runnable Scheduling

This section specifies the required runnable scheduling.

InitScheduling RequirementsTrigger
CDD_SyncCrcInit1RTE Init
CDD_SyncCrcInit0Shall be scheduled outside of the RTE before any components use the SyncCrc APINon-RTE Init
RunnableScheduling RequirementsTrigger
NoneNoneN/A

.

Memory Map REQUIREMENTS

Mapping

Memory SectionContentsNotes
None

* Each …START_SEC… constant is terminated by a …STOP_SEC… constant as specified in the AUTOSAR Memory Mapping requirements.

Usage

FeatureRAMROM
None

Table 1: ARM Cortex R4 Memory Usage

NvM Blocks

*See DataDict.m

Compiler Settings

Preprocessor MACRO

None

Optimization Settings

None

Appendix

<This section is for appendix>

3 - SyncCrc Review


Overview

Summary Sheet
Synergy Project
Source Code
PolySpace


Sheet 1: Summary Sheet
























Rev 2.0029-Nov-17

Nexteer SWC Implementation Peer Review Summary Sheet


























Component Short Name:


Windows User: Intended Use: Identify which component is being reviewed. This should match the component short name from the DataDict.m fileand the middle part of the Synergy project name, e.g. Assi for the SF001A_Assi_Impl Synergy project
SyncCrc
Revision / Baseline:

Windows User: Intended Use: Identify the implementation baseline name intended to be used for the changed component when changes are approved E.g. SF001A_Assi_Impl_1.2.0
CM800A_SyncCrc_Impl_01.04.00

























Change Owner:
Windows User: Intended Use: Identify the developer who made the change(s) being reviewed

Kevin Smith
Work CR ID:
Windows User: Intended Use: Identify the Implementation Work CR whose work is being reviewed (may be more than one)

EA4#19751





























kzshz2: Intended Use: Intended to identify at a high level to the reviewers which areas of the component have been changed. Rationale: This will be good information to know when ensuring appropriate reviews have been completed. Modified File Types:



Check the file types that needed modification for the Work CR(s); macros for the check boxes will populate the appropriate checklist tabs for the review.
























































































































































kzshz2: Intended Use: Identify who where the reviewers, what they reviewed, and if the reviewed changes have been approved to release the code for testing. Comments here should be at a highlevel, the specific comments should be present on the specific review form sheet. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. ADD DR Level Move reviewer and approval to individual checklist form Review Checklist Summary:






























Reviewed:




At start of review, all items below should be marked "No". At the end of the review, all items should be marked "Yes" or "N/A" where N/A indicates the reviewers have reviewed the existing (unchanged) item and confirmed no updates were needed for the Work CR(s).












































N/AMDD


YesSource Code


YesPolySpace









































N/AIntegration Manual


N/ADavinci Files








































































Comments:

Changes were made to the configuration header text template.






















































































































General Guidelines:
- The reviews shall be performed over the portions of the component that were modified as a result of the Change Request.
- New components should include SWC Owner and/or SWC Design author and Integrator and/or SW Lead as apart of the Group Review Board (Source Code, Integration Manual, and Davinci Files)
- Enter any rework required into the comment field and select No. When the rework is complete, review again using this same review sheet and select Yes. Add date and additional comment stating that the rework is completed.
- To review a component with multiple source code files use the "Add Source" button to create a Source code tab for each source file.
- .h file should be reviewed with the source file as part of the source file.

Each peer review shall start with a clean copy of the latest peer review checklist template. Before the peer review, the change owner shall:
o Review the previous component peer review and copy any relevant comments to the new review sheet.
o Review all checklist items and make all corrections needed, so that the component is ready for peer review. The expectation is that peer review should find very few issues,
because the change owner has already used the checklist to ensure the component changes are complete and correct.
o Fill in all file name and version information as needed on peer review checklist tabs (file names may be copied from the previous peer review where appropriate)
o Fill in checklist answers (Yes/No/NA pulldowns) ONLY on those items which are NA for the current change. All other checklist items should be blank going into the review
meeting.

During the peer review meeting:
o For each page of the review, first review the items already marked as N/A for this change, to confirm that reviewers agree with this assessment; change the checklist box to
blank if it is found that the item does apply.
o Then review the items with the checklist box blank. After reviewing each of these items, the checklist box will be marked as "Yes", or the checklist box will be marked as
"No" with needed rework indicated or with rationale indicated.
o If any items are marked "No" with rationale indicated, this must be approved by a software supervisor or the software manager; there is a line in the "Review Board" section
of each tab to indicate who approved the "No" items on that tab.

Sheet 2: Synergy Project






















Rev 2.0029-Nov-17

























Peer Review Meeting Log (Component Synergy Project Review)



















































Quality Check Items:




































Rationale is required for all answers of No










New baseline version name from Summary Sheet follows








Yes
Comments:



naming convention





































Project contains necessary subprojects








Yes
Comments:










































Project contains the correct version of subprojects








Yes
Comments:










































Design subproject is correct version








Yes
Comments:












































.gpj file in tools folder matches .gpj generated by TL109 script








Yes
Comments:













































File/folder structure is correct per documentation in









Yes
Comments:




TL109A_SwcSuprt







































General Notes / Comments:
























































Review Board:


























Change Owner:

Kevin Smith


Review Date :

01/30/18
































Lead Peer Reviewer:


Avinash James


Approved by Reviewer(s):



Yes































Other Reviewer(s):










































































Rationale/justification for items marked "No" approved by:












































Sheet 3: Source Code






















Rev 2.0029-Nov-17
Nexteer SWC Implementation Peer Review Meeting Log (Source Code Review)

























Source File Name:


N/A

Source File Revision:


Windows User: Intended Use: Synergy version number of the file being reviewed. (Version number that Synergy displays on the checked out or unmodified file in the working project) N/A
Header File Name:


CDD_SyncCrc_Cfg_private.h.tt

Header File Revision:


Windows User: Intended Use: Synergy version number of the file being reviewed. (Version number that Synergy displays on the checked out or unmodified file in the working project) 5

























MDD Name:


CM800A_SyncCrc_MDD
Revision:
Windows User: Intended Use: Synergy version number of the file being reviewed. (Version number that Synergy displays on the checked out or unmodified file in the working project) 4

























SWC Design Name:


CM800A_SyncCrc_Design
Revision:
Windows User: Intended Use: For FDDs, list the Synergy baseline number (just the number part of the Synergy baseline name) of the FDD baseline being implemented. E.g., for SF001A_Assi_Design_1.3.1, this field would say "1.3.1" 1.2.0


























Quality Check Items:



































Rationale is required for all answers of No

































EA4 Common Naming Convention followed:











Version: 1.01
























EA4 Software Naming Convention followed:











Version: 1.02

























for variable names







Yes
Comments:

















































for constant names







Yes
Comments:

















































for function names







Yes
Comments:

















































for other names (component, memory







Yes
Comments:










mapping handles, typedefs, etc.)




































Verified no possibility of uninitialized variables being








N/A
Comments:









written to component outputs or IRVs





































Any requirements traceability tags have been removed








N/A
Comments:









from at least the changed areas of code





































All variables are declared at the function level.








Yes
Comments:
















































Synergy version matches change history





kzshz2: Intended Use: Indicate that the the versioning was confirmed by the peer reviewer(s). Rationale: There have been many occassions where versions were not updated in files and as a result Unit Test were referencing wrong versions. This often time leads to the need to re-run of batch tests.


Yes
Comments:



and Version Control version in file comment block





































Change log contains detailed description of changes








Yes
Comments:



(including any anomaly number(s) being fixed) and













Work CR number














































Code accurately implements SWC Design (Document or Model)








Yes
Comments:



in all areas where code was changed and/or Simulink













model was color-coded as changed and/or mentioned






















in SWC Design change log. (This item includes looking at all






















layers of Simulink model for possible color coding not






















reflected at a higher level, and includes looking at any






















intermediate SWC Design versions between the version being






















implemented and the version that was included as a






















subproject in the previous implementation.)














































Code comparison against previous version matches








Yes
Comments:



changes needed as described by the work CR(s), all













parent CRs and parent anomalies, and the SWC






















Design change log.














































Verified no Compiler Errors or Warnings





KMC: Intended Use: To confirm no compiler errors or warnings exist for the code under review (warnings from contract header files may be ignored). Rationale: This is needed to ensure there will be no errors discovered at the time of integration. A Sandox project should be used.


Yes
Comments:









(and verified for all possible combinations













of any conditionally compiled code)














































Component.h is included








Yes
Comments:
















































All other includes are actually needed. (System includes








Yes
Comments:









only allowed in Nexteer library components)





































Software Design and Coding Standards followed:











Windows User: Intended Use: list version/revision of latest released Software Design and Coding Standards document. Version:

























Code comments are clear, correct, and adequate







Yes
Comments:










and have been updated for the change: [N40] and













all other rules in the same section as rule [N40],






















plus [N75], [N12], [N23], [N33], [N37], [N38],






















[N48], [N54], [N77], [N79], [N72]














































Source file (.c and .h) comment blocks are per







Yes
Comments:










standards and contain correct information: [N41], [N42]





































Function comment blocks are per standards and







Yes
Comments:










contain correct information: [N43]





































Code formatting (indentation, placement of







Yes
Comments:










braces, etc.) is per standards: [N5], [N55], [N56],













[N57], [N58], [N59]














































Embedded constants used per standards; no







Yes
Comments:










"magic numbers": [N12]





































Memory mapping for non-RTE code







Yes
Comments:










is per standard





































All access of motor control loop data uses macros







Yes
Comments:










generated by the motor control manager





































All loops have termination conditions that ensure







Yes
Comments:










finite loop iterations: [N63]





































All divides protect against divide by zero







N/A
Comments:










if needed: [N65]





































All integer division and modulus operations







N/A
Comments:










handle negative numbers correctly: [N76]





































All typecasting and fixed point arithmetic,







Yes
Comments:










including all use of fixed point macros and













timer functions, is correct and has no possibility






















of unintended overflow or underflow: [N66]














































All float-to-unsigned conversions ensure the.







N/A
Comments:










float value is non-negative: [N67]





































All conversions between signed and unsigned







N/A
Comments:










types handle msb==1 as intended: [N78]





































All pointer dereferencing protects against







N/A
Comments:

Pointers are hard coded by design,







null pointer if needed: [N70]










and is read from only. No reason to protect.

























Component outputs are limited to the legal range







N/A
Comments:










defined in the SWC Design DataDict.m file : [N53]





































All code is mapped with SWC Design (all SWC







Yes
Comments:










Design subfunctions and/or model blocks identified













with code comments; all code corresponds to






















some SWC Design subfunction and/or model block):






















[N40]














































Any other violations of design and coding









N/A
Comments:










standards noticed during the review are noted in the













comments section for rework.













































Anomaly or Design Work CR created








N/A
Comments: List Anomaly or CR numbers









for any SWC Design corrections needed































































General Notes / Comments:

















































































Review Board:


























Change Owner:

Kevin Smith


Review Date :

01/30/18
































Lead Peer Reviewer:


Avinash James


Approved by Reviewer(s):



Yes










































































































SWC owner and/or
SWC Design author:
Kevin Smith







Comments:






Kevin Smith












































Integrator and or
SW lead:
Kevin Smith







Comments:













































































Unit test co-ordinator:











Comments:
























































Other Reviewer(s):









































































Rationale/justification for items marked "No" approved by:





































































Sheet 4: PolySpace






















Rev 2.0029-Nov-17
Nexteer SWC Implementation Peer Review Meeting Log (PolySpace Review)




























Source File Name:


CDD_SyncCrc.c













Source File Revision:


5

Source File Name:


CDD_SnycCrcNonRte.c













Source File Revision:


3

Source File Name:

















Source File Revision:
































EA4 Static Analysis Compliance Guideline version:







1.04
















Poly Space version:

Windows User: eg. 2013b

2013B





TL109A sub project version:

2.2.0



































Quality Check Items:








































Rationale is required for all answers of No





































tools/local folders' header files are appropriate and










Yes
Comments:










function prototypes match the latest component version











































100% Compliance to the EA4 Static Analysis

Yes
Comments:




Compliance Guideline











































Are previously added justification and deviation










Yes
Comments:




comments still appropriate











































Do all MISRA deviation comments use approved










Yes
Comments:




deviation tags











































For any component source files (.c, .h, generated Cfg.c and Cfg.h)












Yes
Comments:




with conditional compilation, has Polyspace been run with all

















combinations of build constants that can be used together in a build?

























(Note which conditional compilation results have been archived)




















































Cyclomatic complexity and Static path count OK










Yes
Comments:




for all functions in the component per Design
















and Coding Standards rule [N47]










































































































General Notes / Comments:

























Code Prover is showing 4 instances of dead code. This is because the function is a client server port and requires a direct function call to reserver a hardware

unit in order to set it to a reserved value. The Code is looking for the PIM to contain a reserved value in order to execute.

Depending on the configuration used, for example P1H-CE, Polyspace may show dead code errors in bug finder and code prover. This is expected since

the design will not take certain paths depending on the settings used.



























Review Board:




























Change Owner:

Kevin Smith




Review Date :

01/30/18


































Lead Peer Reviewer:


Avinash James




Approved by Reviewer(s):



Yes

































Other Reviewer(s):


















































































Rationale/justification for items marked "No" approved by: