aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources/blackboxes/ParameterizedExtModule.v
blob: 28635b6cc464cfe301aea9c21be0f9abd81b3d91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// See LICENSE for license details.
module ParameterizedExtModule(
  input [15:0] foo,
  output [15:0] bar
);
  parameter VALUE = 0;
  parameter STRING = "one";
  parameter REAL = 1.0;
  parameter type TYP = bit;
  wire [15:0] fizz;
  wire [15:0] buzz;
  wire TYP tpe;
  assign bar = foo + VALUE + fizz + buzz + tpe;
  assign fizz = (STRING == "two")? 2 : (STRING == "one")? 1 : 0;
  assign buzz = (REAL > 2.5E50)? 2 : (REAL < 0.0)? 1 : 0;
  assign tpe = 2; // Will give 0 if bit, 2 for any larger width
endmodule