Skip to content

Rrivera/add orsingleshotmode bits#132

Merged
rrivera747 merged 13 commits intodevelopfrom
rrivera/add-orsingleshotmode-bits
Mar 23, 2026
Merged

Rrivera/add orsingleshotmode bits#132
rrivera747 merged 13 commits intodevelopfrom
rrivera/add-orsingleshotmode-bits

Conversation

@rrivera747
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the CFO run-plan toolchain to support a new single-shot mode-bits OR instruction, updates related opcode translation/logging, and adjusts CFO counter register exposure/formatting to align with updated firmware register semantics.

Changes:

  • Add OR_SINGLESHOT_MODE_BITS instruction support in the CFO compiler (parsing + opcode translation).
  • Update run-plan validation to tolerate expected readback differences for single-shot mode-bit operations.
  • Replace SERDES byte/packet counters with new marker/heartbeat counter registers and add a new __COUTS__ logging macro alias.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
dtcInterfaceLib/otsStyleCoutMacros.h Adds __COUTS__(LVL) alias for level-based logging.
cfoInterfaceLib/CFO_Registers.h Updates counter register enum entries and adds new counter read/format APIs.
cfoInterfaceLib/CFO_Registers.cpp Implements new counters; modifies run-plan write/verify logging and validation behavior.
cfoInterfaceLib/CFO_Compiler.hh Adds OR_SINGLESHOT_MODE_BITS opcode; changes opcode translation map key type.
cfoInterfaceLib/CFO_Compiler.cpp Adds opcode parsing/translation for new instruction; adjusts logging; updates mode-bit instruction handling.
Comments suppressed due to low confidence (1)

cfoInterfaceLib/CFO_Compiler.cpp:946

  • Same out-of-bounds issue here: __COUTVS__(2, number[1]) is executed even when number.size() < 2. Please guard the index or log number directly to avoid undefined behavior.
		else  // just try!
		{
			__COUTVS__(2, number[1]);
			if (number.size() > 2 && number[1] == 'x')  // assume hex value
				tmpValue = (T)strtol(number.c_str(), 0, 16);
			else if (number.size() > 1 && number[0] == 'b')            // assume binary value
				tmpValue = (T)strtol(number.substr(1).c_str(), 0, 2);  // skip first 'b' character
			else
				tmpValue = (T)strtol(number.c_str(), 0, 10);
			// __SS__ << "Invalid type '" << StringMacros::demangleTypeName(typeid(retValue).name()) << "' requested for a numeric string. Data was '" << number

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cfoInterfaceLib/CFO_Registers.cpp
Comment thread cfoInterfaceLib/CFO_Registers.cpp
Comment thread cfoInterfaceLib/CFO_Registers.cpp Outdated
Comment thread cfoInterfaceLib/CFO_Compiler.cpp
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 23, 2026

@rrivera747 I've opened a new pull request, #133, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits March 23, 2026 19:44
@rrivera747 rrivera747 merged commit 185e4bf into develop Mar 23, 2026
10 of 11 checks passed
@rrivera747 rrivera747 deleted the rrivera/add-orsingleshotmode-bits branch March 23, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants