SystemVerilog probes · 62Vivado: supported

the type operator: var type(a) b;

Vivado: supported. The open-source chain: all four stages pass.

stagetoday
rtl, simulationpass
synth, synthesispass
netlist, the netlistpass
bit, the bitstreampass

What does Vivado do with it?

Supported. UG901 v2023.2 Ch.10 Table 27 (p.285): 'Type operator: Supported'

What does the open-source chain do with it?

since #28 rtl: PASS: iverilog refuses the design, 'design.sv:3: syntax error', and dewfpga sim goes on with 'design.sv:3: note [sim-from-build]' (the simulation runs on the design as the build reads it, 'read by yosys-slang, the second reader', written back as Verilog and compiled with the testbench and yosys' cell models), then 'PASS'; since #4; built by yosys-slang, yosys' own reader refused this code (the note in bit.log); iverilog alone refuses it, 'design.sv:3: syntax error'; bit: 'pnr ok: 17 LUT, 0 FF, no clocked paths, timing not applicable (full log: top.log)'; netlist: PASS, 'EQV SKIP: iverilog cannot compile the RTL, so only the testbench checked the netlist'

Which error pages explain the messages?

What is the probe's code?

From test/sv/62_type_operator.

design.sv

module top(input logic [15:0] sw, output logic [15:0] led);
  logic [5:0] a;
  var type(a) b;                       // the type operator: b has a's type, logic [5:0]
  assign a = sw[5:0];
  assign b = a + 6'd3;                 // wraps at 6 bits, as a does
  assign led = {10'd0, b};
endmodule

tb.sv

module tb;
  reg [15:0] sw = 16'h0000;
  wire [15:0] led;
  integer i;
  top dut(.sw(sw), .led(led));
  initial begin
    for (i = 0; i < 64; i = i + 1) begin
      sw = {10'h2c5, i[5:0]}; #1
      if (!(led === {10'd0, 6'(sw[5:0] + 6'd3)})) begin $display("FAIL: b is 6 bits wide (sw=%h led=%h)", sw, led); $finish; end
    end
    $display("PASS"); $finish;
  end
endmodule

previous: enum ranges: typedef enum {S[3]} (S0, S1, S2) and {T[5:7]} (T5, T6, T7)
next: a real localparam cast to int: localparam int INC = int'(STEP); (2.6 rounds to 3)