Skip to content

Fix missing ++ operator and duplicate WithU55CTweaks in Protoaccu55cConfig#1

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-syntax-error-remove-duplicate-configuration
Draft

Fix missing ++ operator and duplicate WithU55CTweaks in Protoaccu55cConfig#1
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-syntax-error-remove-duplicate-configuration

Conversation

Copilot AI commented Mar 26, 2026

Copy link
Copy Markdown

Protoaccu55cConfig had two bugs: a trailing ++ with no right-hand operand on AbstractConfig (compile error), and WithU55CTweaks listed twice under different qualifications.

Changes

  • fpga/src/main/scala/u55c/Configs.scala
    • Added missing ++ between new chipyard.config.AbstractConfig and new chipyard.RocketConfig
    • Removed duplicate unqualified new WithU55CTweaks ++ (already present as new chipyard.fpga.u55c.WithU55CTweaks ++)
// Before
class Protoaccu55cConfig extends Config (
  new chipyard.fpga.u55c.WithU55CTweaks ++
  new chipyard.harness.WithBoardFPGAHarnessBinders ++
  new WithU55CTweaks ++                         // duplicate
  new protoacc.WithProtoAcc ++
  new freechips.rocketchip.rocket.WithNBigCores(1) ++
  new chipyard.config.AbstractConfig            // missing ++
  new chipyard.RocketConfig
)

// After
class Protoaccu55cConfig extends Config (
  new chipyard.fpga.u55c.WithU55CTweaks ++
  new chipyard.harness.WithBoardFPGAHarnessBinders ++
  new protoacc.WithProtoAcc ++
  new freechips.rocketchip.rocket.WithNBigCores(1) ++
  new chipyard.config.AbstractConfig ++
  new chipyard.RocketConfig
)
Original prompt

Fix syntax error (missing ++ operator) and remove duplicate configuration in Protoaccu55cConfig.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: @learningHWSW/chipyard-protoacc I need to help to fix bug located in /chipyard-protoacc/fpga/src/main/scala/u55c/Configs.scala

Assistant: The user wanted to fix a bug in the file /chipyard-protoacc/fpga/src/main/scala/u55c/Configs.scala in the repository learningHWSW/chipyard-protoacc.

I inspected the file content and identified two issues in the Protoaccu55cConfig class:

  1. Syntax Error: The line new chipyard.config.AbstractConfig (line 31) was missing the ++ operator, which is required to chain configurations in Scala/Chisel.
  2. Duplicate Configuration: The configuration WithU55CTweaks was included twice: once as new chipyard.fpga.u55c.WithU55CTweaks ++ (line 26) and again as new WithU55CTweaks ++ (line 28).

I proceeded to fix these issues by:

  1. Creating a new branch fix-config-syntax-u55c.
  2. Updating the file fpga/src/main/scala/u55c/Configs.scala to add the missing ++ operator and remove the duplicate WithU55CTweaks entry (removing line 28 to keep the fully qualified one at line 26).
  3. Creating a Pull Request with these changes.

I've opened a pull request to fix the syntax errors in fpga/src/main/scala/u55c/Configs.scala.

The PR addresses the following:

  1. Missing Operator: Added the missing ++ after new chipyard.config.AbstractConfig to fix the compilation error.
  2. Duplicate Config: Removed the redundant new WithU55CTweaks ++ entry since new chipyard.fpga.u55c.WithU55CTweaks ++ was already present.

You can review and merge the changes here: [PR Link will be provided by the tool].

User: @copilot Accepted Confirmation: Are you sure?

Assistant: I've fixed a syntax error in fpga/src/main/scala/u55c/Configs.scala. It appears that a ++ operator was missing between chipyard.config.AbstractConfig and chipyard.RocketConfig in the Protoaccu55cConfig class, which is required for Chisel/Chipyard config composition.

I have pushed the fix to the fix-config-syntax-u55c branch.

Here is the corrected section:

class Protoaccu55cConfig extends Config (
  new chipyard.fpga.u55c.WithU55CTweaks ++
  new chipyard.harness.WithBoardFPGAHarnessBinders ++
  new WithU55CTweaks ++
  new protoacc.WithProtoAcc ++
  new freechips.rocketchip.rocket.WithNBigCores(1) ++
  new chipyard.config.AbstractConfig ++  // Added missing ++ here
  new chipyard.RocketConfig
)

Would you like me to open a pull request for this fix?

User: @copilot Dismissed Confirmation: Are you sure?

Assistant: I've updated fpga/src/main/scala/u55c/Configs.scala on the fix-config-syntax-u55c branch and opened a pull request to fix the syntax error.

Changes Made:

  1. Fixed Syntax Error: Added the missing ++ operator after new chipyard.config.AbstractConfig.
  2. Removed Duplicate: Removed the redundant new WithU55CTweaks ++ entry since new chipyard.fpga.u55c.WithU55CTweaks ++ was already present.

You can review and merge the pull request here: [PR Link will be provided by the tool].

User: package chipyard.fpga.u55c

import protoacc.WithProtoAcc
import org.chipsalliance.cde.config._

class WithU55CTweaks extends Config(
new WithU55CAXIMemHarnessBinder ++
new chipyard.harness.WithTieOffL2FBusAXI ++
// clocking
new chipyard.harness.WithAllClocksFromHarnessClockInstantiator ++
new chipyard.harness.WithHarnessBinderClockFreqMHz(70) ++
new chipyard.config.WithUniformBusFrequencies(70) ++
new testchipip.serdes.WithNoSerialTL ++
new testchipip.soc.WithNoScratchpads
)

// useful for xdma test
class EmptyU55CConfig extends Config (
new WithU55CTweaks ++
new chipyard.EmptyChipTopConfig ++
new WithProtoAcc()
)

class Protoaccu55cConfig extends Config (
new WithU55CTweaks ++
new protoacc.WithProtoAcc ++
new freechips.rocketchip.rocket.WithNBigCores(1) ++
new chipyard.config.AbstractConfig ++
)

[error] /home/wlstjr4425/chipyard-protoacc/fpga/src/main/scala/u55c/Configs.scala:28:38: missing argument list for method ++ in class Parameters
[error] Unapplied methods are only converted to functions when a function type is expected.
[error] You can make this conversion explicit by writing ++ _ or ++(_) instead of ++.
[error] new chipyard.config.AbstractConfig ++
[error] ^
[error] one error found
[error] (Compile / compileIncremental) Compilation failed
[error] Total time: 4 s, completed Mar 26, 2026, 11:36:23 AM

Assistant: I have created a fix for the syntax error in fpga/src/main/scala/u55c/Configs.scala and opened a pull request.

The error you saw (missing argument list for method ++) was because AbstractConfig had a trailing ++ but no subsequent configuration object to append to. I have corrected this by properly chai...

This pull request was created from Copilot chat.


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI changed the title [WIP] Fix syntax error and remove duplicate configuration in Protoaccu55cConfig Fix missing ++ operator and duplicate WithU55CTweaks in Protoaccu55cConfig Mar 26, 2026
Copilot AI requested a review from learningHWSW March 26, 2026 02:44
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.

2 participants