fpga: lib: Add default wiretypes to synchronizer

The module was failing with missing wire types when instantiated from
another module with a default wiretype of 'none'. To fix this, this
module was also moved to no default wire type.


Original-commit: 9d1e200d5e727b34339fc4ca9b6f94b28449747a
This commit is contained in:
Martin Braun
2023-11-14 17:15:53 -06:00
committed by Wade Fife
parent 23220e0737
commit e44fe8625b
2 changed files with 16 additions and 8 deletions
+8 -4
View File
@@ -43,16 +43,18 @@
// tool analyze this path. // tool analyze this path.
// //
`default_nettype none
module synchronizer #( module synchronizer #(
parameter WIDTH = 1, parameter WIDTH = 1,
parameter STAGES = 2, parameter STAGES = 2,
parameter INITIAL_VAL = 0, parameter INITIAL_VAL = 0,
parameter FALSE_PATH_TO_IN = 1 parameter FALSE_PATH_TO_IN = 1
)( )(
input clk, input wire clk,
input rst, input wire rst,
input [WIDTH-1:0] in, input wire [WIDTH-1:0] in,
output [WIDTH-1:0] out output wire [WIDTH-1:0] out
); );
generate if (FALSE_PATH_TO_IN == 1) begin generate if (FALSE_PATH_TO_IN == 1) begin
@@ -70,3 +72,5 @@ module synchronizer #(
end endgenerate end endgenerate
endmodule //synchronizer endmodule //synchronizer
//
`default_nettype wire
+8 -4
View File
@@ -5,15 +5,17 @@
// SPDX-License-Identifier: LGPL-3.0-or-later // SPDX-License-Identifier: LGPL-3.0-or-later
// //
`default_nettype none
module synchronizer_impl #( module synchronizer_impl #(
parameter WIDTH = 1, parameter WIDTH = 1,
parameter STAGES = 2, parameter STAGES = 2,
parameter INITIAL_VAL = 0 parameter INITIAL_VAL = 0
)( )(
input clk, input wire clk,
input rst, input wire rst,
input [WIDTH-1:0] in, input wire [WIDTH-1:0] in,
output [WIDTH-1:0] out output wire [WIDTH-1:0] out
); );
(* ASYNC_REG = "TRUE" *) reg [WIDTH-1:0] value[0:STAGES-1]; (* ASYNC_REG = "TRUE" *) reg [WIDTH-1:0] value[0:STAGES-1];
@@ -45,3 +47,5 @@ module synchronizer_impl #(
assign out = value[STAGES-1]; assign out = value[STAGES-1];
endmodule //synchronizer_impl endmodule //synchronizer_impl
`default_nettype wire