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

AUTOINST broken for parameterized interface port #1253

Closed
veripoolbot opened this issue Dec 19, 2017 · 1 comment
Closed

AUTOINST broken for parameterized interface port #1253

veripoolbot opened this issue Dec 19, 2017 · 1 comment
Assignees
Labels

Comments

@veripoolbot
Copy link
Collaborator


Author Name: David Rogoff
Original Redmine Issue: 1253 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


Hi.

AUTOINST is doing very weird stuff with a parameterized port. Here's a short example with a cut-down version of the wishbone interface used in module dut that's instantiated in tb_top. The non-parameterized interface port, i_wishbone_b3_if_not_param is expanded correctly. However, interface port i_wishbone_b3_if is not recognized as an interface and shows up as two different input ports, wishbone_b3_if and i_wishbone_b3_if.

Please advise.

//////////////////////////////////////////////////////////////////////////////
//  Copyright 2014 Dov Stamler (dov.stamler@gmail.com)
//
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
interface wishbone_b3_if #(DAT_W  = 64, ADR_W  = 32, TAG_W  = 1) (input bit clk);

    localparam SEL_W = (DAT_W/8); // 1 select bit per data byte, divide by 8

    /// common signals ///
    logic [DAT_W-1:0] dat_i;  // data in bus
    logic [DAT_W-1:0] dat_o;  // data out bus
    logic             rst_i;  // core reset
    logic [TAG_W-1:0] tgd_i;  // tag for data in. Contains information associated to dat_i (such as parity).
    logic [TAG_W-1:0] tgd_o;  // tag for data out. Contains information associated to dat_o
endinterface: wishbone_b3_if



module dut
  #(
     parameter DAT_W = 16,
     parameter ADR_W = 16
     )
    (
     input logic clk,
     input logic rst,
     wishbone_b3_if #(.DAT_W(DAT_W), .ADR_W(ADR_W)) i_wishbone_b3_if,
     wishbone_b3_if i_wishbone_b3_if_not_param
     );
endmodule // dut



module tb_top;
    parameter ADR_W = 16;       // register bus address width
    parameter DAT_W = 16;       // register bus data width

    wishbone_b3_if #(.ADR_W(ADR_W),.DAT_W(DAT_W))  i_wishbone_b3_if           (clock);
    wishbone_b3_if                                 i_wishbone_b3_if_not_param (clock);

    dut
      #(/*AUTOINSTPARAM*/
        // Parameters
        .DAT_W						    (DAT_W),
        .ADR_W						    (ADR_W))
       dut
       (/*AUTOINST*/
        // Interfaces
        .i_wishbone_b3_if_not_param			    (i_wishbone_b3_if_not_param),
        // Inputs
        .clk						    (clk),
        .rst						    (rst),
        .wishbone_b3_if					    (wishbone_b3_if),
        .DAT_W						    (DAT_W),
        .ADR_W						    (ADR_W),
        .i_wishbone_b3_if				    (i_wishbone_b3_if));
endmodule // tb_top


@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2017-12-21T19:09:55Z


Thanks for the test case. Fixed in git and verilog-mode-2017-12-21-39c77b2-vpo.el.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants