47 lines
1.3 KiB
Systemverilog
47 lines
1.3 KiB
Systemverilog
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
||
|
|
//
|
||
|
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||
|
|
// any use, without warranty, 2025 by Geza Lore.
|
||
|
|
// SPDX-License-Identifier: CC0-1.0
|
||
|
|
|
||
|
|
`define signal(name, width) wire [width-1:0] name;
|
||
|
|
|
||
|
|
module t (
|
||
|
|
`include "portlist.vh" // Boilerplate generated by t_dfg_break_cycles.py
|
||
|
|
rand_a, rand_b, srand_a, srand_b
|
||
|
|
);
|
||
|
|
|
||
|
|
`include "portdecl.vh" // Boilerplate generated by t_dfg_break_cycles.py
|
||
|
|
|
||
|
|
input rand_a;
|
||
|
|
input rand_b;
|
||
|
|
input srand_a;
|
||
|
|
input srand_b;
|
||
|
|
wire logic [63:0] rand_a;
|
||
|
|
wire logic [63:0] rand_b;
|
||
|
|
wire logic signed [63:0] srand_a;
|
||
|
|
wire logic signed [63:0] srand_b;
|
||
|
|
|
||
|
|
`signal(CONCAT_RHS, 2);
|
||
|
|
assign CONCAT_RHS[0] = rand_a[0];
|
||
|
|
assign CONCAT_RHS[1] = CONCAT_RHS[0];
|
||
|
|
|
||
|
|
`signal(CONCAT_LHS, 2);
|
||
|
|
assign CONCAT_LHS[0] = CONCAT_LHS[1];
|
||
|
|
assign CONCAT_LHS[1] = rand_a[1];
|
||
|
|
|
||
|
|
`signal(CONCAT_MID, 3);
|
||
|
|
assign CONCAT_MID[0] = |CONCAT_MID[2:1];
|
||
|
|
assign CONCAT_MID[2:1] = {rand_a[2], ~rand_a[2]};
|
||
|
|
|
||
|
|
`signal(SEL, 3);
|
||
|
|
assign SEL[0] = rand_a[4];
|
||
|
|
assign SEL[1] = SEL[0];
|
||
|
|
assign SEL[2] = SEL[1];
|
||
|
|
|
||
|
|
`signal(EXTEND_SRC, 5);
|
||
|
|
assign EXTEND_SRC[0] = rand_a[3];
|
||
|
|
assign EXTEND_SRC[3:1] = 3'(EXTEND_SRC[0]);
|
||
|
|
assign EXTEND_SRC[4] = EXTEND_SRC[1];
|
||
|
|
endmodule
|