Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unintended truncation behavior #114

Merged
merged 1 commit into from
Jun 15, 2023

Conversation

darthscsi
Copy link
Collaborator

truncation was intended to be limited to partial connect, not connect. This was changed 5 months ago.

Copy link
Member

@seldridge seldridge left a comment

Choose a reason for hiding this comment

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

Truncation was always the behavior of all FIRRTL compilers even when the spec said differently. 🥲 It's great that we can finally change this.

Please add a [major] marker and update the revision history. I can get this into the 3.0.0 release.

@seldridge
Copy link
Member

The background here being that all FIRRTL compilers never correctly implemented the "connect does not truncate" behavior. I removed the spec fan-fiction here and opted for the gritty reality. I.e., the following has always, unfortunately compiled:

circuit Foo:
  module Foo:
    input a: UInt<2>
    output b: UInt<1>

    b <= a

To the following Verilog:

module Foo(
  input  [1:0] a,
  output       b
);

  assign b = a[0];
endmodule

@seldridge seldridge force-pushed the dev/darthscsi/truncate_connect branch from e1d3338 to 3992932 Compare June 15, 2023 22:23
@seldridge seldridge force-pushed the dev/darthscsi/truncate_connect branch from 3992932 to 242c088 Compare June 15, 2023 22:24
@seldridge seldridge merged commit 242c088 into main Jun 15, 2023
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