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

Issue #722 correction introduced latches in combinatorial process #901

Closed
pascalgouedo opened this issue Nov 8, 2023 · 1 comment
Closed
Labels
Component:RTL For issues in the RTL (e.g. for files in the rtl directory) PARAM:PULP_XPULP Issue depends on the PULP_XPULP parameter Status:Resolved Issue has been resolved, but closure is pending on git merge and/or issuer confirmation Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system

Comments

@pascalgouedo
Copy link

Issue Description

To correct issue #722 a new condition (OP_A_CURRPC) has been added to a case inside a combinatorial process of cv32e40P_id_stage.sv (lines 806 to 828).

      // dependency checks
      always_comb begin
        unique case (alu_op_a_mux_sel)
          OP_A_CURRPC: begin
            if (ctrl_transfer_target_mux_sel == JT_JALR) begin
              apu_read_regs[0]       = regfile_addr_ra_id;
              apu_read_regs_valid[0] = 1'b1;
            end
          end  // OP_A_CURRPC:
          OP_A_REGA_OR_FWD: begin
            apu_read_regs[0]       = regfile_addr_ra_id;
            apu_read_regs_valid[0] = 1'b1;
          end  // OP_A_REGA_OR_FWD:
          OP_A_REGB_OR_FWD, OP_A_REGC_OR_FWD: begin
            apu_read_regs[0]       = regfile_addr_rb_id;
            apu_read_regs_valid[0] = 1'b1;
          end
          default: begin
            apu_read_regs[0]       = regfile_addr_ra_id;
            apu_read_regs_valid[0] = 1'b0;
          end
        endcase
      end

Unfortunately an unconditional else branch has been forgotten together with the if condition inside its behavioural description leading to latches inference by implementation tools.

Component

Component:RTL

Steps to Reproduce

  1. git tag cv32e40p_v1.4.1
  2. Elaborate command of any implementation tool
  3. Log
    Warning: .../cv32e40p_id_stage.sv:806: Netlist for always_comb block contains a latch.
@pascalgouedo pascalgouedo added the Component:RTL For issues in the RTL (e.g. for files in the rtl directory) label Nov 8, 2023
@pascalgouedo pascalgouedo self-assigned this Nov 8, 2023
@pascalgouedo pascalgouedo added the Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system label Nov 8, 2023
@pascalgouedo pascalgouedo removed their assignment Nov 8, 2023
@pascalgouedo
Copy link
Author

Resolved with PR #904

@pascalgouedo pascalgouedo added the Status:Resolved Issue has been resolved, but closure is pending on git merge and/or issuer confirmation label Apr 9, 2024
@pascalgouedo pascalgouedo added the PARAM:PULP_XPULP Issue depends on the PULP_XPULP parameter label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:RTL For issues in the RTL (e.g. for files in the rtl directory) PARAM:PULP_XPULP Issue depends on the PULP_XPULP parameter Status:Resolved Issue has been resolved, but closure is pending on git merge and/or issuer confirmation Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system
Projects
None yet
Development

No branches or pull requests

1 participant