Skip to content

NOTE: For those who are getting "Unable to bind parameter WIDTH" error. #4

Description

@RudraSama

Change code
from

module register(
  input wire [WIDTH-1:0] in,
  input wire clk,
  input wire reset,
  input wire enable,
  output reg [WIDTH-1:0] out
);

  parameter WIDTH = 8;

  always @(posedge clk) begin
    if (enable)
      out <= in;
  end

endmodule

to

module register
    #(parameter WIDTH = 8) (
  input wire [WIDTH-1:0] in,
  input wire clk,
  input wire reset,
  input wire enable,
  output reg [WIDTH-1:0] out
);

  always @(posedge clk) begin
    if (enable)
      out <= in;
  end

endmodule

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions