Skip to content

add_dummy_inputs pass doesn't work with sliced signals #995

Description

@jack-melchert

For example, if i00.in0 is 16 bits, and I change this:
["self.in.0","i00.in0"]

to this:
["self.in.0","i00.in0.0:16"]

The add_dummy_inputs pass will wire a constant to every bit of i00.in0.

Failing input file:

{
  "top": "global.add1",
  "namespaces": {
    "global": {
      "modules": {
        "add1": {
          "type": ["Record",[
            ["in", ["Array",2,["Array",16,"BitIn"]]],
            ["out", ["Array",16,"Bit"]]
          ]],
          "instances": {
            "i00": {
              "genref": "coreir.add",
              "genargs": {"width":["Int", 16]}
            }
          },
          "connections": [
            ["self.in.0","i00.in0.0:16"],
            ["self.in.1","i00.in1"],
            ["i00.out","self.out"]
          ]
        }
      }
    }
  }
}

Command:

coreir -i failing_test.json -p add-dummy-inputs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions