Formal verification cells¶
Note
Some front-ends may not support the generic $check
cell, in such cases
calling chformal -lower
will convert each $check
cell into it’s
equivalent. See chformal
for more.
- yosys> help $allconst¶
- Properties:
- Simulation model (verilog)¶
2061module \$allconst (Y); 2062 2063 parameter WIDTH = 0; 2064 2065 output [WIDTH-1:0] Y; 2066 2067 assign Y = 'bx; 2068 2069endmodule
- yosys> help $allseq¶
- Properties:
- Simulation model (verilog)¶
2074module \$allseq (Y); 2075 2076 parameter WIDTH = 0; 2077 2078 output [WIDTH-1:0] Y; 2079 2080 assign Y = 'bx; 2081 2082endmodule
- yosys> help $anyconst¶
- Properties:
- Simulation model (verilog)¶
2014module \$anyconst (Y); 2015 2016 parameter WIDTH = 0; 2017 2018 output [WIDTH-1:0] Y; 2019 2020 assign Y = 'bx; 2021 2022endmodule
- yosys> help $anyinit¶
- Simulation model (verilog)¶
2043module \$anyinit (D, Q); 2044 2045 parameter WIDTH = 0; 2046 2047 input [WIDTH-1:0] D; 2048 output reg [WIDTH-1:0] Q; 2049 2050 initial Q <= 'bx; 2051 2052 always @(`SIMLIB_GLOBAL_CLOCK) begin 2053 Q <= D; 2054 end 2055 2056endmodule
- yosys> help $anyseq¶
- Properties:
- Simulation model (verilog)¶
2027module \$anyseq (Y); 2028 2029 parameter WIDTH = 0; 2030 2031 output [WIDTH-1:0] Y; 2032 2033 assign Y = 'bx; 2034 2035endmodule
- yosys> help $assert¶
- Properties:
- Simulation model (verilog)¶
1933module \$assert (A, EN); 1934 1935 input A, EN; 1936 1937 `ifndef SIMLIB_NOCHECKS 1938 always @* begin 1939 if (A !== 1'b1 && EN === 1'b1) begin 1940 $display("Assertion %m failed!"); 1941 $stop; 1942 end 1943 end 1944 `endif 1945 1946endmodule
- yosys> help $assume¶
- Properties:
- Simulation model (verilog)¶
1951module \$assume (A, EN); 1952 1953 input A, EN; 1954 1955 `ifndef SIMLIB_NOCHECKS 1956 always @* begin 1957 if (A !== 1'b1 && EN === 1'b1) begin 1958 $display("Assumption %m failed!"); 1959 $stop; 1960 end 1961 end 1962 `endif 1963 1964endmodule
- yosys> help $cover¶
- Properties:
- Simulation model (verilog)¶
1987module \$cover (A, EN); 1988 1989 input A, EN; 1990 1991endmodule
- yosys> help $equiv¶
- Properties:
- Simulation model (verilog)¶
2087module \$equiv (A, B, Y); 2088 2089 input A, B; 2090 output Y; 2091 2092 assign Y = (A !== 1'bx && A !== B) ? 1'bx : A; 2093 2094 `ifndef SIMLIB_NOCHECKS 2095 always @* begin 2096 if (A !== 1'bx && A !== B) begin 2097 $display("Equivalence failed!"); 2098 $stop; 2099 end 2100 end 2101 `endif 2102 2103endmodule
- yosys> help $fair¶
- Properties:
- Simulation model (verilog)¶
1978module \$fair (A, EN); 1979 1980 input A, EN; 1981 1982endmodule
- yosys> help $ff¶
- Simulation model (verilog)¶
2184module \$ff (D, Q); 2185 2186 parameter WIDTH = 0; 2187 2188 input [WIDTH-1:0] D; 2189 output reg [WIDTH-1:0] Q; 2190 2191 always @(`SIMLIB_GLOBAL_CLOCK) begin 2192 Q <= D; 2193 end 2194 2195endmodule
- yosys> help $initstate¶
- Properties:
- Simulation model (verilog)¶
1996module \$initstate (Y); 1997 1998 output reg Y = 1; 1999 reg [3:0] cnt = 1; 2000 reg trig = 0; 2001 2002 initial trig <= 1; 2003 2004 always @(cnt, trig) begin 2005 Y <= |cnt; 2006 cnt <= cnt + |cnt; 2007 end 2008 2009endmodule
- yosys> help $live¶
- Properties:
- Simulation model (verilog)¶
1969module \$live (A, EN); 1970 1971 input A, EN; 1972 1973endmodule
Formal support cells¶
- yosys> help $future_ff¶
- Simulation model (verilog)¶
3086module \$future_ff (A, Y); 3087 3088 parameter WIDTH = 0; 3089 3090 input [WIDTH-1:0] A; 3091 output [WIDTH-1:0] Y; 3092 3093 assign Y = A; 3094 3095endmodule
- yosys> help $get_tag¶
- Simulation model (verilog)¶
3045module \$get_tag (A, Y); 3046 3047 parameter TAG = ""; 3048 parameter WIDTH = 0; 3049 3050 input [WIDTH-1:0] A; 3051 output [WIDTH-1:0] Y; 3052 3053 assign Y = A; 3054 3055endmodule
- yosys> help $original_tag¶
- Simulation model (verilog)¶
3072module \$original_tag (A, Y); 3073 3074 parameter TAG = ""; 3075 parameter WIDTH = 0; 3076 3077 input [WIDTH-1:0] A; 3078 output [WIDTH-1:0] Y; 3079 3080 assign Y = A; 3081 3082endmodule
- yosys> help $overwrite_tag¶
- Simulation model (verilog)¶
3059module \$overwrite_tag (A, SET, CLR); 3060 3061 parameter TAG = ""; 3062 parameter WIDTH = 0; 3063 3064 input [WIDTH-1:0] A; 3065 input [WIDTH-1:0] SET; 3066 input [WIDTH-1:0] CLR; 3067 3068endmodule
- yosys> help $set_tag¶
- Simulation model (verilog)¶
3029module \$set_tag (A, SET, CLR, Y); 3030 3031 parameter TAG = ""; 3032 parameter WIDTH = 0; 3033 3034 input [WIDTH-1:0] A; 3035 input [WIDTH-1:0] SET; 3036 input [WIDTH-1:0] CLR; 3037 output [WIDTH-1:0] Y; 3038 3039 assign Y = A; 3040 3041endmodule