Commit afb2a591 by SergeyDegtyar

Review 'misc' test group (help - select)

parent c12353b9
tee -q -o result.log help
tee -q -o result.log help -all
tee -q -o result.log help -cells
$dff (CLK, D, Q)
No help message for this cell type found.
Run 'help $dff+' to display the Verilog model for this cell type.
tee -q -o result.out help $dff
module \\$dff (CLK, D, Q);
parameter WIDTH = 0;
parameter CLK_POLARITY = 1'b1;
input CLK;
input \[WIDTH-1:0\] D;
output reg \[WIDTH-1:0\] Q;
wire pos_clk = CLK == CLK_POLARITY;
always @(posedge pos_clk) begin
Q <= D;
end
endmodule
tee -q -o result.out help $dff+
read_verilog \[options\] \[filename\]
tee -q -o result.out help read_verilog
No such command or cell type: u
read_verilog ../top.v
proc
hilomap
select -assert-count 1 t:$dffsr
select -assert-count 4 t:$mux
select -assert-count 2 t:$not
select -assert-count 2 t:dffsr
select -assert-none t:$dffsr t:$mux t:$not t:dffsr %% t:* %D
read_verilog ../top.v
proc
hilomap -hicell VCC V
select -assert-count 4 t:VCC
select -assert-count 0 t:GND
read_verilog ../top.v
proc
hilomap -locell GND G -hicell VCC V -singleton
select assert-count 1 t:VCC
select assert-count 1 t:GND
read_verilog ../top.v
proc
hilomap -hicell VCC V -singleton
select -assert-count 2 t:VCC
select -assert-count 0 t:GND
read_verilog ../top.v
proc
hilomap -locell GND G
select -assert-count 0 t:VCC
select -assert-count 6 t:GND
read_verilog ../top.v
proc
hilomap -locell GND G -singleton
select -assert-count 0 t:VCC
select -assert-count 2 t:GND
read_verilog ../top.v
proc
hilomap -singleton
module dffsr
( input d, clk, pre, clr, output reg q );
always @( posedge clk, posedge pre, posedge clr )
if ( pre )
q <= 1'b1;
else if ( clr )
q <= 1'b0;
else
q <= d;
endmodule
module top (
input clk,
input a,
output b,b2
);
dffsr u_dffsr (
.clk (clk ),
.clr (1'b0),
.pre (1'b1),
.d (a ),
.q (b )
);
dffsr u2_dffsr (
.clk (clk ),
.clr (1'b0),
.pre (1'b1),
.d (a ),
.q (b2 )
);
endmodule
read_verilog ../top.v
proc
synth
synth_xilinx
tee -o result.out history
(* black_box *) module top
(
input x,
input y,
input cin,
output A,
output cout
);
assign {cout,A} = cin + y + x;
endmodule
read_verilog ../top.v
synth
insbuf
select -assert-count 1 t:$_BUF_
read_verilog ../top.v
synth
insbuf -buf $_NOT_ A Y
select -assert-count 1 t:$_NOT_
read_verilog ../top.v
synth
insbuf buf
read_verilog ../top_wide.v
synth
insbuf
select -assert-count 16 t:$_BUF_
module top (
out,
i,
clk,
o,
in
);
output [7:0] out;
input clk, in;
reg [7:0] out;
input i;
output o;
always @(posedge clk)
begin
out <= out << 1;
out[0] <= in;
end
endmodule
module top (
out,
in
);
output [7:0] out;
input [7:0] in;
wire [7:0] o;
assign o = in;
assign out = o;
endmodule
tee -o result.log log "OK"
tee -o result.log log -n "OK"
tee -o result.log log -nolog "OK"
tee -o result.log log -stderr "OK"
tee -o result.log log -stdout "OK"
Longest topological path in top (length=3):
0: \\x
1: $add$../top.v:13$2_Y (via $add$../top.v:13$2)
2: \\A (via $procdff$4)
3: $add$../top.v:15$3_Y (via $add$../top.v:15$3)
read_verilog ../top.v
proc
tee -o result.out ltp
Warning: Detected loop at $and$../top_logic_loop.v:13$1_Y in top
Longest topological path in top (length=3):
0: \\x
1: $and$../top_logic_loop.v:13$1_Y (via $and$../top_logic_loop.v:13$1)
2: $and$../top_logic_loop.v:14$2_Y (via $and$../top_logic_loop.v:14$2)
3: $not$../top_logic_loop.v:15$3_Y (via $not$../top_logic_loop.v:15$3)
read_verilog ../top_logic_loop.v
proc
tee -o result.out ltp
Longest topological path in top (length=1):
0: \\x
1: $add$../top.v:13$2_Y (via $add$../top.v:13$2)
ff: \\A (via $procdff$4)
read_verilog ../top.v
proc
tee -o result.out ltp -noff
Warning: Ignoring module top because it contains processes (run 'proc' command first).
read_verilog ../top.v
tee -o result.out ltp
module top
(
input x,
input y,
input cin,
output reg A,
output cout
);
wire o;
always @(posedge cin)
A <= y + x;
assign cout = cin + A;
endmodule
module top
(
input x,
input y,
input z,
output A,
output B
);
wire A1,B1,A2,B2;
assign A1 = x & A2;
assign A2 = A1 & y;
assign A = ~A2;
endmodule
read_verilog -sv ../top.v
proc
tee -o result.log miter -assert -make_outputs top
tee -o result.log miter -assert -make_outputs middle
read_verilog -sv ../top_assert.v
proc
tee -o result.log miter -assert -make_outputs top miter
tee -o result.log miter -assert -make_outputs middle
read_verilog -sv ../top.v
proc
tee -o result.log miter -assert -flatten top
tee -o result.log miter -assert -flatten middle
read_verilog -sv ../top.v
proc
tee -o result.log miter -equiv top gate top
read_verilog -sv ../top.v
proc
tee -o result.log miter -equiv gold gate top
read_verilog -sv ../top.v
proc
tee -o result.log miter -assert t
read_verilog ../top_equiv.v
hierarchy -top dut
proc
memory -nomap
equiv_opt -run :prove -map +/ecp5/cells_sim.v synth_ecp5
memory
opt -full
miter -equiv -flatten -make_assert -make_outputs gold gate miter
read_verilog ../top_equiv.v
hierarchy -top dut
proc
memory -nomap
equiv_opt -run :prove -map +/ecp5/cells_sim.v synth_ecp5
memory
opt -full
miter -equiv -flatten -ignore_gold_x -make_assert -make_outputs gold gate miter
read_verilog ../top_equiv.v
hierarchy -top dut
proc
memory -nomap
equiv_opt -run :prove -map +/ecp5/cells_sim.v synth_ecp5
memory
opt -full
miter -equiv -flatten -make_outcmp -make_assert -make_outputs gold gate miter
read_verilog -sv ../top.v
proc
tee -o result.log miter
ERROR: No matching port in gate module was found for \\y!
read_verilog -sv ../top_err_1.v
proc
tee -o result.log miter -equiv middle u_rtl top1
ERROR: No matching port in gold module was found for \\y!
read_verilog -sv ../top_err_1.v
proc
tee -o result.log miter -equiv u_rtl middle top1
read_verilog -sv ../top.v
proc
tee -o result.log miter -equiv top middle top
module top
(
input x,
input y,
input cin,
output reg A,
output cout
);
parameter X = 1;
wire o;
`ifndef BUG
always @(posedge cin)
A <= o;
//assign cout = cin? y : x;
middle u_mid (.x(x),.o(o));
u_rtl inst_u_rtl (.x(x),.o(o));
`else
assign {cout,A} = cin - y * x;
`endif
endmodule
module middle
(
input x,
input y,
output o
);
assign o = x + y;
endmodule
module u_rtl
(
input x,
input y,
output o
);
assign o = x + y;
endmodule
module top
(
input x,
input y,
input cin,
output reg A,
output reg cout
);
reg ASSERT = 1;
(* anyconst *) reg foo;
(* anyseq *) reg too;
initial begin
begin
A = 0;
cout = 0;
end
end
`ifndef BUG
always @(posedge x) begin
if ($initstate)
A <= 0;
A <= y + cin + too;
assume(too);
assume(s_eventually too);
end
always @(negedge x) begin
if ($initstate)
cout <= 0;
cout <= y + A + foo;
assert(ASSERT);
assert(s_eventually ASSERT);
end
`else
assign {cout,A} = cin - y * x;
`endif
endmodule
module middle
(
input x,
input y,
output o
);
assign o = x + y;
endmodule
module dut(
input fast_clk, slow_clk,
input [3:0] waddr, raddr,
input [3:0] wdata,
input wen,
output [3:0] rdata
);
reg [3:0] mem[0:15];
reg [3:0] raddr_reg;
always @(posedge fast_clk) begin
if (wen)
mem[waddr] <= wdata;
end
always @(posedge slow_clk)
raddr_reg <= raddr;
assign rdata = mem[raddr_reg];
endmodule
module top
(
input x,
input y,
input cin,
output reg A,
output cout
);
parameter X = 1;
wire o;
`ifndef BUG
always @(posedge cin)
A <= o;
//assign cout = cin? y : x;
middle u_mid (.x(x),.o(o));
u_rtl inst_u_rtl (.x(x),.o(o));
`else
assign {cout,A} = cin - y * x;
`endif
endmodule
module middle
(
input x,
input y,
output o
);
assign o = x + y;
endmodule
module u_rtl
(
input x,
// input y,
output o
);
assign o = x;
endmodule
read_verilog ../top.v
mutate -list 512 -o mutate.yss
script mutate.yss
select -assert-count 2 t:$add
select -assert-count 9 t:$not
select -assert-count 3 t:$xnor
select -assert-count 1 t:$xor
read_verilog ../top.v
tee -o result.log mutate -mode cnot0 -module top -cell $add$../top.v:12$2 -port Y -portbit 0 -ctrlbit 1 -wire A -wirebit 0 -src ../top.v:7 -src ../top.v:12
select -assert-count 1 t:$xnor
read_verilog ../top.v
tee -o result.log mutate -mode cnot1 -module top -cell $add$../top.v:12$2 -port A -portbit 0 -ctrlbit 1 -src top.v:12
select -assert-count 1 t:$xor
read_verilog ../top.v
tee -o result.log mutate -mode const0 -module top -cell $add$../top.v:12$2 -port Y -portbit 0 -wire A -wirebit 0 -src ../top.v:7 -src ../top.v:12
stat
read_verilog ../top.v
tee -o result.log mutate -mode const1 -module top -cell $add$../top.v:12$2 -port Y -portbit 0 -wire A -wirebit 0 -src ../top.v:7 -src ../top.v:12
stat
read_verilog ../top.v
tee -o result.log mutate -cell $add$../top.v:12$1 -port \Y -portbit 0 -ctrlbit 0 -module top
read_verilog ../top.v
tee -o result.log mutate -mode inv -module top -cell $add$../top.v:12$2 -port Y -portbit 0 -wire A -wirebit 0 -src ../top.v:7 -src ../top.v:12
select -assert-count 1 t:$not
read_verilog ../top.v
tee -o result.log mutate -list 32
read_verilog ../top.v
tee -o result.log mutate -list 32 -cfg weight_cover 1
read_verilog ../top.v
tee -o result.log mutate -list 32 -ctrl A 1 1
read_verilog ../top.v
tee -o result.log mutate -list 32 -none
read_verilog ../top.v
tee -o result.log mutate -list 32 -o o.txt
read_verilog ../top.v
tee -o result.log mutate -list 32 -s s.txt
help mutate
read_verilog ../top.v
tee -o result.log mutate -list 32 -seed 5
read_verilog ../top_mem.v
mutate -list 512 -o mutate.yss
script mutate.yss
module top
(
input x,
input y,
input cin,
output A,
output cout
);
assign {cout,A} = cin + y + x;
endmodule
module top
(
input [7:0] data_a, data_b,
input [6:1] addr_a, addr_b,
input we_a, we_b, re_a, re_b, clka, clkb,
output reg [7:0] q_a, q_b
);
// Declare the RAM variable
reg [7:0] ram[63:0];
initial begin
q_a <= 8'h00;
q_b <= 8'd0;
end
// Port A
always @ (posedge clka)
begin
if (we_a)
begin
ram[addr_a] <= data_a;
q_a <= data_a;
end
if (re_b)
begin
q_a <= ram[addr_a];
end
end
// Port B
always @ (posedge clkb)
begin
if (we_b)
begin
ram[addr_b] <= data_b;
q_b <= data_b;
end
if (re_b)
begin
q_b <= ram[addr_b];
end
end
endmodule
read_verilog ../top.v
proc
select -assert-count 13 t:$mux
select -assert-count 1 t:$pmux
select -assert-count 28 t:$eq
muxpack
select -assert-count 1 t:$mux
select -assert-count 3 t:$pmux
select -assert-count 28 t:$eq
read_verilog ../top_reduce.v
proc
muxpack
select -assert-count 1 t:$pmux
select -assert-count 16 t:$eq
select -assert-count 8 t:$reduce_or
module mux2 (S,A,B,Y);
input S;
input A,B;
output reg Y;
always @(*)
Y = (S)? B : A;
endmodule
module mux4 ( S, D, Y );
input[1:0] S;
input[3:0] D;
output Y;
reg Y;
wire[1:0] S;
wire[3:0] D;
always @*
if (S == 0) Y <= D[0];
else if (S == 1) Y <= D[1];
else if (S == 2) Y <= D[2];
else if (S == 3) Y <= D[3];
else Y <= 1'bx;
endmodule
module mux8 ( S, D, Y );
input[2:0] S;
input[7:0] D;
output Y;
reg Y;
wire[2:0] S;
wire[7:0] D;
always @*
if (S == 0) Y <= D[0];
else if (S == 1) Y <= D[1];
else if (S == 2) Y <= D[2];
else if (S == 3) Y <= D[3];
else if (S == 4) Y <= D[4];
else if (S == 5) Y <= D[5];
else if (S == 6) Y <= D[6];
else if (S == 7) Y <= D[7];
else Y <= 1'bx;
endmodule
module mux16 (D, S, Y);
input [15:0] D;
input [3:0] S;
output Y;
reg Y;
wire[3:0] S;
wire[15:0] D;
always @*
begin
case( S )
0 : Y = D[0];
1 : Y = D[1];
2 : Y = D[2];
3 : Y = D[3];
4 : Y = D[4];
5 : Y = D[5];
6 : Y = D[6];
7 : Y = D[7];
8 : Y = D[8];
9 : Y = D[9];
10 : Y = D[10];
11 : Y = D[11];
12 : Y = D[12];
13 : Y = D[13];
14 : Y = D[14];
15 : Y = D[15];
default: Y = 1'bx;
endcase
end
endmodule
module top (
input [3:0] S,
input [15:0] D,
output M2,M4,M8,M16
);
mux2 u_mux2 (
.S (S[0]),
.A (D[0]),
.B (D[1]),
.Y (M2)
);
mux4 u_mux4 (
.S (S[1:0]),
.D (D[3:0]),
.Y (M4)
);
mux8 u_mux8 (
.S (S[2:0]),
.D (D[7:0]),
.Y (M8)
);
mux16 u_mux16 (
.S (S[3:0]),
.D (D[15:0]),
.Y (M16)
);
endmodule
module mux (D, S, Y);
input [7:0] D;
input [3:0] S;
output Y;
reg Y;
wire[3:0] S;
wire[7:0] D;
always @*
begin
case( S )
0,1 : Y = D[0];
2,3 : Y = D[1];
4,5 : Y = D[2];
6,7 : Y = D[3];
8,9 : Y = D[4];
10,11 : Y = D[5];
12,13 : Y = D[6];
14,15 : Y = D[7];
default: Y = 1'bx;
endcase
end
endmodule
module mux4 ( S, D, Y );
input[1:0] S;
input[3:0] D;
output Y;
reg Y;
wire[1:0] S;
wire[3:0] D;
always @*
if (S != 0) Y <= D[0];
else if (S != 1) Y <= D[1];
else if (S != 2) Y <= D[2];
else if (S != 3) Y <= D[3];
else Y <= 1'bx;
endmodule
read_verilog ../top.v
proc
pmux2shiftx -onehot ignore
onehot
tee -o result.out
read_verilog ../top.v
proc
pmux2shiftx -onehot ignore
onehot -v
read_verilog ../top.v
proc
pmux2shiftx -onehot ignore
onehot -vv
read_verilog ../top_1.v
proc
pmux2shiftx -onehot ignore
onehot -vv
read_verilog ../top_2.v
proc
pmux2shiftx -onehot ignore
onehot -vv
read_verilog ../top_3.v
proc
pmux2shiftx -onehot ignore
onehot -vv
read_verilog ../top_4.v
proc
pmux2shiftx -onehot ignore
onehot -vv
read_verilog ../top_5.v
proc
pmux2shiftx -onehot ignore
onehot -vv
read_verilog ../top_6.v
proc
pmux2shiftx -onehot ignore
onehot -vv
read_verilog ../top_fsm.v
proc
pmux2shiftx -onehot ignore
onehot -vv
module top(C, S, Y);
input C;
input [1:0] S;
output reg [3:0] Y;
initial Y = 0;
always @(posedge C) begin
case (S)
2'b00: Y <= 4'b0001;
2'b01: Y <= 4'b0010;
2'b10: Y <= 4'b0100;
2'b11: Y <= 4'b1000;
endcase
end
endmodule
module mux (sel, res);
input [2:0] sel;
output [7:0] res;
reg [7:0] res;
always @(sel or res)
begin
case (sel)
3'b000 : res = 8'b00000001;
3'b001 : res = 8'b00000010;
3'b010 : res = 8'b00000100;
3'b011 : res = 8'b00001000;
3'b100 : res = 8'b00010000;
3'b101 : res = 8'b00100000;
3'b110 : res = 8'b01000000;
default : res = 8'b10000000;
endcase
end
endmodule
module mux (sel, res);
input [2:0] sel;
output [7:0] res;
reg [7:0] res;
always @(sel)
begin
case (sel)
3'b000 : res = 8'b11111110;
3'b001 : res = 8'b11111101;
3'b010 : res = 8'b11111011;
3'b011 : res = 8'b11110111;
3'b100 : res = 8'b11101111;
3'b101 : res = 8'b11011111;
3'b110 : res = 8'b10111111;
default : res = 8'b01111111;
endcase
end
endmodule
module mux (sel, res);
input [2:0] sel;
output [7:0] res;
reg [7:0] res;
always @(sel)
begin
case (sel)
3'b000 : res = 8'b00000001;
// unused decoder output
3'b001 : res = 8'bxxxxxxxx;
3'b010 : res = 8'b00000100;
3'b011 : res = 8'b00001000;
3'b100 : res = 8'b00010000;
3'b101 : res = 8'b00100000;
3'b110 : res = 8'b01000000;
default : res = 8'b10000000;
endcase
end
endmodule
module mux (sel, res);
input [2:0] sel;
output [7:0] res;
reg [7:0] res;
always @(sel or res)
begin
case (sel)
3'b000 : res = 8'b00000001;
3'b001 : res = 8'b00000010;
3'b010 : res = 8'b00000100;
3'b011 : res = 8'b00001000;
3'b100 : res = 8'b00010000;
3'b101 : res = 8'b00100000;
// 110 and 111 selector values are unused
default : res = 8'bxxxxxxxx;
endcase
end
endmodule
module priority (sel, code);
input [7:0] sel;
output [2:0] code;
reg [2:0] code;
always @(sel)
begin
if (sel[0]) code <= 3'b000;
else if (sel[1]) code <= 3'b001;
else if (sel[2]) code <= 3'b010;
else if (sel[3]) code <= 3'b011;
else if (sel[4]) code <= 3'b100;
else if (sel[5]) code <= 3'b101;
else if (sel[6]) code <= 3'b110;
else if (sel[7]) code <= 3'b111;
else code <= 3'bxxx;
end
endmodule
module lshift (DI, SEL, SO);
input [7:0] DI;
input [1:0] SEL;
output [7:0] SO;
reg[7:0] SO;
always @(DI or SEL)
begin
case (SEL)
2'b00 : SO <= DI;
2'b01 : SO <= DI << 1;
2'b10 : SO <= DI << 3;
default : SO <= DI << 2;
endcase
end
endmodule
module fsm (
clock,
reset,
req_0,
req_1,
gnt_0,
gnt_1
);
input clock,reset,req_0,req_1;
output gnt_0,gnt_1;
wire clock,reset,req_0,req_1;
reg gnt_0,gnt_1;
parameter SIZE = 3 ;
parameter IDLE = 3'b001,GNT0 = 3'b010,GNT1 = 3'b100,GNT2 = 3'b101 ;
reg [SIZE-1:0] state;
reg [SIZE-1:0] next_state;
always @ (posedge clock)
begin : FSM
if (reset == 1'b1) begin
state <= #1 IDLE;
gnt_0 <= 0;
gnt_1 <= 0;
end else
case(state)
IDLE : if (req_0 == 1'b1) begin
state <= #1 GNT0;
`ifndef BUG
gnt_0 <= 1;
`else
gnt_0 <= 1'bZ;
`endif
end else if (req_1 == 1'b1) begin
gnt_1 <= 1;
state <= #1 GNT0;
end else begin
state <= #1 IDLE;
end
GNT0 : if (req_0 == 1'b1) begin
state <= #1 GNT0;
end else begin
gnt_0 <= 0;
state <= #1 IDLE;
end
GNT1 : if (req_1 == 1'b1) begin
state <= #1 GNT2;
gnt_1 <= req_0;
end
GNT2 : if (req_0 == 1'b1) begin
state <= #1 GNT1;
gnt_1 <= req_1;
end
default : state <= #1 IDLE;
endcase
end
endmodule
module top (
input clk,
input rst,
input a,
input b,
output g0,
output g1
);
fsm u_fsm ( .clock(clk),
.reset(rst),
.req_0(a),
.req_1(b),
.gnt_0(g0),
.gnt_1(g1));
endmodule
module bc #(
parameter SIZE=2,
parameter WIDTH=16
)
(
input clk,
input rst,
output wire din_ready,
input wire din_valid,
input wire [WIDTH-1:0] din_data,
input wire [SIZE-1:0] dout_ready,
output wire [SIZE-1:0] dout_valid,
output wire [WIDTH*SIZE-1:0] dout_data
);
reg [SIZE-1 : 0] ready_reg;
wire [SIZE-1 : 0] ready_all;
genvar i;
initial begin
ready_reg = 0;
end
generate
for (i = 0; i < SIZE; i=i+1) begin
assign ready_all[i] = dout_ready[i] | ready_reg[i];
assign dout_valid[i] = din_valid & !ready_reg[i];
assign dout_data[(i+1)*WIDTH-1:i*WIDTH] = din_data;
always @(posedge clk) begin
if (rst || (!din_valid) || din_ready) begin
ready_reg[i] <= 1'b0;
end else if (dout_ready[i]) begin
ready_reg[i] <= 1'b1;
end
end
end
endgenerate
assign din_ready = &ready_all;
endmodule
module demux
(
input clk,
input rst,
output reg din_ready,
input wire din_valid,
input wire [2:0] din_data,
input wire dout0_ready,
output reg dout0_valid,
output wire [0:0] dout0_data,
input wire dout1_ready,
output reg dout1_valid,
output wire [1:0] dout1_data
);
wire [2:0] din_s; // u1 | u2
wire [1:0] din_s_data; // u2
assign din_s_data = din_s[1:0];
wire [0:0] din_s_ctrl; // u1
assign din_s_ctrl = din_s[2:2];
assign din_s = din_data;
assign dout0_data = din_data;
assign dout1_data = din_data;
always @*
begin
din_ready = 1'bx;
dout0_valid = 0;
dout1_valid = 0;
if (din_valid) begin
case(din_s_ctrl)
0 : begin
din_ready = dout0_ready;
dout0_valid = din_valid;
end
1 : begin
din_ready = dout1_ready;
dout1_valid = din_valid;
end
default: begin
din_ready = 1'bx;
dout0_valid = 1'bx;
dout1_valid = 1'bx;
end
endcase
end
end
endmodule
module mux
(
input clk,
input rst,
output reg ctrl_ready,
input wire ctrl_valid,
input wire [0:0] ctrl_data,
output reg din0_ready,
input wire din0_valid,
input wire [0:0] din0_data,
output reg din1_ready,
input wire din1_valid,
input wire [1:0] din1_data,
input wire dout_ready,
output reg dout_valid,
output wire [2:0] dout_data
);
wire [0:0] ctrl_s; // u1
wire [0:0] din0_s; // u1
wire [1:0] din1_s; // u2
reg [2:0] dout_s; // u1 | u2
reg [1:0] dout_s_data; // u2
assign dout_s[1:0] = dout_s_data;
reg [0:0] dout_s_ctrl; // u1
assign dout_s[2:2] = dout_s_ctrl;
assign ctrl_s = ctrl_data;
assign din0_s = din0_data;
assign din1_s = din1_data;
assign dout_data = dout_s;
wire handshake;
reg din_valid_sel;
assign handshake = dout_valid && dout_ready;
always @*
begin
din0_ready = din0_valid ? 0 : dout_ready;
din1_ready = din1_valid ? 0 : dout_ready;
dout_s_data = { 2 {1'bx}};
din_valid_sel = 0;
if (ctrl_valid) begin
case( ctrl_data )
0 : begin
din_valid_sel = din0_valid;
dout_s_data[0:0] = din0_s;
din0_ready = din0_valid ? handshake : dout_ready;
end
1 : begin
din_valid_sel = din1_valid;
dout_s_data[1:0] = din1_s;
din1_ready = din1_valid ? handshake : dout_ready;
end
default: begin
din0_ready = dout_ready;
din1_ready = dout_ready;
din_valid_sel = 1'bx;
end
endcase
end
end
assign ctrl_ready = ctrl_valid ? handshake : dout_ready;
assign dout_s_ctrl = ctrl_s;
assign dout_valid = ctrl_valid && din_valid_sel;
endmodule
\ No newline at end of file
read_verilog ../top.v
read_verilog ../bc.v
read_verilog ../demux.v
read_verilog ../mux.v
prep -flatten
opt_rmdff -sat
synth
tee -o result.log select -assert-count 0 t:$_DFF_P_
module top(
input clk,
input rst,
output wire din_ready,
input wire din_valid,
input wire [2:0] din_data,
input wire dout_ready,
output wire dout_valid,
output wire [2:0] dout_data
);
wire dout1_ready;
wire dout1_valid;
wire [0:0] dout1_data;
wire dout2_ready;
wire dout2_valid;
wire [1:0] dout2_data;
wire [1:0] din_bc_ready;
wire [1:0] din_bc_valid;
wire [5:0] din_bc_data;
bc #(
.SIZE(2'd2),
.WIDTH(2'd3)
)
bc_din (
.clk(clk),
.rst(rst),
.din_valid(din_valid),
.din_ready(din_ready),
.din_data(din_data),
.dout_valid(din_bc_valid),
.dout_ready(din_bc_ready),
.dout_data(din_bc_data)
);
demux demux (
.clk(clk),
.rst(rst),
.din_valid(din_bc_valid[0]),
.din_ready(din_bc_ready[0]),
.din_data(din_bc_data[2:0]),
.dout0_valid(dout1_valid),
.dout0_ready(dout1_ready),
.dout0_data(dout1_data),
.dout1_valid(dout2_valid),
.dout1_ready(dout2_ready),
.dout1_data(dout2_data)
);
mux mux (
.clk(clk),
.rst(rst),
.ctrl_valid(din_bc_valid[1]),
.ctrl_ready(din_bc_ready[1]),
.ctrl_data(din_bc_data[2]),
.din0_valid(dout1_valid),
.din0_ready(dout1_ready),
.din0_data(dout1_data),
.din1_valid(dout2_valid),
.din1_ready(dout2_ready),
.din1_data(dout2_data),
.dout_valid(dout_valid),
.dout_ready(dout_ready),
.dout_data(dout_data)
);
endmodule
tee -o result.log plugin
read_verilog ../top.v
tee -o result.log plugin -i /usr/local/share/yosys/plugins/vhdl.so -a alias
read_verilog ../top.v
tee -o result.log plugin -l
plugin -i uu -a alias
tee -o result.log plugin -l
read_verilog ../top.v
tee -o result.log plugin -i /usr/local/share/yosys/plugins/vhdl.so
read_verilog ../top.v
tee -o result.log plugin -l
plugin -i /usr/local/share/yosys/plugins/vhdl.so -a alias
tee -o result.log plugin -l
module top
( input d, clk, output reg q );
always @( posedge clk )
q <= d;
endmodule
read_verilog ../top.v
proc
select -assert-count 0 t:$shiftx
pmux2shiftx
select -assert-count 1 t:$shiftx
read_verilog ../top_2.v
proc
select -assert-count 0 t:$shiftx
pmux2shiftx
select -assert-count 1 t:$shiftx
read_verilog ../top_fsm.v
proc
select -assert-count 0 t:$shiftx
pmux2shiftx
select -assert-count 2 t:$shiftx
read_verilog ../top_fsm.v
proc
pmux2shiftx -min_choices 0
onehot
read_verilog ../top_fsm.v
proc
pmux2shiftx -min_choices 3000
read_verilog ../top_fsm.v
proc
pmux2shiftx -min_density 0
onehot
read_verilog ../top_fsm.v
proc
pmux2shiftx -min_density 3000
read_verilog ../top_fsm.v
proc
pmux2shiftx -norange
onehot
read_verilog ../top_fsm.v
proc
pmux2shiftx -onehot ignore
onehot
read_verilog ../top_fsm.v
proc
pmux2shiftx -onehot pmux
read_verilog ../top_fsm.v
proc
pmux2shiftx -onehot shiftx
onehot
read_verilog ../top.v
proc
select -assert-count 0 t:$shiftx
pmux2shiftx top
select -assert-count 1 t:$shiftx
read_verilog ../top_fsm.v
proc
select -assert-count 0 t:$shiftx
pmux2shiftx -v
select -assert-count 2 t:$shiftx
read_verilog ../top_fsm.v
proc
pmux2shiftx -vv
module top(C, S, Y);
input C;
input [1:0] S;
output reg [3:0] Y;
initial Y = 0;
always @(posedge C) begin
case (S)
2'b00: Y <= 4'b0001;
2'b01: Y <= 4'b0010;
2'b10: Y <= 4'b0100;
2'b11: Y <= 4'b1000;
endcase
end
endmodule
module top(input [7:0] i, output o);
always @*
case (i[6:3])
4: o <= i[0];
3: o <= i[2];
7: o <= i[3];
default: o <= 1'b0;
endcase
endmodule
module fsm (
clock,
reset,
req_0,
req_1,
gnt_0,
gnt_1
);
input clock,reset,req_0,req_1;
output gnt_0,gnt_1;
wire clock,reset,req_0,req_1;
reg gnt_0,gnt_1;
parameter SIZE = 3 ;
parameter IDLE = 3'b001,GNT0 = 3'b010,GNT1 = 3'b100,GNT2 = 3'b101 ;
reg [SIZE-1:0] state;
reg [SIZE-1:0] next_state;
always @ (posedge clock)
begin : FSM
if (reset == 1'b1) begin
state <= #1 IDLE;
gnt_0 <= 0;
gnt_1 <= 0;
end else
case(state)
IDLE : if (req_0 == 1'b1) begin
state <= #1 GNT0;
gnt_0 <= 1;
end else if (req_1 == 1'b1) begin
gnt_1 <= 1;
state <= #1 GNT0;
end else begin
state <= #1 IDLE;
end
GNT0 : if (req_0 == 1'b1) begin
state <= #1 GNT0;
end else begin
gnt_0 <= 0;
state <= #1 IDLE;
end
GNT1 : if (req_1 == 1'b1) begin
state <= #1 GNT2;
gnt_1 <= req_0;
end
GNT2 : if (req_0 == 1'b1) begin
state <= #1 GNT1;
gnt_1 <= req_1;
end
default : state <= #1 IDLE;
endcase
end
endmodule
module top (
input clk,
input rst,
input a,
input b,
output g0,
output g1
);
fsm u_fsm ( .clock(clk),
.reset(rst),
.req_0(a),
.req_1(b),
.gnt_0(g0),
.gnt_1(g1));
endmodule
read_verilog ../top.v
proc
pmuxtree
select -assert-none t:$pmuxtree
select -assert-count 3 t:$mux
read_verilog ../top_1.v
proc
pmuxtree
select -assert-none t:$pmuxtree
select -assert-count 7 t:$mux
module top(C, S, Y);
input C;
input [1:0] S;
output reg [3:0] Y;
initial Y = 0;
always @(posedge C) begin
case (S)
2'b00: Y <= 4'b0001;
2'b01: Y <= 4'b0010;
2'b10: Y <= 4'b0100;
2'b11: Y <= 4'b1000;
endcase
end
endmodule
module mux (sel, res);
input [2:0] sel;
output [7:0] res;
reg [7:0] res;
always @(sel or res)
begin
case (sel)
3'b000 : res = 8'b00000001;
3'b001 : res = 8'b00000010;
3'b010 : res = 8'b00000100;
3'b011 : res = 8'b00001000;
3'b100 : res = 8'b00010000;
3'b101 : res = 8'b00100000;
3'b110 : res = 8'b01000000;
default : res = 8'b10000000;
endcase
end
endmodule
attribute \\qwp_position
read_verilog ../top.v
proc
qwp
tee -o result.out dump
attribute \\qwp_position
read_verilog ../top.v
proc
qwp -alpha
tee -o result.out dump
attribute \\qwp_position
read_verilog ../top.v
proc
qwp -dump out.html
tee -o result.out dump
attribute \\qwp_position
read_verilog ../top.v
proc
qwp -grid 4
tee -o result.out dump
attribute \\qwp_position
read_verilog ../top.v
proc
qwp -ltr
tee -o result.out dump
> System size: 3^2
> Edge constraints: 2
> Node constraints: 3
> Solving
> Solved
> Update nodes
> System size: 3^2
> Edge constraints: 2
> Node constraints: 3
> Solving
> Solved
> Update nodes
read_verilog ../top.v
proc
tee -o result.out qwp -v
module top
(
input x,
input y,
input cin,
output reg A,
output cout
);
wire o;
always @(posedge cin)
A <= o;
assign cout = cin? y : x;
middle u_mid (x,y,o);
endmodule
module middle
(
input x,
input y,
output o
);
assign o = x + y;
endmodule
read_verilog ../top.v
proc
rename middle mid_module
tee -o result.out dump
read_verilog ../top.v
proc
rename -enumerate middle mid_module
tee -o result.out dump
read_verilog ../top.v
proc
rename -enumerate -pattern '_%_top' top
tee -o result.out dump
read_verilog ../top.v
proc
rename -hide middle mid
read_verilog ../top.v
proc
tee -o result.log rename
read_verilog ../top.v
proc
tee -o result.log rename -top
read_verilog ../top.v
synth
rename low newlow
tee -o result.out dump
ERROR: Mode -output requires that there is an active module selected.
read_verilog ../top.v
proc
tee -o result.log rename -output u uu
read_verilog ../top.v
proc
tee -o result.log rename -top top
read_verilog ../top.v
proc
tee -o result.log rename u uu
read_verilog ../top.v
proc
rename -src middle mid_module
tee -o result.out dump
read_verilog ../top.v
synth -top top
rename -top new_top
tee -o result.out dump
read_verilog ../top.v
synth -top top
rename top new_top
tee -o result.out dump
read_verilog ../top.v
proc
tee -o resulta.out dump
rename -wire top/o top/t_o
tee -o result.out dump
module top
(
input x,
input y,
input cin,
output reg A,
output cout
);
wire o;
always @(posedge cin)
A <= o;
assign cout = cin? y : x;
middle u_mid (x,y,o);
endmodule
module middle
(
input x,
input y,
output o
);
wire dd;
assign o = x + y;
endmodule
module low ();
endmodule
read_verilog ../top.v
proc
rmports top middle
tee -o result.out dump
module top
(
input x,
input x,
input z,
input cin,
output reg A,
output cout
);
parameter X = 1;
wire o;
always @(posedge cin)
A <= o;
middle u_mid (.z(z),.x(x),.o(o));
endmodule
module middle
(
input x,
input y,
input z,
output o
);
assign o = x + y;
endmodule
read_verilog ../top.v
proc
sat middle
read_verilog ../top.v
proc
sat -ignore_unknown_cells -all top
read_verilog -sv ../top_ff.v
synth
sat -ignore_unknown_cells -all -show q adff
read_verilog ../top.v
#proc
sat -all -prove x 1 -tempinduct middle
read_verilog ../top_ff.v
synth
sat -ignore_unknown_cells -all -prove clr 1 -tempinduct adff
read_verilog -sv ../top_ff.v
#proc
sat -ignore_unknown_cells -all -prove clr 1 -set-init s 1'b1 -tempinduct adff
read_verilog -sv ../top_ff.v
synth
# sat -ignore_unknown_cells -all -prove clr 1 -set-init q 1 -tempinduct adff
tee -o result.out sat -ignore_unknown_cells -prove clr 1 -set-init q 1 -tempinduct adff
ERROR: Found -set-init bits that are not part of the initial_state: \\o
read_verilog ../top.v
#proc
sat -all -prove x 1 -set-init o 0 -tempinduct middle
read_verilog -sv ../top_initstate.v
#proc
sat -ignore_unknown_cells -all -prove x 1 -set-init-def -tempinduct-def middle
read_verilog -sv ../top_initstate.v
#proc
sat -ignore_unknown_cells -all -prove x 1 -set-init-undef -tempinduct-def middle
read_verilog -sv ../top_initstate.v
#proc
sat -ignore_unknown_cells -all -prove x 1 -set-init-zero -tempinduct-def middle
ERROR: Can't open output file `dir/out.json' for writing: No such file or directory
read_verilog ../top.v
proc
sat -dump_json dir/out.json middle
ERROR: Can't open output file `dir/out.vcd' for writing: No such file or directory
read_verilog ../top.v
proc
sat -dump_vcd dir/out.vcd middle
ERROR: Can't perform SAT on an empty selection!
ERROR: Can't open output file `dir/out.cnf' for writing: No such file or directory
read_verilog ../top.v
proc
sat -dump_cnf dir/out.cnf middle
read_verilog ../top.v
proc
sat -dump_cnf cnf.cnf middle
read_verilog ../top.v
proc
sat -dump_json json.json middle
read_verilog ../top.v
proc
sat -dump_vcd vcd.vcd middle
read_verilog ../top.v
proc
sat -enable_undef middle
ERROR: Failed to import cell inst_u_rtl (type u_rtl) to SAT database.
read_verilog ../top.v
proc
sat -prove-skip 1 -prove x 1 -seq 2 top
read_verilog ../top.v
proc
sat -prove x 1 -falsify middle
ERROR: Called with -falsify and found a model!
read_verilog ../top.v
proc
sat -falsify middle
read_verilog ../top.v
proc
sat -prove x 1 -falsify-no-timeout middle
read_verilog ../top_fsm.v
proc
sat -dump_cnf cnf.cnf -ignore_unknown_cells fsm
read_verilog ../top_fsm.v
proc
sat -dump_json json.json -ignore_unknown_cells fsm
read_verilog ../top_fsm.v
proc
sat -dump_vcd vcd.vcd -ignore_unknown_cells fsm
read_verilog ../top_div_by_zery.v
proc
sat -ignore_div_by_zero middle
read_verilog ../top_fsm.v
proc
tee -o result.out sat -ignore_unknown_cells fsm
Skipping prove for this step (-initsteps 1).
read_verilog ../top.v
proc
tee -o result.out sat -initsteps 3 -tempinduct-skip 1 -prove x 0 -set-def-at 3 x -tempinduct middle
read_verilog ../top.v
proc
sat -max 3 middle
read_verilog ../top.v
proc
sat -max 5 -all -prove x 1 -tempinduct middle
ERROR: The options -max, -all, and -max_undef are not supported for temporal induction proofs!
read_verilog ../top.v
proc
sat -max_undef -all -prove x 1 -tempinduct top
ERROR: The options -max, -all, and -max_undef are not supported for temporal induction proofs!
read_verilog ../top.v
proc
sat -max 1 -max_undef -all -prove x 1 -tempinduct top
ERROR: The options -max, -all, and -max_undef are not supported for temporal induction proofs!
read_verilog ../top.v
proc
sat -max 1 -max_undef -prove x 1 -tempinduct top
read_verilog ../top.v
proc
sat -max_undef middle
ERROR: The options -max, -all, and -max_undef are not supported for temporal induction proofs!
read_verilog ../top.v
proc
sat -max 1 -prove x 1 -tempinduct top
read_verilog ../top.v
proc
sat -maxsteps 0 middle
ERROR: The options -maxsteps is only supported for temporal induction proofs!
read_verilog ../top.v
proc
sat -maxsteps 3 middle
ERROR: The options -max, -all, and -max_undef are not supported for temporal induction proofs!
read_verilog ../top.v
proc
sat -max_undef -prove x 1 -tempinduct top
read_verilog ../top_mux.v
proc
sat mux16
ERROR: Only one module must be selected for the SAT pass! (selected: u_rtl and middle)
read_verilog ../top.v
proc
sat -ignore_unknown_cells -prove x 1 top
ERROR: Options -prove-skip and -tempinduct don't work with each other. Use -seq instead of -prove-skip.
read_verilog ../top.v
proc
sat -prove-skip 365 -prove x 1 -tempinduct top
read_verilog ../top.v
proc
sat -prove-asserts middle
ERROR: Proof expression with different lhs and rhs sizes: x (\\x, 1 bits) vs. 2'b11 (2'11, 2 bits)
read_verilog ../top.v
proc
sat -prove x 2'b11 middle
ERROR: Failed to parse lhs proof expression `X'.
read_verilog ../top.v
proc
sat -prove X 0 middle
ERROR: Failed to parse rhs proof expression `X'.
read_verilog ../top.v
proc
sat -prove x X middle
read_verilog ../top.v
proc
sat -prove-skip 1 -seq 2 middle
ERROR: The value of -prove-skip must be smaller than the one of -seq.
read_verilog ../top.v
proc
sat -prove-skip 365 -prove x 1 -seq 1 top
read_verilog ../top.v
proc
sat -prove-x x 1 middle
ERROR: Proof-x expression with different lhs and rhs sizes: x (\\x, 1 bits) vs. 2'b11 (2'11, 2 bits)
read_verilog ../top.v
proc
sat -prove-x x 2'b11 middle
ERROR: Failed to parse lhs proof-x expression `X'.
read_verilog ../top.v
proc
sat -prove-x X 0 middle
ERROR: Failed to parse rhs proof-x expression `X'.
read_verilog ../top.v
proc
sat -prove-x x X middle
read_verilog ../top_reg.v
hierarchy -top dut
proc
memory -nomap
equiv_opt -run :prove -map +/ecp5/cells_sim.v synth_ecp5
memory
opt -full
miter -equiv -flatten -make_assert -make_outputs gold gate miter
tee -o result.out sat -verify -prove-asserts -seq 3 -set-init-zero -show-inputs -show-outputs miter
Import set-constraint: \\x = 1'1
read_verilog ../top.v
proc
tee -o result.out sat -set x 3 middle
read_verilog ../top.v
proc
sat -set-all-undef x middle
read_verilog ../top.v
proc
tee -o result.out sat -prove x 0 -set-all-undef-at 1 x -tempinduct middle
ERROR: Failed to parse set-def expression `U'.
read_verilog ../top.v
proc
sat -set-all-undef U middle
read_verilog ../top.v
proc
sat -set-any-undef x middle
read_verilog ../top.v
proc
tee -o result.out sat -prove x 0 -set-any-undef-at 1 x -tempinduct middle
read_verilog ../top.v
proc
sat -set-assumes middle
Import set-constraint for this timestep: \\o = 1'1
read_verilog ../top.v
proc
tee -o result.out sat -prove x 0 -set-at 1 o 3 -tempinduct middle
read_verilog ../top.v
proc
sat -set-def x middle
read_verilog ../top.v
proc
tee -o result.out sat -prove x 0 -set-def-at 3 x -tempinduct middle
ERROR: Failed to parse set-def expression `U'.
read_verilog ../top.v
proc
sat -set-def U middle
read_verilog ../top.v
proc
sat -set-def-inputs middle
ERROR: Set expression with different lhs and rhs sizes: x (\\x, 1 bits) vs. 2'b11 (2'11, 2 bits)
read_verilog ../top.v
proc
sat -set x 2'b11 middle
read_verilog ../top.v
proc
sat -set-init x 0 middle
read_verilog ../top.v
proc
sat -set-init-def middle
read_verilog ../top.v
proc
sat -set-init-undef middle
read_verilog ../top.v
proc
sat -set-init-zero middle
ERROR: Failed to parse lhs set expression
read_verilog ../top.v
proc
sat -set X 0 middle
ERROR: Failed to parse rhs set expression
read_verilog ../top.v
proc
sat -set x X middle
read_verilog ../top.v
proc
sat -show x middle
read_verilog ../top.v
proc
sat -show-all middle
ERROR: Failed to parse show expression `X'.
read_verilog ../top.v
proc
sat -show X middle
read_verilog ../top.v
proc
sat -show-inputs middle
read_verilog ../top.v
proc
sat -show-outputs middle
read_verilog ../top.v
proc
sat -show-ports middle
read_verilog ../top.v
proc
sat -show-public middle
read_verilog ../top.v
proc
sat -ignore_unknown_cells -show-regs top
ERROR: The options -set-init-undef, -set-init-def, and -set-init-zero are exclusive!
read_verilog ../top.v
proc
sat -set-init-undef -set-init-def middle
ERROR: The options -set-init-undef, -set-init-def, and -set-init-zero are exclusive!
read_verilog ../top.v
proc
sat -set-init-undef -set-init-def -set-init-zero middle
ERROR: The options -set-init-undef, -set-init-def, and -set-init-zero are exclusive!
read_verilog ../top.v
proc
sat -set-init-def -set-init-zero middle
ERROR: The options -set-init-undef, -set-init-def, and -set-init-zero are exclusive!
read_verilog ../top.v
proc
sat -set-init-undef -set-init-zero middle
Skipping prove for this step (-stepsize 2)
read_verilog ../top.v
proc
tee -o result.out sat -tempinduct-skip 1 -stepsize 2 -prove x 0 -set-def-at 3 x -tempinduct middle
read_verilog ../top.v
proc
sat -prove x 1 -tempinduct middle
read_verilog ../top.v
proc
sat -prove x 1 -tempinduct-baseonly middle
read_verilog ../top.v
proc
# sat -prove x 1 -tempinduct-baseonly -maxsteps 6 -dump_cnf cnf.cnf middle
tee -o result.out sat -prove x 0 -set-def-at 3 x -dump_cnf cnf.cnf -tempinduct-baseonly middle
read_verilog ../top.v
proc
sat -prove x 1 -tempinduct-baseonly -maxsteps 6 -dump_vcd vcd.vcd middle
read_verilog ../top.v
proc
sat -prove x 1 -tempinduct-baseonly -maxsteps 1 middle
read_verilog ../top.v
proc
sat -prove x 1 -tempinduct-baseonly -maxsteps 6 middle
read_verilog ../top.v
proc
sat -prove x 1 -tempinduct-def middle
read_verilog ../top.v
proc
tee -o result.out sat -tempinduct-skip 1 -prove x 0 -set-def-at 3 x -dump_cnf cnf.cnf -tempinduct middle
read_verilog ../top.v
proc
sat -prove x 1 -tempinduct-inductonly middle
Skipping prove for this step (-tempinduct-skip 1)
read_verilog ../top.v
proc
tee -o result.out sat -tempinduct-skip 1 -prove x 0 -set-def-at 3 x -tempinduct middle
read_verilog ../top.v
proc
sat -prove x 1 -tempinduct -tempinduct-baseonly middle
read_verilog ../top.v
proc
sat -prove x 1 -tempinduct -tempinduct-def middle
read_verilog ../top.v
proc
sat -timeout 0 -ignore_unknown_cells top
read_verilog ../top.v
proc
sat -timeout 1 -verify -ignore_unknown_cells top
Import unset-constraint for this timestep: \\o
read_verilog ../top.v
proc
tee -o result.out sat -prove x 0 -unset-at 1 o -tempinduct middle
read_verilog ../top.v
proc
sat -verify -ignore_unknown_cells -show x,y -set x y -set x 1 top
ERROR: Called with -verify and proof did fail!
read_verilog ../top.v
proc
sat -verify -prove x 1 -tempinduct middle
read_verilog ../top.v
proc
sat -verify-no-timeout -ignore_unknown_cells -show x,y -set x y -set x 1 top
module top
(
input x,
input y,
input cin,
(* init = 1'h0 *)
output reg A,
output cout
);
parameter X = 1;
wire o;
initial A = 0;
initial cout = 0;
always @(posedge cin)
A <= o;
assign cout = cin? y : x;
middle u_mid (.x(x),.o(o));
u_rtl inst_u_rtl (.x(x),.o(o));
endmodule
module middle
(
input x,
input y,
output o
);
assign o = x + y;
endmodule
module u_rtl
(
input x,
input y,
output o
);
initial o = 0;
assign o = x + y;
endmodule
module top
(
input x,
input y,
input cin,
(* init = 1'h0 *)
output reg A,
output cout
);
parameter X = 1;
wire o;
initial A = 0;
initial cout = 0;
always @(posedge cin)
A <= o;
assign cout = cin? y : x;
middle u_mid (.x(x),.o(o));
u_rtl inst_u_rtl (.x(x),.o(o));
endmodule
module middle
(
input x,
input y,
output o
);
assign o = x + y;
endmodule
module u_rtl
(
input x,
input y,
output o
);
initial o = 0;
assign o = x / 0;
endmodule
module adff
(d, clk, clr, q);
input d, clk, clr;
(* init = 1'h0 *)
output reg q;
initial begin
q = 0;
end
always @( posedge clk, posedge clr )
if ( clr )
q <= 1'b0;
else
q <= d;
endmodule
module fsm (
clock,
reset,
req_0,
req_1,
gnt_0,
gnt_1
);
input clock,reset,req_0,req_1;
output gnt_0,gnt_1;
wire clock,reset,req_0,req_1;
reg gnt_0,gnt_1;
parameter SIZE = 3 ;
parameter IDLE = 3'b001,GNT0 = 3'b010,GNT1 = 3'b100,GNT2 = 3'b101 ;
reg [SIZE-1:0] state;
reg [SIZE-1:0] next_state;
always @ (posedge clock)
begin : FSM
if (reset == 1'b1) begin
state <= #1 IDLE;
gnt_0 <= 0;
gnt_1 <= 0;
end else
case(state)
IDLE : if (req_0 == 1'b1) begin
state <= #1 GNT0;
gnt_0 <= 1;
end else if (req_1 == 1'b1) begin
gnt_1 <= 1;
state <= #1 GNT0;
end else begin
state <= #1 IDLE;
end
GNT0 : if (req_0 == 1'b1) begin
state <= #1 GNT0;
end else begin
gnt_0 <= 0;
state <= #1 IDLE;
end
GNT1 : if (req_1 == 1'b1) begin
state <= #1 GNT2;
gnt_1 <= req_0;
end
GNT2 : if (req_0 == 1'b1) begin
state <= #1 GNT1;
gnt_1 <= req_1;
end
default : state <= #1 IDLE;
endcase
end
endmodule
module top (
input clk,
input rst,
input a,
input b,
output g0,
output g1
);
fsm u_fsm ( .clock(clk),
.reset(rst),
.req_0(a),
.req_1(b),
.gnt_0(g0),
.gnt_1(g1));
endmodule
module middle
(
input x,
input y,
input cin,
output reg A,
output reg cout
);
reg ASSERT = 1;
(* anyconst *) reg foo;
(* anyseq *) reg too;
initial begin
begin
A = 0;
cout = 0;
end
end
always @(posedge x) begin
if ($initstate)
A <= 0;
A <= y + cin + too;
assume(too);
assume(s_eventually too);
end
always @(negedge x) begin
if ($initstate)
cout <= 0;
cout <= y + A + foo;
assert(ASSERT);
assert(s_eventually ASSERT);
end
endmodule
module mux2 (S,A,B,Y);
input S;
input A,B;
output reg Y;
always @(*)
Y = (S)? B : A;
endmodule
module mux4 ( S, D, Y );
input[1:0] S;
input[3:0] D;
output Y;
reg Y;
wire[1:0] S;
wire[3:0] D;
always @*
begin
case( S )
0 : Y = D[0];
1 : Y = D[1];
2 : Y = D[2];
3 : Y = D[3];
default: Y = 1'bx;
endcase
end
endmodule
module mux8 ( S, D, Y );
input[2:0] S;
input[7:0] D;
output Y;
reg Y;
wire[2:0] S;
wire[7:0] D;
always @*
begin
case( S )
0 : Y = D[0];
1 : Y = D[1];
2 : Y = D[2];
3 : Y = D[3];
4 : Y = D[4];
5 : Y = D[5];
6 : Y = D[6];
7 : Y = D[7];
default: Y = 1'bx;
endcase
end
endmodule
module mux16 (D, S, Y);
input [15:0] D;
input [3:0] S;
output Y;
reg Y;
wire[3:0] S;
wire[15:0] D;
always @*
begin
case( S )
0 : Y = D[0];
1 : Y = D[1];
2 : Y = D[2];
3 : Y = D[3];
4 : Y = D[4];
5 : Y = D[5];
6 : Y = D[6];
7 : Y = D[7];
8 : Y = D[8];
9 : Y = D[9];
10 : Y = D[10];
11 : Y = D[11];
12 : Y = D[12];
13 : Y = D[13];
14 : Y = D[14];
15 : Y = D[15];
default: Y = 1'bx;
endcase
end
endmodule
module top (
input [3:0] S,
input [15:0] D,
output M2,M4,M8,M16
);
mux2 u_mux2 (
.S (S[0]),
.A (D[0]),
.B (D[1]),
.Y (M2)
);
mux4 u_mux4 (
.S (S[1:0]),
.D (D[3:0]),
.Y (M4)
);
mux8 u_mux8 (
.S (S[2:0]),
.D (D[7:0]),
.Y (M8)
);
mux16 u_mux16 (
.S (S[3:0]),
.D (D[15:0]),
.Y (M16)
);
endmodule
module dut(
input fast_clk, slow_clk,
input [3:0] waddr, raddr,
input [3:0] wdata,
input wen,
output [3:0] rdata
);
reg [3:0] mem[0:15];
reg [3:0] raddr_reg;
always @(posedge fast_clk) begin
if (wen)
mem[waddr] <= wdata;
end
always @(posedge slow_clk)
raddr_reg <= raddr;
assign rdata = mem[raddr_reg];
endmodule
read_verilog ../top.v
proc
scatter
tee -o result.out dump
module top
(
input x,
input y,
input cin,
output reg A,
output cout
);
wire o;
always @(posedge cin)
A <= o;
assign cout = cin? y : x;
middle u_mid (x,y,o);
endmodule
module middle
(
input x,
input y,
output o
);
assign o = x + y;
endmodule
Found 1 SCCs in module top.
read_verilog ../top.v
scc top
proc
scc top
synth
tee -o result.out scc top
read_verilog ../top.v
proc
scc -all_cell_types top
Found and expected 0 SCCs.
read_verilog ../top_no_feedback.v
proc
tee -o result.out scc -expect 0 top
ERROR: Found 1 SCCs but expected 0.
read_verilog ../top.v
proc
scc -expect 0 top
read_verilog ../top_hier_feedback.v
scc top
proc
scc top
synth
scc top
read_verilog ../top.v
proc
scc -max_depth 2 top
read_verilog ../top_no_feedback.v
scc top
proc
scc top
synth
scc top
read_verilog ../top.v
proc
scc -nofeedback top
read_verilog ../top.v
synth -top top
scc -select top
read_verilog ../top.v
proc
scc -set_attr attr true top
module top
(
input x,
input y,
input cin,
output reg A,
output cout
);
parameter X = 1;
wire o_mid,o_rtl;
always @(posedge cin)
A <= o_mid;
assign o_mid = x & o_rtl;
assign o_rtl = y & o_mid;
endmodule
module top
(
input x,
input y,
input cin,
output reg A,
output cout
);
parameter X = 1;
wire o_mid,o_rtl;
always @(posedge cin)
A <= o_mid;
middle u_mid (.x(x),.y(o_rtl),.o(o_mid));
u_rtl inst_u_rtl (.x(o_mid),.y(y),.o(o_rtl));
endmodule
module middle
(
input x,
input y,
output o
);
wire o1,o2;
assign o1 = x & o2;
assign o2 = y & o1;
assign o = o1;
endmodule
module u_rtl
(
input x,
input y,
output o
);
wire o1,o2;
assign o1 = x & o2;
assign o2 = y & o1;
assign o = o1;
endmodule
module top
(
input x,
input y,
input cin,
output reg A,
output cout
);
wire o;
always @(posedge cin)
A <= o;
assign cout = cin? y : x;
middle u_mid (x,y,o);
endmodule
module middle
(
input x,
input y,
output o
);
assign o = x + y;
endmodule
read_verilog ../top.v
tee -o result.log dump
tee -o result.log script ../script.ys 1:3
tee -o result.log script ../script.ys
tee -o result.log script -scriptwire ../script.ys
(* black_box *) module top
(
input x,
input y,
input cin,
output A,
output cout
);
assign {cout,A} = cin + y + x;
endmodule
read_verilog ../top.v
proc
select
select -list
top/$ternary
top/$ternary
read_verilog ../top.v
proc
select */t:$mux %coe:+[Y] */t:$mux %
select */t:$mux %coe:+[Y] */t:$mux %%
tee -o result.out select -list
read_verilog ../top.v
proc
select */t:$mux %coe:+[Y] */t:$mux %C
read_verilog ../top.v
proc
select */t:$mux %x:+[A] */t:$mux %D
select -list
read_verilog ../top.v
proc
select */t:$mux %coe:+[Y] */t:$mux %M
select -list
read_verilog ../top.v
proc
select */t:$mux %coe:+[Y] */t:$mux %R
select */w:o %R
select -list
read_verilog ../top.v
proc
select */t:$mux %coe:+[Y] */t:$mux %R 4
select -list
read_verilog ../top.v
proc
select */t:$mux %coe:+[Y] */t:$mux %a
select -list
read_verilog ../top.v
proc
select */t:$mux %coe:+[Y] */t:$mux %c
read_verilog ../top.v
proc
select */t:$mux %ci:+[A] */t:$mux
read_verilog ../top.v
proc
select */t:$mux %cie:+[A] */t:$mux
read_verilog ../top.v
proc
select */t:$mux %co:+[Y] */t:$mux
select -list
read_verilog ../top.v
proc
select */t:$mux %coe:+[Y] */t:$mux
select -list
read_verilog ../top.v
proc
select */t:$mux %x:+[A] */t:$mux %d
select -list
read_verilog ../top.v
proc
select */t:$mux %coe:+[Y] */t:$mux %i
select -list
read_verilog ../top_mem.v
proc
select * * * %i
select -list
read_verilog ../top.v
proc
select */t:$mux %coe:+[Y] */t:$mux %m
select -list
read_verilog ../top.v
proc
select */t:$mux %coe:+[Y] */t:$mux %n
select -list
read_verilog ../top_mem.v
select * %n
proc
select * %n
select -list
read_verilog ../top_mem.v
select */p:$proc %coe:+[Y] */p:$proc %n
select */t:$memrd %coe:+[Y] */t:$memwr %n
proc
select */t:$memrd %coe:+[Y] */t:$memwr %n
select -list
read_verilog ../top.v
proc
select */t:$mux %coe:+[Y] */t:$mux %s
select -list
read_verilog ../top.v
proc
select * %s
select -list
read_verilog ../top.v
proc
select */t:$mux %coe:+[Y] */t:$mux %u
select -list
read_verilog ../top.v
proc
select */t:$mux %x:+[A] */t:$mux %D
select -list
read_verilog ../top.v
proc
select */t:$mux %x:+[A] */t:$mux %d
select -list
read_verilog ../top.v
proc
select */t:$mux %xe:+[A] */t:$mux
select -list
read_verilog ../top.v
proc
select -add top
select -list
middle
middle/$add$../top.v:32$3_Y
middle/o
middle/y
middle/x
middle/$add$../top.v:32$3
top
top/$ternary$../top.v:16$2_Y
top/$0\A[0:0]
top/o
top/cout
top/A
top/cin
top/y
top/x
top/$procdff$4
top/u_mid
top/$ternary$../top.v:16$2
read_verilog ../top.v
proc
select -del *
select -add A:\cells_not_processed
tee -o result.out select -list
middle
middle/$add$../top.v:32$3_Y
middle/o
middle/y
middle/x
middle/$add$../top.v:32$3
top
top/$ternary$../top.v:16$2_Y
top/$0\A[0:0]
top/o
top/cout
top/A
top/cin
top/y
top/x
top/$procdff$4
top/u_mid
top/$ternary$../top.v:16$2
read_verilog ../top.v
proc
select -del *
select -add A:\cells_not_processed=1
tee -o result.out select -list
middle
middle/$add$../top.v:32$3_Y
middle/o
middle/y
middle/x
middle/$add$../top.v:32$3
top
top/$ternary$../top.v:16$2_Y
top/$0\A[0:0]
top/o
top/cout
top/A
top/cin
top/y
top/x
top/$procdff$4
top/u_mid
top/$ternary$../top.v:16$2
read_verilog ../top.v
proc
select -del *
select -add A:\cells_not_processed<2
tee -o result.out select -list
middle
middle/$add$../top.v:32$3_Y
middle/o
middle/y
middle/x
middle/$add$../top.v:32$3
top
top/$ternary$../top.v:16$2_Y
top/$0\A[0:0]
top/o
top/cout
top/A
top/cin
top/y
top/x
top/$procdff$4
top/u_mid
top/$ternary$../top.v:16$2
read_verilog ../top.v
proc
select -del *
select -add A:\cells_not_processed<=1
tee -o result.out select -list
middle
middle/$add$../top.v:32$3_Y
middle/o
middle/y
middle/x
middle/$add$../top.v:32$3
top
top/$ternary$../top.v:16$2_Y
top/$0\A[0:0]
top/o
top/cout
top/A
top/cin
top/y
top/x
top/$procdff$4
top/u_mid
top/$ternary$../top.v:16$2
read_verilog ../top.v
proc
select -del *
select -add A:\cells_not_processed>0
tee -o result.out select -list
middle
middle/$add$../top.v:32$3_Y
middle/o
middle/y
middle/x
middle/$add$../top.v:32$3
top
top/$ternary$../top.v:16$2_Y
top/$0\A[0:0]
top/o
top/cout
top/A
top/cin
top/y
top/x
top/$procdff$4
top/u_mid
top/$ternary$../top.v:16$2
read_verilog ../top.v
proc
select -del *
select -add A:\cells_not_processed>=1
tee -o result.out select -list
middle
middle/$add$../top.v:32$3_Y
middle/o
middle/y
middle/x
middle/$add$../top.v:32$3
top
top/$ternary$../top.v:16$2_Y
top/$0\A[0:0]
top/o
top/cout
top/A
top/cin
top/y
top/x
top/$procdff$4
top/u_mid
top/$ternary$../top.v:16$2
read_verilog ../top.v
proc
select -del *
select -add A:\cells_not_processed!=0
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add a:\module_not_derived
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add a:\module_not_derived=1
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add a:\module_not_derived<2
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add a:\module_not_derived<=2
tee -o result.out select -list
read_verilog ../top_mem.v
proc
select -add a:*
read_verilog ../top.v
proc
select -del *
select -add a:\module_not_derived>0
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add a:\module_not_derived>=1
tee -o result.out select -list
middle
middle/$add
middle/o
middle/y
middle/x
middle/$add
top
top/$ternary
top/$0\\A\[0:0\]
top/o
top/cout
top/A
top/cin
top/y
top/x
top/u_mid
top/$ternary
top/$proc
read_verilog ../top.v
select -del *
select -add a:\src
tee -o result.out select -list
read_verilog ../top.v
proc
select -add *
select -list
read_verilog ../top.v
proc
select -del *
select -add c:$procdff$*
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add i:x
tee -o result.out select -list
read_verilog ../top.v
proc
select -add m:*
select -list
read_verilog ../top_mem.v
proc
select -del *
select -add m:\ram
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add c:\u_mid
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add n:\u_mid
tee -o result.out select -list
read_verilog ../top_mem.v
select -add n:*
proc
select -add n:*
select -list
read_verilog ../top.v
proc
select -del *
select -add o:A
tee -o result.out select -list
read_verilog ../top.v
proc
select -add top/o
select -list
read_verilog ../top.v
select -del *
select -add p:$proc*
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add r:\WIDTH
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add r:\WIDTH=1
tee -o result.out select -list
read_verilog ../top_mem.v
proc
select -del *
select -add r:\MEMID="\\ram"
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add r:\WIDTH<2
tee -o result.out select -list
read_verilog ../top_mem.v
proc
select -del *
select -add r:\MEMID<"\\ram"
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add r:\WIDTH<=1
tee -o result.out select -list
read_verilog ../top_mem.v
proc
select -del *
select -add r:\MEMID<="\\ram"
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add r:\WIDTH>0
tee -o result.out select -list
read_verilog ../top_mem.v
proc
select -del *
select -add r:\MEMID>"\\ram"
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add r:\WIDTH>=1
tee -o result.out select -list
read_verilog ../top_mem.v
proc
select -del *
select -add r:\MEMID>="\\ram"
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add r:\WIDTH!0
tee -o result.out select -list
read_verilog ../top_mem.v
proc
select -del *
select -add r:\MEMID!"\\rom"
tee -o result.out select -list
middle/$add
middle/o
middle/y
middle/x
top/$ternary
top/$0\\A\[0:0\]
top/o
top/cout
top/A
top/cin
top/y
top/x
read_verilog ../top.v
proc
select -del *
select -add s:1
tee -o result.out select -list
middle/$add
middle/o
middle/y
middle/x
top/$ternary
top/$0\\A\[0:0\]
top/o
top/cout
top/A
top/cin
top/y
top/x
read_verilog ../top.v
proc
select -del *
select -add s:1:6
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add t:$add
tee -o result.out select -list
read_verilog ../top.v
proc
select -del *
select -add w:o
tee -o result.out select -list
ERROR: Options -add, -del, -assert-none, -assert-any, assert-count, -assert-max or -assert-min can not be combined.
read_verilog ../top.v
proc
select -add -del
select -list
read_verilog ../top.v
proc
select -del *
select -add x:o
tee -o result.out select -list
top
top/$ternary
top/cout
top/cin
top/y
top/x
top/$ternary
read_verilog ../top_mux.v
proc
select -del *
select *
tee -o result.out select -list
read_verilog ../top.v
select -assert-any top
proc
select -assert-any top
ERROR: Assertion failed: selection is empty: uuu
read_verilog ../top.v
proc
select -assert-any uuu
select -list
ERROR: Options -add, -del, -assert-none, -assert-any, assert-count, -assert-max or -assert-min can not be combined.
read_verilog ../top.v
proc
select -assert-any -assert-count 3 top
select -list
read_verilog ../top.v
select -assert-count 11 top
proc
select -assert-count 11 top
ERROR: Assertion failed: selection contains 11 elements instead of the asserted 30: top
Selection contains:
read_verilog ../top.v
proc
select -assert-count 30 top
select -list
read_verilog ../top_mem.v
select -assert-count 32 top
proc
select -assert-count 62 top
ERROR: Options -list, -write and -count can not be combined with -add, -del, -assert-none, -assert-any, assert-count, -assert-max, or -assert-min.
read_verilog ../top.v
proc
select -list -assert-max 3 top
select -list
ERROR: Options -list, -write and -count can not be combined with -add, -del, -assert-none, -assert-any, assert-count, -assert-max, or -assert-min.
read_verilog ../top.v
proc
select -list -del
select -list
read_verilog ../top.v
select -assert-max 15 top
proc
select -assert-max 15 top
ERROR: Assertion failed: selection contains 11 elements, more than the maximum number 1: top
read_verilog ../top.v
proc
select -assert-max 1 top
select -list
read_verilog ../top_mem.v
select -assert-max 32 top
proc
select -assert-max 62 top
ERROR: Options -add, -del, -assert-none, -assert-any, assert-count, -assert-max or -assert-min can not be combined.
read_verilog ../top.v
proc
select -del -assert-max 3 top
select -list
read_verilog ../top.v
select -assert-min 2 top
proc
select -assert-min 2 top
ERROR: Assertion failed: selection contains 11 elements, less than the minimum number 30: top
read_verilog ../top.v
proc
select -assert-min 30 top
select -list
read_verilog ../top.v
select -none
select -assert-none x
proc
select -none
select -assert-none x
ERROR: Assertion failed: selection is not empty: top
read_verilog ../top.v
proc
select *
select -assert-none top
select -list
ERROR: Options -add, -del, -assert-none, -assert-any, assert-count, -assert-max or -assert-min can not be combined.
read_verilog ../top.v
proc
select -assert-none -assert-min 3 top
select -list
ERROR: Can't open 'txt.txt' for reading: No such file or directory
read_verilog ../top.v
proc
select -read txt.txt
select -list
ERROR: Can't open './tt/ot.txt' for writing: No such file or directory
read_verilog ../top.v
proc
select -write ./tt/ot.txt
select -list
read_verilog ../top.v
proc
select -add top -add middle
select -clear
select -list
ERROR: Option -clear can not be combined with any other options.
read_verilog ../top.v
proc
select */t:$mux %x:+[A] */t:$mux %D -clear
select -list
read_verilog ../top.v
proc
tee -o result.out select -count
ERROR: Options -list, -write and -count can not be combined with -add, -del, -assert-none, -assert-any, assert-count, -assert-max, or -assert-min.
read_verilog ../top.v
proc
select -count 11 -assert-min 33 top
select -list
ERROR: Options -list, -write and -count can not be combined with -add, -del, -assert-none, -assert-any, assert-count, -assert-max, or -assert-min.
read_verilog ../top.v
proc
select -assert-none -count 3 top
select -list
middle
middle/$add
middle/o
middle/y
middle/x
middle/$add
read_verilog ../top.v
proc
select -del top
tee -o result.out select -list
ERROR: Syntax error in expand operator '%x:'.
read_verilog ../top.v
proc
select select */t:$mux %x: */t:$mux %d
select -list
top
top/$ternary
top/cout
top/cin
top/y
top/x
top/$ternary
read_verilog ../top_mux.v
proc
tee -o result.out select -list
middle
middle/$add
middle/o
middle/y
middle/x
middle/$add
read_verilog ../top.v
proc
select -add top -add middle
select -module middle
tee -o result.out select -list
read_verilog ../top_mem.v
proc
select -add top -add top
select -module top
read_verilog ../top_mem.v
proc
select -add top -add top
select -module top
tee -o result.out select -list
read_verilog ../top.v
proc
select -assert-any
select -list
read_verilog ../top.v
proc
select -assert-count 3
select -list
read_verilog ../top.v
proc
select -assert-max 3
select -list
read_verilog ../top.v
proc
select -assert-min 3
select -list
read_verilog ../top.v
proc
select -assert-none
select -list
read_verilog ../top.v
proc
select -module x
select -list
read_verilog ../top.v
proc
select -add top -add middle
select -none
ERROR: Option -none can not be combined with any other options.
read_verilog ../top.v
proc
select */t:$mux %x:+[A] */t:$mux %D -none
select -list
read_verilog ../top.v
proc
select -add
select -list
ERROR: Nothing to delete from selection.
read_verilog ../top.v
proc
select -del
select -list
ERROR: Must have at least one element on the stack for operator %C.
read_verilog ../top.v
proc
select %C
select -list
Must have at least two elements on the stack for operator %D.
read_verilog ../top.v
proc
select %D
select -list
ERROR: Must have at least one element on the stack for operator %M.
read_verilog ../top.v
proc
select %M
select -list
ERROR: Must have at least one element on the stack for operator %R.
read_verilog ../top.v
proc
select %R
select -list
ERROR: Must have at least one element on the stack for operator %a.
read_verilog ../top.v
proc
select %a
select -list
ERROR: Must have at least one element on the stack for operator %c.
read_verilog ../top.v
proc
select %c
select -list
ERROR: Must have at least one element on the stack for operator %ci.
read_verilog ../top.v
proc
select %ci
select -list
ERROR: Must have at least one element on the stack for operator %cie.
read_verilog ../top.v
proc
select %cie
select -list
ERROR: Must have at least one element on the stack for operator %co.
read_verilog ../top.v
proc
select %co
select -list
ERROR: Must have at least one element on the stack for operator %coe.
read_verilog ../top.v
proc
select %coe
select -list
ERROR: Must have at least two elements on the stack for operator %d.
read_verilog ../top.v
proc
select %d
select -list
ERROR: Must have at least two elements on the stack for operator %i.
read_verilog ../top.v
proc
select %i
select -list
ERROR: Must have at least one element on the stack for operator %m.
read_verilog ../top.v
proc
select %m
select -list
ERROR: Must have at least one element on the stack for operator %n.
read_verilog ../top.v
proc
select %n
select -list
ERROR: Must have at least one element on the stack for operator %s.
read_verilog ../top.v
proc
select %s
select -list
ERROR: Must have at least two elements on the stack for operator %u.
read_verilog ../top.v
proc
select %u
select -list
ERROR: Must have at least one element on the stack for operator %x.
read_verilog ../top.v
proc
select %x */t %d
select -list
ERROR: Must have at least one element on the stack for operator %xe.
read_verilog ../top.v
proc
select %xe
select -list
middle
middle/$add
middle/o
middle/y
middle/x
middle/$add
read_verilog ../top.v
proc
select -del *
select -add middle
select -write select_f
select -read select_f
tee -o result.out select -list
ERROR: Option -read can not be combined with a selection expression.
read_verilog ../top.v
proc
select -read -add x:o
select -list
read_verilog ../top.v
proc
select @
select -list
top
top/$ternary
top/$0\\A\[0:0\]
top/o
top/cout
top/A
top/cin
top/y
top/x
top/$procdff
top/u_mid
top/$ternary
read_verilog ../top.v
proc
select -add top
select -set top top
select @top
tee -o result.out select -list
ERROR: Option -set can not be combined with -list, -write, -count, -add, -del, -assert-none, -assert-any, -assert-count, -assert-max, or -assert-min.
read_verilog ../top.v
proc
select -set aa -assert-any top
select -list
ERROR: Option -set can not be combined with -list, -write, -count, -add, -del, -assert-none, -assert-any, -assert-count, -assert-max, or -assert-min.
read_verilog ../top.v
proc
select -set a -assert-max 2 top
select -list
ERROR: Option -set can not be combined with -list, -write, -count, -add, -del, -assert-none, -assert-any, -assert-count, -assert-max, or -assert-min.
read_verilog ../top.v
proc
select -set a -assert-count 3 top
select -list
ERROR: Option -set can not be combined with -list, -write, -count, -add, -del, -assert-none, -assert-any, -assert-count, -assert-max, or -assert-min.
read_verilog ../top.v
proc
select -set a -del a
select -list
ERROR: Option -set can not be combined with -list, -write, -count, -add, -del, -assert-none, -assert-any, -assert-count, -assert-max, or -assert-min.
read_verilog ../top.v
proc
select -set a -list
select -list
read_verilog ../top.v
proc
select -x
select -list
ERROR: Unknown selection operator '%xmux'.
read_verilog ../top.v
proc
select */t:$mux %xmux */t:$mux %d
select -list
read_verilog ../top.v
proc
select -add top -add middle
select -write select_f
ERROR: Options -list, -write and -count can not be combined with -add, -del, -assert-none, -assert-any, assert-count, -assert-max, or -assert-min.
read_verilog ../top.v
proc
select -write out.txt -assert-count 4 top
select -list
ERROR: Options -list, -write and -count can not be combined with -add, -del, -assert-none, -assert-any, assert-count, -assert-max, or -assert-min.
read_verilog ../top.v
proc
select -write out.txt -del
select -list
module top
(
input x,
input y,
input cin,
output reg A,
output cout
);
wire o;
always @(posedge cin)
A <= o;
assign cout = cin? y : x;
middle u_mid (x,y,o);
endmodule
module middle
(
input x,
input y,
output o
);
assign o = x + y;
endmodule
module top
(
input [7:0] data_a, data_b,
input [5:0] addr_a, addr_b,
input we_a, we_b, clk,
output reg [7:0] q_a, q_b
);
// Declare the RAM variable
reg [7:0] ram[63:0];
// Port A
always @ (posedge clk)
begin
if (we_a)
begin
ram[addr_a] <= data_a;
q_a <= data_a;
end
else
begin
q_a <= ram[addr_a];
end
end
// Port B
always @ (posedge clk)
begin
if (we_b)
begin
ram[addr_b] <= data_b;
q_b <= data_b;
end
else
begin
q_b <= ram[addr_b];
end
end
endmodule
module top
(
input x,
input y,
input cin,
output cout
);
assign cout = cin? y : x;
endmodule
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment