1 - MicroCtrlrSuprt Integration Manual

Integration Manual

For

MicroCtrlrSuprt

VERSION: 1

DATE: 07/19/17

Prepared By:

Software Group,

Nexteer Automotive,

Saginaw, MI, USA

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

Revision History

Sl. No.DescriptionAuthorVersionDate
1Initial versionLucas Wendling107/19/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

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 Non RTE NvM Blocks 10

7.4 RTE NvM Blocks 10

8 Compiler Settings 11

8.1 Preprocessor MACRO 11

8.2 Optimization Settings 11

9 Appendix 12

Abbrevations And Acronyms

AbbreviationDescription

References

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

Sr. No.TitleVersion

Dependencies

This component is dependant on the v800_ghs.h compiler header file for definition of some compiler intrinsic functions.

SWCs

ModuleRequired Feature

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

This component provides the following inline functions in NxtrMcuSuprtLib.h for use as needed in components and integration project. Note that the exact API for usage can be found in the header file.

For P1M devices:

Function NameDescription
WrProtdRegPortJ_u32Protected Register write sequence for 32bit PortJ peripheral registers
WrProtdRegPort0_u32Protected Register write sequence for 32bit Port0 peripheral registers
WrProtdRegPort1_u32Protected Register write sequence for 32bit Port1 peripheral registers
WrProtdRegPort2_u32Protected Register write sequence for 32bit Port2 peripheral registers
WrProtdRegPort3_u32Protected Register write sequence for 32bit Port3 peripheral registers
WrProtdRegPort4_u32Protected Register write sequence for 32bit Port4 peripheral registers
WrProtdRegPort5_u32Protected Register write sequence for 32bit Port5 peripheral registers
WrProtdRegSys_u08Protected Register write sequence for 8bit Sys peripheral registers
WrProtdRegSys_u32Protected Register write sequence for 32bit Sys peripheral registers
WrProtdRegSysClmac_u32Protected Register write sequence for 32bit Clmac peripheral registers
WrProtdRegClma0_u08Protected Register write sequence for 8bit Clma0 peripheral registers
WrProtdRegClma1_u08Protected Register write sequence for 8bit Clma1 peripheral registers
WrProtdRegClma2_u08Protected Register write sequence for 8bit Clma2 peripheral registers
WrProtdRegClma3_u08Protected Register write sequence for 8bit Clma3 peripheral registers
WrProtdRegEcmm_u08Protected Register write sequence for 8bit Ecmm peripheral registers
WrProtdRegEcmc_u08Protected Register write sequence for 8bit Ecmc peripheral registers
WrProtdRegEcm_u08Protected Register write sequence for 8bit Ecm peripheral registers
WrProtdRegEcm_u16Protected Register write sequence for 16bit Ecm peripheral registers
WrProtdRegEcm_u32Protected Register write sequence for 32bit Ecm peripheral registers
WrProtdRegFlmd_u32Protected Register write sequence for 32bit Flmd peripheral registers
NxtrSwRstAPI to issue a Nexteer Defined Software Reset
NxtrSwRstFromExcpnAPI to issue a Nexteer Defined Software Reset for resetting from a hardware exception source

For P1XC devices:

Function NameDescription
WrProtdRegEcmm0_u32Protected Register write sequence for 32bit Ecmm0 peripheral registers
WrProtdRegEcmc0_u32Protected Register write sequence for 32bit Ecmc0 peripheral registers
WrProtdRegEcm0_u32Protected Register write sequence for 32bit Ecm0 peripheral registers
WrProtdRegFlmd_u32Protected Register write sequence for 32bit Flmd peripheral registers
NxtrSwRstAPI to issue a Nexteer Defined Software Reset
NxtrSwRstFromExcpnAPI to issue a Nexteer Defined Software Reset for resetting from a hardware exception source

Configuration REQUIREMeNTS

None

Build Time Config

ModulesNotes

Configuration Files to be provided by Integration Project

N/A

Da Vinci Parameter Configuration Changes

ParameterNotesSWC

DaVinci Interrupt Configuration Changes

ISR NameNotes

Manual Configuration Changes

ConstantNotesSWC

Integration DATAFLOW REQUIREMENTS

Required Global Data Inputs

Required Global Data Outputs

Specific Include Path present

Yes – Integrator must properly choose the correct include search path in this component in the integration .gpj file. The path chosen must align with the correct micro family (e.g. P1M vs P1MC) as well as the correct specific micro derivative that is being used in the integration project (e.g. R7F701373A). Additionally, the integration .gpj should only include the correct subproject .gpj file (again aligning to the correct micro family as well as correct micro derivative). Please note that two include paths are required in the integration project for use of this component, one to the base family being used (e.g. “-I..\..\AR202A_MicroCtrlrSuprt_Impl\include\P1XC\”) and one to the exact micro derivative (e.g. “-I..\..\AR202A_MicroCtrlrSuprt_Impl\include\P1XC\R7F701373A\”).

Runnable Scheduling

None.

InitScheduling RequirementsTrigger
RunnableScheduling RequirementsTrigger

.

Memory Map REQUIREMENTS

Mapping

Memory SectionContentsNotes

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

Usage

FeatureRAMROM

NvM Blocks

Compiler Settings

Preprocessor MACRO

Optimization Settings

Appendix

<This section is for appendix>

2 - MicroCtrlrSuprt Module Design Document

Module Design Document

For

MicroCtrlrSuprt

7/19/17

Prepared For:

Software Engineering

Nexteer Automotive,

Saginaw, MI, USA

Prepared By:

Software Group,

Nexteer Automotive,

Saginaw, MI, USA
Change History

DescriptionAuthorVersionDate
Initial VersionLucas Wendling17/19/17


Table of Contents

1 Introduction 5

1.1 Purpose 5

1.2 Scope 5

2 High-Level Description 6

3 Design details of software module 7

3.1 Graphical representation of NxtrOsErrHndlg (Expected External Intefaces) 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

5 Software Component Implementation 9

5.1 Sub-Module Functions 9

5.1.1 Init: 9

5.1.2 Per: 9

5.2 Server Runables 9

5.2.1 NxtrOsErrHndlg 9

5.2.1.1 Design Rationale 9

5.2.1.2 Processing 9

5.3 Interrupt Functions 13

5.4 Module Internal (Local) Functions 13

5.4.1 Local Function #1 13

5.4.1.1 Design Rationale 13

5.4.1.2 Processing 13

5.5 GLOBAL Function/Macro Definitions 13

5.5.1 GLOBAL Function #1 13

5.5.1.1 Design Rationale 13

5.5.1.2 Processing 13

6 Known Limitations with Design 14

7 UNIT TEST CONSIDERATION 15

Appendix A Abbreviations and Acronyms 16

Appendix B Glossary 17

Appendix C References 18

Introduction

Purpose

This design document will capture the design of the Nexteer Mcu Support Library (NxtrMcuSuprtLib) functionality. This is the only portion of this component that is designed by Nexteer rather than generated by a 3rd party tool.

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.

High-Level Description

The Nexteer designed portions of this component include the definition of some inline functions for supporting the Renesas microcontroller. These are described in detail in the following sections. Note that this component supports multiple files to support the different microcontroller variants used by Nexteer.

Design details of software module

Graphical representation of Protected Register Write Functions

In general, the design of all protected write functions contained in this module follow the following high-level flow:

Graphical representation of Nexteer Software Reset Function

Graphical representation of Nexteer Software Reset From Exception Function

Constant Data Dictionary

Program (fixed) Constants

Embedded Constants

Local Constants

Constant NameResolutionUnitsValue
None

Software Component Implementation

Sub-Module Functions

Init:

None

Per:

None

Library/Server Runables

P1M Micro Variants

Protected Write APIs

Function NameWrProtdRegPortJ_u32TypeMinMax
Arguments PassedWrVal_Arguint32FullFull
WrAddr_Argpointer to volatile uint32

Valid values:

0xFFC24014

0xFFC24018

0xFFC24028

Return ValueN/A (void)
Function NameWrProtdRegPort0_u32TypeMinMax
Arguments PassedWrVal_Arguint32FullFull
WrAddr_Argpointer to volatile uint32

Valid values:

0xFFC14014

0xFFC14018

0xFFC1403C

0xFFC14028

0xFFC10030

Return ValueN/A (void)
Function NameWrProtdRegPort1_u32TypeMinMax
Arguments PassedWrVal_Arguint32FullFull
WrAddr_Argpointer to volatile uint32

Valid values:

0xFFC14054

0xFFC14058

0xFFC1407C

0xFFC14068

0xFFC10070

Return ValueN/A (void)
Function NameWrProtdRegPort2_u32TypeMinMax
Arguments PassedWrVal_Arguint32FullFull
WrAddr_Argpointer to volatile uint32

Valid values:

0xFFC14094

0xFFC14098

0xFFC140BC

0xFFC140A8

0xFFC100B0

Return ValueN/A (void)
Function NameWrProtdRegPort3_u32TypeMinMax
Arguments PassedWrVal_Arguint32FullFull
WrAddr_Argpointer to volatile uint32

Valid values:

0xFFC140D4

0xFFC140D8

0xFFC140FC

0xFFC140E8

0xFFC100F0

Return ValueN/A (void)
Function NameWrProtdRegPort4_u32TypeMinMax
Arguments PassedWrVal_Arguint32FullFull
WrAddr_Argpointer to volatile uint32

Valid values:

0xFFC14114

0xFFC14118

0xFFC1413C

0xFFC14128

0xFFC10130

Return ValueN/A (void)
Function NameWrProtdRegPort5_u32TypeMinMax
Arguments PassedWrVal_Arguint32FullFull
WrAddr_Argpointer to volatile uint32

Valid values:

0xFFC14154

0xFFC14158

0xFFC1417C

0xFFC14168

0xFFC10170

Return ValueN/A (void)
Function NameWrProtdRegSys_u08TypeMinMax
Arguments PassedWrVal_Arguint8FullFull
WrAddr_Argpointer to volatile uint8

Valid values:

0xFFF82838

0xFFF82830

0xFFF8282C

0xFFF8283C

Return ValueN/A (void)
Function NameWrProtdRegSys_u32TypeMinMax
Arguments PassedWrVal_Arguint32FullFull
WrAddr_Argpointer to volatile uint32

Valid values:

0xFFF82840

Return ValueN/A (void)
Function NameWrProtdRegSysClmac_u32TypeMinMax
Arguments PassedWrVal_Arguint32FullFull
WrAddr_Argpointer to volatile uint32

Valid values:

0xFFF82C00

0xFFF8AC18

0xFFF89080

0xFFF890C0

0xFFF89200

0xFFF8A440

0xFFF88204

Return ValueN/A (void)
Function NameWrProtdRegClma0_u08TypeMinMax
Arguments PassedWrVal_Arguint8FullFull
WrAddr_Argpointer to volatile uint8

Valid values:

0xFFF88400

Return ValueN/A (void)
Function NameWrProtdRegClma1_u08TypeMinMax
Arguments PassedWrVal_Arguint8FullFull
WrAddr_Argpointer to volatile uint8

Valid values:

0xFFF88420

Return ValueN/A (void)
Function NameWrProtdRegClma2_u08TypeMinMax
Arguments PassedWrVal_Arguint8FullFull
WrAddr_Argpointer to volatile uint8

Valid values:

0xFFF88440

Return ValueN/A (void)
Function NameWrProtdRegClma3_u08TypeMinMax
Arguments PassedWrVal_Arguint8FullFull
WrAddr_Argpointer to volatile uint8

Valid values:

0xFFF88460

Return ValueN/A (void)
Function NameWrProtdRegEcmm_u08TypeMinMax
Arguments PassedWrVal_Arguint8FullFull
WrAddr_Argpointer to volatile uint8

Valid values:

0xFFD60000

0xFFD60004

Return ValueN/A (void)
Function NameWrProtdRegEcmc_u08TypeMinMax
Arguments PassedWrVal_Arguint8FullFull
WrAddr_Argpointer to volatile uint8

Valid values:

0xFFD61000

0xFFD61004

Return ValueN/A (void)
Function NameWrProtdRegEcm_u08TypeMinMax
Arguments PassedWrVal_Arguint8FullFull
WrAddr_Argpointer to volatile uint8

Valid values:

0xFFD62000

0xFFD6203C

Return ValueN/A (void)
Function NameWrProtdRegEcm_u16TypeMinMax
Arguments PassedWrVal_Arguint16FullFull
WrAddr_Argpointer to volatile uint16

Valid values:

0xFFD62044

Return ValueN/A (void)
Function NameWrProtdRegEcm_u32TypeMinMax
Arguments PassedWrVal_Arguint32FullFull
WrAddr_Argpointer to volatile uint32

Valid values:

0xFFD62004

0xFFD62008

0xFFD6200C

0xFFD62010

0xFFD62014

0xFFD62018

0xFFD6201C

0xFFD62020

0xFFD62024

0xFFD62028

0xFFD62034

0xFFD62038

0xFFD62048

0xFFD6204C

0xFFD62050

0xFFD62054

Return ValueN/A (void)
Function NameWrProtdRegFlmd_u32TypeMinMax
Arguments PassedWrVal_Arguint32FullFull
WrAddr_Argpointer to volatile uint32

Valid values:

0xFFA00000

Return ValueN/A (void)
Design Rationale

These functions will perform the correct sequence of writes to protected registers. These are designed such that the function attempts the write sequence up to 3 times with increasing levels of interrupt disabling for each attempt (no interrupts disabled->Os interrupts disabled->All interrupts disabled). Since these functions are broken out based on the peripheral register set to be written and width of register write, DET error checking is done to ensure the implementer is using the correct API. A DET error is also set if for some reason the 3 write attempts all fail.

Processing

See source code for implementation.

Nexteer Software Reset

Function NameNxtrSwRstTypeMinMax
Arguments PassedMcuDiagcData0_ArgMcuDiagc1FullFull
McuDiagcData1_Arguint32FullFull
Return ValueN/A (void)
Design Rationale

This function exists to ensure that before calling a reset, the caller is properly indicating what the source of the reset is and that this type of reset is part of the known list of reset causes. Additionally, the second parameter is able to store more information along with the reset. This processing is done in a separate component, but the interface is the “SetMcuDiagcIdnData” API. Additionally, the Renesas SAN indicates that before any software reset, the register containing the reset cause flags shall be cleared. The Mcu_PerformReset() function is then called to perform the actual reset. In the event that there is an issue where this function doesn’t actually perform a reset as expected, a while loop is entered at the end of this function, which could likely lead to a hardware watchdog timeout if this loop is entered.

Processing

See source code for implementation.

Nexteer Software Reset From Exception

Function NameNxtrSwRstFromExcpnTypeMinMax
Arguments PassedMcuDiagcData0_ArgMcuDiagc1FullFull
McuDiagcData1_Arguint32FullFull
Return ValueN/A (void)
Design Rationale

This function exists to ensure that before calling a reset from a hardware exception, the caller is properly indicating what the source of the reset is and that this type of reset is part of the known list of reset causes. This function will clear all ECM status registers prior to issuing a reset to ensure a known state of these registers after the reset. Additionally, the second parameter to this function is used to store more information along with the reset.

In an effort to try to capture useful data relating to the exception, the internal logic of this function will attempt to at least store the register value that contains the program counter of when the exception occurred. In order for this to work, a value of “0x0000000” must be passed to the “McuDiagcData1_Arg” argument in the case of an FE exception, and an value of “0xFFFFFFFF” must be passed to the “McuDiagcData1_Arg” argument in the case of an EI exception. In case of any other values in the “McuDiagcData1_Arg” , this function assumes the caller of this function has already setup data that is desired to be stored in this argument, and therefore leaves it unmodified.

This storage of this reset information is done in a separate component, but the interface is the “SetMcuDiagcIdnData” API.

This function also intentionally attempts to write the error output pin to an “error” state as a redundant mechanisms for putting the system into a safe state in the event that the software reset (which also should drive the system to a safe state) doesn’t properly execute.

Additionally, the Renesas SAN indicates that before any software reset, the register containing the reset cause flags shall be cleared. The Mcu_PerformReset() function is then called to perform the actual reset. In the event that there is an issue where this function doesn’t actually perform a reset as expected, a while loop is entered at the end of this function, which could likely lead to a hardware watchdog timeout if this loop is entered.

Processing

See source code for implementation.

P1XC Micro Variants

Protected Write APIs

Function NameWrProtdRegEcmm0_u32TypeMinMax
Arguments PassedWrVal_Arguint32FullFull
WrAddr_Argpointer to volatile uint32

Valid values:

0xFFD60000

0xFFD60004

Return ValueN/A (void)
Function NameWrProtdRegEcmc0_u32TypeMinMax
Arguments PassedWrVal_Arguint32FullFull
WrAddr_Argpointer to volatile uint32

Valid values:

0xFFD61000

0xFFD61004

Return ValueN/A (void)
Function NameWrProtdRegEcm0_u32TypeMinMax
Arguments PassedWrVal_Arguint32FullFull
WrAddr_Argpointer to volatile uint32

Valid values:

0xFFD62000

0xFFD62004

0xFFD62008

0xFFD6200C

0xFFD62010

0xFFD62014

0xFFD62018

0xFFD6201C

0xFFD62020

0xFFD62024

0xFFD62028

0xFFD6202C

0xFFD62030

0xFFD62034

0xFFD62038

0xFFD6203C

0xFFD62048

0xFFD6204C

0xFFD62050

0xFFD62054

0xFFD6205C

0xFFD62060

0xFFD62064

0xFFD62068

0xFFD6206C

0xFFD62070

0xFFD62074

0xFFD62078

Return ValueN/A (void)
Function NameWrProtdRegFlmd_u32TypeMinMax
Arguments PassedWrVal_Arguint32FullFull
WrAddr_Argpointer to volatile uint32

Valid values:

0xFFA00000

Return ValueN/A (void)
Design Rationale

These functions will perform the correct sequence of writes to protected registers. These are designed such that the function attempts the write sequence up to 3 times with increasing levels of interrupt disabling for each attempt (no interrupts disabled->Os interrupts disabled->All interrupts disabled). Since these functions are broken out based on the peripheral register set to be written and width of register write, DET error checking is done to ensure the implementer is using the correct API. A DET error is also set if for some reason the 3 write attempts all fail.

Processing

See source code for implementation.

Nexteer Software Reset

Function NameNxtrSwRstTypeMinMax
Arguments PassedMcuDiagcData0_ArgP1mcDiagc1FullFull
McuDiagcData1_Arguint32FullFull
Return ValueN/A (void)
Design Rationale

This function exists to ensure that before calling a reset, the caller is properly indicating what the source of the reset is and that this type of reset is part of the known list of reset causes. Additionally, the second parameter is able to store more information along with the reset. This processing is done in a separate component, but the interface is the “SetMcuDiagcIdnData” API. Additionally, the Renesas SAN indicates that before any software reset, the register containing the reset cause flags shall be cleared. The Mcu_PerformReset() function is then called to perform the actual reset. In the event that there is an issue where this function doesn’t actually perform a reset as expected, a while loop is entered at the end of this function, which could likely lead to a hardware watchdog timeout if this loop is entered.

Processing

See source code for implementation.

Nexteer Software Reset From Exception

Function NameNxtrSwRstFromExcpnTypeMinMax
Arguments PassedMcuDiagcData0_ArgP1mcDiagc1FullFull
McuDiagcData1_Arguint32FullFull
Return ValueN/A (void)
Design Rationale

This function exists to ensure that before calling a reset from a hardware exception, the caller is properly indicating what the source of the reset is and that this type of reset is part of the known list of reset causes. This function will clear all ECM status registers prior to issuing a reset to ensure a known state of these registers after the reset. Additionally, the second parameter to this function is used to store more information along with the reset.

In an effort to try to capture useful data relating to the exception, the internal logic of this function will attempt to at least store the register value that contains the program counter of when the exception occurred. In order for this to work, a value of “0x0000000” must be passed to the “McuDiagcData1_Arg” argument in the case of an FE exception, and an value of “0xFFFFFFFF” must be passed to the “McuDiagcData1_Arg” argument in the case of an EI exception. In case of any other values in the “McuDiagcData1_Arg” , this function assumes the caller of this function has already setup data that is desired to be stored in this argument, and therefore leaves it unmodified.

This storage of this reset information is done in a separate component, but the interface is the “SetMcuDiagcIdnData” API.

This function also intentionally attempts to write the error output pin to an “error” state as a redundant mechanisms for putting the system into a safe state in the event that the software reset (which also should drive the system to a safe state) doesn’t properly execute.

Additionally, the Renesas SAN indicates that before any software reset, the register containing the reset cause flags shall be cleared. The Mcu_PerformReset() function is then called to perform the actual reset. In the event that there is an issue where this function doesn’t actually perform a reset as expected, a while loop is entered at the end of this function, which could likely lead to a hardware watchdog timeout if this loop is entered.

Processing

See source code for implementation.

Interrupt Functions

None

Module Internal (Local) Functions

Local Function #1

Function NameTypeMinMax
Arguments Passed
Return Value

Design Rationale

Processing

GLOBAL Function/Macro Definitions

GLOBAL Function #1

Function NameTypeMinMax
Arguments Passed
Return Value

Design Rationale

Processing

Known Limitations with Design

Functionality for P1XC devices that is currently supported by this component is only targeted for P1MC variants (not designed for P1HC variants).

UNIT TEST CONSIDERATION

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 Guideline EA4 01.00.01.docxEA4 01.00.01
3Software Naming Conventions.doc1.0
4EA4 Software Naming Conventions 01.01.00.docx01.01.00

3 - MicroCtrlrSuprt Peer Review Checklists


Overview

Summary Sheet
Synergy Project
3rd Party Files
Integration Manual
Nexteer Source Code
MDD
PolySpace


Sheet 1: Summary Sheet























Rev 1.019-Apr-17
Peer Review Summary Sheet


























Synergy Project Name:



Windows User: Intended Use: Identify which component is being reviewed. This should match the component short name and the middle part of the Synergy project name MicroCtrlrSuprt
Revision / Baseline:


Windows User: Intended Use: Identify the implementation baseline name intended to be used for the changed component when changes are approved. AR202A_MicroCtrlrSuprt_Impl_2.0.0


























Change Owner:



Windows User: Intended Use: Identify the developer who made the change(s) being reviewed Lucas Wendling
Work CR ID:


Windows User: Intended Use: Identify the Implementation Work CR whose work is being reviewed (may be more than one) EA4#13868


























3rd party delivery package identifier:







Intended Use: This is a reference to the identifier of the 3rd party delivery package(s) that the component was extracted/created from. Rationale: This will allow easier tracing back to 3rd party deliveries. N/A


























Windows User: Identifiy which type of 3rd party component this is so as to provide appropriate review checklist sheets Component Type:





























































































































Windows User: General section for summarizing review comments or review notes. Review Checklist Summary:


















































Comments:
































































Sheet 2: Synergy Project

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 for 3rd Party Software Components







































Project contains necessary subprojects








Yes
Comments:

Requires dependencies for














included header files


























Project contains the correct version of subprojects








Yes
Comments:













































General Notes / Comments:



























































LN: Intended Use: Identify who were the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. KMC: Group Review Level removed in Rev 4.0 since the design review is not checked in until approved, so it would always be DR4. Review Board:


























Change Owner:

Lucas Wendling


Review Date :

07/20/17
































Lead Peer Reviewer:


Avinash James


Approved by Reviewer(s):



Yes































Other Reviewer(s):










































































Sheet 3: 3rd Party Files

Peer Review Meeting Log (3rd Party File Review)





















































Quality Check Items:






































Rationale is required for all answers of No










(e.g. component_bswmd.arxml) Component "autosar" folder contains autosar module description file from 3rd party delivery packageN/A
Comments:




































(e.g. component_preo.arxml) Component "autosar" folder contains any relevant preconfiguration files from 3rd party delivery package(s)N/A
Comments:




































If needed as in the case with Renesas MCAL (e.g. MCALcomponent_bswmd_rec.arxml taken from Vector delivery) Component "autosar" folder contains any needed supplemental autosar module description file(s)N/A
Comments:




































Component "doc" folder contains all documentation related to this component from 3rd party delivery packageN/A
Comments:




































Modifications from delivery to be reviewed (e.g. path changes) Component "generate" folder contains all external generation files from 3rd party delivery packageN/A
Comments:




































Component "include" and "src" folder contains exact component files from 3rd party delivery packageYes
Comments:

Tool generated headers contained in




include folder for P1XC devices



























Component "make" folder contains any makefiles included from 3rd party delivery packageN/A
Comments:




































1) All source and headers of component should be referenced in .gpj 2) Compiler settings may need to be tailored to source component (e.g. Renesas MCAL vs Vector BSWs) Component "tools" folder contains GHS project file with appropriate files referenced with appropriate compiler settingsYes
Comments:




































Should delete old existing files/directories from integration project and copy new ones into integration project May also contain logic for integrator user interaction if required. (e.g. selection of micro variant on MCAL) Component "tools" folder contains Integrate.bat with appropriate logic in it for integration into projectN/A
Comments:

Headers only in component, so no need




of integration batch file



























For external generation and internal behavior definition for use with Vector Davinci tools. Typically only desired/needed for non-Vector developed components. This file should be copied as part of Integrate.bat. Components optionally contains settings xml file with appropriate contentsN/A
Comments:

Headers only in component, so no need




of settings xml file



























General Notes / Comments:





























































LN: Intended Use: Identify who were the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. KMC: Group Review Level removed in Rev 4.0 since the design review is not checked in until approved, so it would always be DR4. Review Board:



























Change Owner:

Lucas Wendling


Review Date :

07/20/17

































Lead Peer Reviewer:


Avinash James


Approved by Reviewer(s):



Yes
































Other Reviewer(s):












































































Sheet 4: Integration Manual

Peer Review Meeting Log (Integration Manual Review)


























Integration Manual Name:



kzshz2: Intended Use: Identify which file is being reviewed Rationale: Required for traceability. It will help to ensure this sheet is not attached to the wrong design review form. MicroCtrlrSuprt Integration Manual.doc

Integration Manual Revision:



kzshz2: Intended Use: Identify which version of the integration manual has been reviewed. Rationale: Required for traceability between the MDD and review. Auditors will likely require this. 1





























Quality Check Items:




































Rationale is required for all answers of No










Synergy version matches header








Yes
Comments:













































Latest template used








Yes
Comments:













































Change log contains detailed description of changes








Yes
Comments:













































Changes Highlighted (for Integrator)








N/A
Comments:

Initial Version










































General Notes / Comments:



























































LN: Intended Use: Identify who were the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. KMC: Group Review Level removed in Rev 4.0 since the design review is not checked in until approved, so it would always be DR4. Review Board:


























Change Owner:

Lucas Wendling


Review Date :

07/20/17
































Lead Peer Reviewer:


Avinash James


Approved by Reviewer(s):



Yes































Other Reviewer(s):










































































Sheet 5: Nexteer Source Code

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:


NxtrMcuSuprtLib.h (P1XC version)

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) 1

























MDD Name:

MicroCtrlrSuprt Module Design Document.docx

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) 1



















































Quality Check Items:




































Rationale is required for all answers of No



































EA4 Software Naming Convention followed:











Windows User: Intended Use: list version/revision of latest released EA4 Software Naming Conventions document. (Listing version of the EA4 Common Naming Conventions is not needed since it is called out by the Software Naming Conventions document) Version:



























for variable names







Yes
Comments:




















































for constant names







N/A
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







































All variables are declared at the function level.








N/A
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 MDD








Yes
Comments:













































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; QAC can find compiler errors but not warnings.





Yes
Comments:










(and verified for all possible combinations of any














conditionally compiled code)
















































Component.h is included








N/A
Comments:



















































All includes are actually needed. (System includes








Yes
Comments:










only allowed in Nexteer library components)







































Software Design and Coding Standards followed:











Version: 2.1



























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







N/A
Comments:











"magic numbers": [N12]







































Memory mapping for non-RTE code







N/A
Comments:











is per standard







































All execution-order-dependent code can be







Yes
Comments:











recognized by the compiler: [N80]







































All loops have termination conditions that ensure







No
Comments:

There are intentional loop forever








finite loop iterations: [N63]










loops in this component after issuing software reset



























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-unsiged 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







Yes
Comments:

DET mechanism will check for








null pointer if needed: [N70]










bad pointers in this component



























Component outputs are limited to the legal range







N/A
Comments:

No Outputs








defined in the design (MDD) : [N53]







































All code is mapped with MDD (all MDD







Yes
Comments:











subfunctions and/or model blocks identified














with code comments; all code corresponds to























some MDD subfunction and/or model block): [N40]















































Review did not identify violations of other








Yes
Comments:










coding standard rules
































































General Notes / Comments:
















































Note only P1XC version of header was reviewed under this peer review, as no changes were done to the P1M version.































LN: Intended Use: Identify who were the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. KMC: Group Review Level removed in Rev 4.0 since the design review is not checked in until approved, so it would always be DR4. Review Board:


























Change Owner:

Lucas Wendling


Review Date :

07/20/17
































Lead Peer Reviewer:


Avinash James


Approved by Reviewer(s):



Yes































Other Reviewer(s):










































































Sheet 6: MDD

Peer Review Meeting Log (MDD Review)


























MDD Name:

MicroCtrlrSuprt Module Design Document.docx













MDD Revision:

1


























Source File Name:


NxtrMcuSuprtLib.h (P1M version)











Source File Revision:


3

Source File Name:


NxtrMcuSuprtLib.h (P1XC version)











Source File Revision:


1

Source File Name:















Source File Revision:






























Quality Check Items:




































Rationale is required for all answers of No










Synergy version matches document








Yes
Comments:













































Change log contains detailed description of changes








N/A
Comments:

Initial Version










































Changes Highlighted (for Unit Tester)








N/A
Comments:

Initial Version










































Diagrams have been included per MDD Guideline








Yes
Comments:











and reviewed






































All Design Exceptions and Limitations are listed








Yes
Comments:



















































Design rationale given for all global








N/A
Comments:











data not communicated through RTE ports, per














Design and Coding Standards rules [N9] and [N10].















































All Unit Test Considerations have been described








Yes
Comments:



















































General Notes / Comments:



























































LN: Intended Use: Identify who were the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. KMC: Group Review Level removed in Rev 4.0 since the design review is not checked in until approved, so it would always be DR4. Review Board:


























Change Owner:

Lucas Wendling


Review Date :

07/20/17
































Lead Peer Reviewer:


Avinash James


Approved by Reviewer(s):



Yes































Other Reviewer(s):










































































Sheet 7: PolySpace

Peer Review Meeting Log (PolySpace Review)


























Source File Name:


NxtrMcuSuprtLib.h (P1M version)











Source File Revision:


3

Source File Name:


NxtrMcuSuprtLib.h (P1XC version)











Source File Revision:


1

Source File Name:















Source File Revision:






























EA4 Static Analysis Compliance Guideline version:







01.02.00














Poly Space version:


Windows User: eg. 2013b 2013b







































Quality Check Items:




































Rationale is required for all answers of No



































Contract Folder's header files are appropriate and





kzshz2: Intended Use: Identify that the contract folder contains only the information required for this component. All other variables, constants, function prototypes, etc. should be removed. Rationale: This will help avoid unit testers having to considers object not used. It will also avoid having other files required for QAC.


Yes
Comments:




function prototypes match the latest component version







































100% Compliance to the EA4 Static AnalysisYes
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






































Cyclomatic complexity and Static path count OK






Creager, Kathleen: use Browse Function Metrics, STCYC and STPTH

Yes
Comments:





for all functions in the component per Design














and Coding Standards rule [N47]

































































































General Notes / Comments:























Red polyspace errors for inifinite loops. This is acceptable since it is intended to have these after attempting to issue a software reset.


































LN: Intended Use: Identify who were the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. KMC: Group Review Level removed in Rev 4.0 since the design review is not checked in until approved, so it would always be DR4. Review Board:


























Change Owner:

Lucas Wendling


Review Date :

07/20/17
































Lead Peer Reviewer:


Avinash James


Approved by Reviewer(s):



Yes































Other Reviewer(s):









































































4 - HeaderGen

Rev. 1.2

April 20th, 2016

Introduction

This document describes installation and usage of the C code header file generation script (HeaderGen) created by Renesas. The HeaderGen script is a Python based script that utilizes one external Python module for parsing Excel files. The purpose of the tool is to enable more configurable and consistent header file generation for our customers, as well as to provide some useful formatting options within the header files themselves.

Contents

1. Installation 1

2. Usage 2

2.1 Configuration File 2

2.2 Execution 3

2.3 Output 3

3. Revision Record 4

4. Testing 5

Installation

The following tools are needed for execution of the Script

ToolVersionInstall instructions
Pythonv2.7.9

Visit the Python Install site and download the latest v2.x.x Windows version:

https://www.python.org/downloads/

openpyxlv2.3.0

(1) Download easy_install from Windows from this link: https://bootstrap.pypa.io/ez_setup.py

(2) execute the file ez_setup.py:

>python ez_setup.py

(3) Navigate to C:\PythonXX\Script and execute

> easy_install openpyxl

.

Excel2013Script requires use of the .xlsx Excel file format

Table 1: Required SW Packages

Usage

Configuration File

The script takes as an input a text configuration file. Required fields in the file are:

FieldDescriptionExample
Input_file_nameExcel input file name and full or relative path./dr7f701310_matrix_smaller.xlsx
Tab_nameExcel tab name with relevant data – typically “APB area2”APB area2
Output_file_location

Location where the resulting header files will be written with full or relative path.

NOTE: this is currently unsupported

./
Base_type_byteBase type for byte variablesuint8
Base_type_shortBase type for short (two byte) variablesuint16
Base_type_longBase type for long (four byte) type variablesuint32
Base_union_name_byteName for byte variable access within union of register access typesUINT8
Base_union_name_shortName for short variable access within union of register access typesUINT16
Base_union_name_longName for long variable access within union of register access typesUINT32
Base_union_name_bitsName for bit variable access within union of register access types. This will provide access to the bitfield structure.BITS
[prefix] (sample text)Anything following a line starting with [prefix] will be printed exactly at the start of the header file, after the inclusion guard #ifdef
[groups] (sample group)

By default, all register access structures, address binding pragmas, and access macros will be placed into the default output file. Adding a group to the configuration file will place any register whose name starts with the text following [groups] into a separate file.

More than one piece of text can follow a group name, as shown in the example.

[groups] ADC_FILE = ADCD0, ADCD1

This will place all registers starting with either “ADC0” or “ADCD1” into an output file called dr7f701310_ADC_FILE.h, and cause them to skip the default header file.

[groups] DEFAULT =

This is the default group for all register information. It must be present in the configuration file. This will place all unmatched registers into an output file called dr7f701310_DEFAULT.h.

[suffix] (sample text)Anything following a line starting with [suffix] will be printed exactly at the end of the header file, before the inclusion guard #endif
[skip] (address)Only hexadecimal addresses are allowed to follow the [skip] tag. Any register whose address overlaps with this address will be placed into a group labeled “skip” and generate into a _SKIP.h file[skip] DEADBEEF
use_module_names = <True/False>Setting this argument to true will ignore all [groups] arguments and use the module column from the Excel file as register grouping names.use_module_names = True
gen_address_macros = <True/False>Setting this argument to true will generate macros for each register mapping their address to the register name followed by “_ADDR”gen_address_macros = True

Table 2: configuration file entries

Execution

The script can be executed by issuing this command from the command line:

> python headerGen.py config.txt

Note: this assumes (1) the python executable has been added to your system path, and (2) the headerGen,py script and config file are resident in your current directory.

The script will print several informative messages to the command line as it runs. Because the Excel file for a typical micro is very large (>50,000 lines), the script can take up to 10 minutes to execute. It will print percentage complete status messages during long running sections.

You will see these messages when the command line script has completed:

Output

Figure 1: header file contents and usage

Revision Record

Rev.DateDescription
PageSummary
1.02/8/2016AllInitial Draft
1.12/25/2016MultipleAdding support for multiple groups, marking output file directory config option as unsupported.
1.24/20/2016MultipleAdding support for register address macro generation as well as register grouping based on module name column from Excel

Testing

Due to the size of the input Excel file, it is not feasible for Renesas or a customer (user) of the script to test each of the registers generated. Therefore, we have identified a sub-set of registers that represent interesting register layout permutations for testing. As long as these registers have generated fine, we can assume that all other register, being of identical pattern to these registers, are fine as well.

The registers in the test suite are:

NumberRegister sizeBase access typeBit access typeP1M example
18-bit8-bit8-bit15.3.10 – SCI30BRR
NOTE: SCI30BRR and SCI30MDDR are allocated to the same address, so the script will parse this incorrectly.
28-bit8-bit< 8-bit, single10.4.2 – CVMF
38-bit8-bit< 8-bit, multiple16.3.2.1 – RLN30LWBR
3a8-bit8-bit, 1-bit< 8-bit, single14.3.2 – CSIH0CTL0
416-bit16-bit16-bit13.3.10 – CSIG0TX0H
516-bit16-bit8-bit16.3.3.18 – RLN30LUTDR
616-bit16-bit< 8-bit, single13.3.6 – CSIG0STCR0
716-bit16-bit< 8-bit, multiple, cross byte boundaries13.3.4 – CSIG0CTL2
816-bit16-bit, 8-bit16-bit
916-bit16-bit, 8-bit8-bit
1016-bit16-bit, 8-bit< 8-bit, single
1116-bit16-bit, 8-bit< 8-bit, multiple
1232-bit32-bit32-bit19.3.2 – RSENTT0TSC
1332-bit32-bit16-bit13.3.9 – CSIG0TX0W
1432-bit32-bit8-bit14.3.5 – CSIH0STR0
1532-bit32-bit< 8-bit, single7.9.2.1 – DMACTL
15b32-bit32-bit< 8-bit, single, all 32-bits7.9.2.13 – DTSPR0
Note: Excel and .pdf UM don’t match exactly, Excel shows these as 2-bit entries, while UM shows them as single bit entries that are clearly paired via name.
1632-bit32-bit< 8-bit, multiple7.9.2.9 – DM0CMV
16b32-bit32-bit< 8-bit, multiple, crossing byte boundaries11.3.5 – TSNREFD
1732-bit32-bit, 16-bit32-bit
1832-bit32-bit, 16-bit16-bit
1932-bit32-bit, 16-bit8-bit
2032-bit32-bit, 16-bit< 8-bit, single
2132-bit32-bit, 16-bit< 8-bit, multiple
2232-bit32-bit, 16-bit, 8-bit32-bit18.2.7.12 – FLXA0FRNMV1
2332-bit32-bit, 16-bit, 8-bit16-bit18.2.6.2 – FLXA0FRSUCC2
2432-bit32-bit, 16-bit, 8-bit8-bit18.2.3.1 – FLXA0FRLCK
2532-bit32-bit, 16-bit, 8-bit< 8-bit, single18.2.2.1 – FLXA0FROC
2632-bit32-bit, 16-bit, 8-bit< 8-bit, multiple, crossing byte boundaries18.2.5.1 – FLXA0FRT0C
27Multiple32-bit, 16-bit, 8-bit17.3.3 – RSCAN0C0CTR
28Multiple16-bit, 8-bit16.3.3.2 – RLN30LBRP01
Note: The Excel file shows this split into two 8-bit named entries: LBRP0 and LBRP1, while the UM shows a single entry.