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)¶
2183module \$allconst (Y); 2184 2185 parameter WIDTH = 0; 2186 2187 output [WIDTH-1:0] Y; 2188 2189 assign Y = 'bx; 2190 2191endmodule
- yosys> help $allseq¶
- Properties:
- Simulation model (verilog)¶
2196module \$allseq (Y); 2197 2198 parameter WIDTH = 0; 2199 2200 output [WIDTH-1:0] Y; 2201 2202 assign Y = 'bx; 2203 2204endmodule
- yosys> help $anyconst¶
- Properties:
- Simulation model (verilog)¶
2136module \$anyconst (Y); 2137 2138 parameter WIDTH = 0; 2139 2140 output [WIDTH-1:0] Y; 2141 2142 assign Y = 'bx; 2143 2144endmodule
- yosys> help $anyinit¶
- Simulation model (verilog)¶
2165module \$anyinit (D, Q); 2166 2167 parameter WIDTH = 0; 2168 2169 input [WIDTH-1:0] D; 2170 output reg [WIDTH-1:0] Q; 2171 2172 initial Q <= 'bx; 2173 2174 always @(`SIMLIB_GLOBAL_CLOCK) begin 2175 Q <= D; 2176 end 2177 2178endmodule
- yosys> help $anyseq¶
- Properties:
- Simulation model (verilog)¶
2149module \$anyseq (Y); 2150 2151 parameter WIDTH = 0; 2152 2153 output [WIDTH-1:0] Y; 2154 2155 assign Y = 'bx; 2156 2157endmodule
- yosys> help $assert¶
- Properties:
- Simulation model (verilog)¶
2055module \$assert (A, EN); 2056 2057 input A, EN; 2058 2059 `ifndef SIMLIB_NOCHECKS 2060 always @* begin 2061 if (A !== 1'b1 && EN === 1'b1) begin 2062 $display("Assertion %m failed!"); 2063 $stop; 2064 end 2065 end 2066 `endif 2067 2068endmodule
- yosys> help $assume¶
- Properties:
- Simulation model (verilog)¶
2073module \$assume (A, EN); 2074 2075 input A, EN; 2076 2077 `ifndef SIMLIB_NOCHECKS 2078 always @* begin 2079 if (A !== 1'b1 && EN === 1'b1) begin 2080 $display("Assumption %m failed!"); 2081 $stop; 2082 end 2083 end 2084 `endif 2085 2086endmodule
- yosys> help $cover¶
- Properties:
- Simulation model (verilog)¶
2109module \$cover (A, EN); 2110 2111 input A, EN; 2112 2113endmodule
- yosys> help $equiv¶
- Properties:
- Simulation model (verilog)¶
2209module \$equiv (A, B, Y); 2210 2211 input A, B; 2212 output Y; 2213 2214 assign Y = (A !== 1'bx && A !== B) ? 1'bx : A; 2215 2216 `ifndef SIMLIB_NOCHECKS 2217 always @* begin 2218 if (A !== 1'bx && A !== B) begin 2219 $display("Equivalence failed!"); 2220 $stop; 2221 end 2222 end 2223 `endif 2224 2225endmodule
- yosys> help $fair¶
- Properties:
- Simulation model (verilog)¶
2100module \$fair (A, EN); 2101 2102 input A, EN; 2103 2104endmodule
- yosys> help $ff¶
- Simulation model (verilog)¶
2306module \$ff (D, Q); 2307 2308 parameter WIDTH = 0; 2309 2310 input [WIDTH-1:0] D; 2311 output reg [WIDTH-1:0] Q; 2312 2313 always @(`SIMLIB_GLOBAL_CLOCK) begin 2314 Q <= D; 2315 end 2316 2317endmodule
- yosys> help $initstate¶
- Properties:
- Simulation model (verilog)¶
2118module \$initstate (Y); 2119 2120 output reg Y = 1; 2121 reg [3:0] cnt = 1; 2122 reg trig = 0; 2123 2124 initial trig <= 1; 2125 2126 always @(cnt, trig) begin 2127 Y <= |cnt; 2128 cnt <= cnt + |cnt; 2129 end 2130 2131endmodule
- yosys> help $live¶
- Properties:
- Simulation model (verilog)¶
2091module \$live (A, EN); 2092 2093 input A, EN; 2094 2095endmodule
Formal support cells¶
- yosys> help $future_ff¶
- Simulation model (verilog)¶
3208module \$future_ff (A, Y); 3209 3210 parameter WIDTH = 0; 3211 3212 input [WIDTH-1:0] A; 3213 output [WIDTH-1:0] Y; 3214 3215 assign Y = A; 3216 3217endmodule
- yosys> help $get_tag¶
- Simulation model (verilog)¶
3167module \$get_tag (A, Y); 3168 3169 parameter TAG = ""; 3170 parameter WIDTH = 0; 3171 3172 input [WIDTH-1:0] A; 3173 output [WIDTH-1:0] Y; 3174 3175 assign Y = A; 3176 3177endmodule
- yosys> help $original_tag¶
- Simulation model (verilog)¶
3194module \$original_tag (A, Y); 3195 3196 parameter TAG = ""; 3197 parameter WIDTH = 0; 3198 3199 input [WIDTH-1:0] A; 3200 output [WIDTH-1:0] Y; 3201 3202 assign Y = A; 3203 3204endmodule
- yosys> help $overwrite_tag¶
- Simulation model (verilog)¶
3181module \$overwrite_tag (A, SET, CLR); 3182 3183 parameter TAG = ""; 3184 parameter WIDTH = 0; 3185 3186 input [WIDTH-1:0] A; 3187 input [WIDTH-1:0] SET; 3188 input [WIDTH-1:0] CLR; 3189 3190endmodule
- yosys> help $set_tag¶
- Simulation model (verilog)¶
3151module \$set_tag (A, SET, CLR, Y); 3152 3153 parameter TAG = ""; 3154 parameter WIDTH = 0; 3155 3156 input [WIDTH-1:0] A; 3157 input [WIDTH-1:0] SET; 3158 input [WIDTH-1:0] CLR; 3159 output [WIDTH-1:0] Y; 3160 3161 assign Y = A; 3162 3163endmodule