2006-08-26 13:35:28 +02:00
|
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
|
|
|
|
//
|
2020-03-21 16:24:24 +01:00
|
|
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
|
|
|
|
// any use, without warranty, 2005 by Wilson Snyder.
|
|
|
|
|
// SPDX-License-Identifier: CC0-1.0
|
2006-08-26 13:35:28 +02:00
|
|
|
|
2025-09-13 15:28:43 +02:00
|
|
|
module t;
|
2006-08-26 13:35:28 +02:00
|
|
|
|
|
|
|
|
wire [7:0] bitout;
|
|
|
|
|
reg [7:0] allbits;
|
|
|
|
|
reg [7:0] onebit;
|
|
|
|
|
reg [8:0] onebitbad; // Wrongly sized
|
|
|
|
|
|
|
|
|
|
sub sub [7:0] (allbits, onebitbad, bitout);
|
|
|
|
|
|
|
|
|
|
// This is ok.
|
|
|
|
|
wire [9:8] b;
|
|
|
|
|
wire [1:0] c;
|
|
|
|
|
sub sub2 [9:8] (allbits,b,c);
|
|
|
|
|
|
|
|
|
|
endmodule
|
|
|
|
|
|
|
|
|
|
module sub (input [7:0] allbits, input onebit, output bitout);
|
2019-06-22 18:32:13 +02:00
|
|
|
assign bitout = onebit ^ (^ allbits);
|
2006-08-26 13:35:28 +02:00
|
|
|
endmodule
|