Commit ee7949ea by SergeyDegtyar

Review 'misc' test group. Rename back to "misc".

parent cfa2a1ef

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

*/work_*/
/.stamp
/run-test.mk
......@@ -2,4 +2,9 @@ read_verilog ../top.v
proc
dff2dffe
synth -top top
tee -o result.log abc -g simple
abc
select -assert-count 3 t:$_NAND_
select -assert-count 2 t:$_XOR_
select -assert-none t:$_NAND_ t:$_XOR_ %% t:* %D
......@@ -2,4 +2,4 @@ read_verilog ../top.v
proc
dff2dffe
synth -top top
tee -o result.log abc9 -D 2 -lut 2
tee -o result.out abc -D 2
ERROR: Can't open ABC output file
read_verilog ../top.v
synth -top top
tee -o result.log abc -liberty -constr
tee -o result.out abc -liberty -constr
abc -liberty -constr
ERROR: Clock domain u not found.
read_verilog ../top.v
synth -top top
tee -o result.log abc -dff -clk u
tee -o result.out abc -dff -clk u
abc -dff -clk u
read_verilog ../top.v
synth -top top
tee -o result.log abc -liberty -constr top.lib
tee -o result.out abc -liberty -constr top.lib
ERROR: Got -constr but no -liberty!
read_verilog ../top.v
synth -top top
tee -o result.log abc -constr -liberty
tee -o result.out abc -constr -liberty
abc -constr -liberty
read_verilog ../top_dff.v
synth -top top
dff2dffe
tee -o result.log abc -dff
abc -dff
read_verilog ../top_dff.v
synth -top top
tee -o result.log abc -keepff
abc -dff
read_verilog ../top_div_mul.v
proc
dff2dffe
synth -top top
tee -o result.out abc
read_verilog ../top_dff.v
proc
dff2dffe
synth -top top
tee -o result.out abc
read_verilog ../top_dff.v
proc
dff2dffe
synth -top top
tee -o result.out abc -clk clk
read_verilog ../top_fsm.v
synth -top top
tee -o result.out abc
read_verilog ../top_fsm.v
synth -top top
tee -o result.out abc -g all
read_verilog ../top_fsm.v
synth -top top
tee -o result.out abc -g all
read_verilog ../top_fsm.v
synth -top top
abc -g cmos4
select -assert-count 6 t:$_AOI3_
select -assert-count 1 t:$_AOI4_
select -assert-count 2 t:$_OAI3_
read_verilog ../top_fsm.v
synth -top top
abc -g gates
read_verilog ../top.v
synth -top top
abc -g aig
select -assert-count 2 t:$_AND_
select -assert-count 3 t:$_NAND_
select -assert-count 2 t:$_OR_
read_verilog ../top.v
synth -top top
abc -g cmos
select -assert-count 1 t:$_NAND_
select -assert-count 1 t:$_NOT_
select -assert-count 1 t:$_OAI3_
select -assert-count 2 t:$_XNOR_
read_verilog ../top.v
synth -top top
abc -g cmos2
select -assert-count 4 t:$_NAND_
select -assert-count 5 t:$_NOR_
select -assert-count 3 t:$_NOT_
read_verilog ../top.v
proc
dff2dffe
synth -top top
abc -g simple
select -assert-count 2 t:$_AND_
select -assert-count 1 t:$_OR_
select -assert-count 2 t:$_NOT_
read_verilog ../top.v
synth -top top
tee -o result.log abc -dff
tee -o result.log abc -I 4
abc -dff
ERROR: Invalid -luts syntax.
read_verilog ../top.v
synth -top top
tee -o result.log abc -luts :
tee -o result.out abc -luts :
abc -liberty -luts :
read_verilog ../top_logic.v
proc
synth -top top
tee -o result.out abc
read_verilog ../top_logic_loop.v
proc
synth -top top
tee -o result.out abc
read_verilog ../top.v
synth -top top
tee -o result.log abc -lut 4
abc -lut 3
stat
ERROR: Got -lut and -liberty! This two options are exclusive.
read_verilog ../top.v
synth -top top
tee -o result.log abc -lut 2 -liberty top.lib
tee -o result.out abc -lut 2 -liberty top.lib
abc -lut 2 -liberty top.lib
read_verilog ../top.v
synth -top top
tee -o result.log abc -lut -4
abc -lut -3:1
read_verilog ../top.v
synth -top top
tee -o result.log abc -g aig
tee -o result.log abc -luts 3:4
read_verilog ../top_dff.v
proc
dff2dffe
synth -top top
tee -o result.out abc -markgroups
read_verilog ../top_mux.v
proc
synth -top top
abc
select -assert-count 139 t:$_MUX_
read_verilog ../top_mux.v
synth -top top
tee -o result.log abc -mux16
stat
read_verilog ../top_mux.v
synth -top top
abc -mux4
select -assert-count 75 t:$_MUX4_
read_verilog ../top_mux.v
synth -top top
tee -o result.log abc -mux8
stat
read_verilog ../top_mux.v
synth -top top
tee -o result.out abc -g cmos3
abc -g cmos3
select -assert-count 144 t:$_AOI3_
select -assert-count 169 t:$_OAI3_
read_verilog ../top_mux.v
synth -top top
tee -o result.out abc -g cmos4
abc -g cmos4
select -assert-count 111 t:$_AOI3_
select -assert-count 28 t:$_AOI4_
select -assert-count 111 t:$_AOI3_
select -assert-count 24 t:$_OAI4_
read_verilog ../top.v
tee -o result.log abc9 -luts uu
tee -o result.out abc
read_verilog ../top.v
proc
tee -o result.log abc9 -lut 2
tee -o result.out abc
read_verilog ../top.v
synth -top top
tee -o result.log abc -P 4
abc -dff
failed: return code 134.
read_verilog ../top.v
synth -top top
tee -o result.log abc -g XOR
tee -o result.out abc -g XOR
abc -g XOR
ERROR: Can't open ABC output file
read_verilog ../top.v
synth -top top
tee -o result.log abc -script o
tee -o result.out abc -script o
abc -script o
ERROR: Can't open ABC output file
read_verilog ../top.v
synth -top top
tee -o result.out abc -script top.yss
abc -script top.yss
read_verilog ../top_dff.v
tee -o result.out abc
ERROR: Command syntax error: Unsupported gate type: XO
read_verilog ../top.v
synth -top top
tee -o result.log abc -g XO
tee -o result.out abc -g XO
abc -g XO
......@@ -8,10 +8,6 @@
output cout
);
`ifndef BUG
assign {cout,A} = cin + y + x;
`else
assign {cout,A} = cin - y * x;
`endif
endmodule
......@@ -5,11 +5,7 @@ module adff
end
always @( posedge clk, posedge clr )
if ( clr )
`ifndef BUG
q <= 1'b0;
`else
q <= d;
`endif
else
q <= d;
endmodule
......@@ -21,11 +17,7 @@ module adffn
end
always @( posedge clk, negedge clr )
if ( !clr )
`ifndef BUG
q <= 1'b0;
`else
q <= d;
`endif
else
q <= d;
endmodule
......@@ -37,11 +29,7 @@ module dffe
end
always @( posedge clk )
if ( en )
`ifndef BUG
q <= d;
`else
q <= 1'b0;
`endif
endmodule
module dffsr
......@@ -51,11 +39,7 @@ module dffsr
end
always @( posedge clk, posedge pre, posedge clr )
if ( clr )
`ifndef BUG
q <= 1'b0;
`else
q <= d;
`endif
else if ( pre )
q <= 1'b1;
else
......@@ -69,11 +53,7 @@ module ndffnsnr
end
always @( negedge clk, negedge pre, negedge clr )
if ( !clr )
`ifndef BUG
q <= 1'b0;
`else
q <= d;
`endif
else if ( !pre )
q <= 1'b1;
else
......@@ -95,7 +75,7 @@ dffsr u_dffsr (
.d (a ),
.q (b )
);
ndffnsnr u_ndffnsnr (
.clk (clk ),
.clr (clr),
......@@ -103,21 +83,21 @@ ndffnsnr u_ndffnsnr (
.d (a ),
.q (b1 )
);
adff u_adff (
.clk (clk ),
.clr (clr),
.d (a ),
.q (b2 )
);
adffn u_adffn (
.clk (clk ),
.clr (clr),
.d (a ),
.q (b3 )
);
dffe u_dffe (
.clk (clk ),
.en (clr),
......
......@@ -8,10 +8,6 @@ module top
output cout
);
`ifndef BUG
assign cout = x / y * cin;
`else
assign {cout,A} = cin - y * x;
`endif
endmodule
module FSM ( clk,rst, en, ls, rs, stop, busy, finish);
input wire clk;
input wire rst;
input wire en;
input wire ls;
input wire rs;
output wire stop;
output wire busy;
output wire finish;
parameter S0 = 4'b0000, S1 = 4'b0001, S2 = 4'b0010, S3 = 4'b0011, S4 = 4'b0100, S5 = 4'b0101, S6 = 4'b0110, S7 = 4'b0111, S8 = 4'b1000, S9 = 4'b1001, S10 = 4'b1010, S11 = 4'b1011, S12 = 4'b1100, S13 = 4'b1101, S14 = 4'b1110;
reg [3:0] ns, st;
reg [2:0] count;
always @(posedge clk)
begin : CurrstProc
if (rst)
st <= S0;
else
st <= ns;
end
always @*
begin : NextstProc
ns = st;
case (st)
S0: ns = S1;
S1: ns = S2;
S2:
if (rs == 1'b1)
ns = S3;
else
ns = S4;
S3: ns = S1;
S4: if (count > 7)
ns = S10;
else
ns = S5;
S5: if (ls == 1'b0)
ns = S6;
else
ns = S3;
S6:
if (ls == 1'b1)
ns = S7;
else
ns = S8;
S7:
if (ls == 1'b1 && rs == 1'b1)
ns = S5;
else
ns = S13;
S8: ns = S9;
S9: ns = S8;
S10:
if (ls == 1'b1 || rs == 1'b1)
ns = S11;
else
ns = S4;
S11: ns = S12;
S12: ns = S10;
S13: ;
default: ns = S0;
endcase;
end
always @(posedge clk)
if(~rst)
count <= 0;
else
begin
if(st == S4)
if (count > 7)
count <= 0;
else
count <= count + 1;
end
//FSM outputs (combinatorial)
assign stop = (st == S3 || st == S12) ? 1'b1 : 1'b0;
assign finish = (st == S13) ? 1'b1 : 1'b0;
assign busy = (st == S8 || st == S9) ? 1'b1 : 1'b0;
endmodule
module top (
input clk,
input rst,
input en,
input a,
input b,
output s,
output bs,
output f
);
FSM u_FSM ( .clk(clk),
.rst(rst),
.en(en),
.ls(a),
.rs(b),
.stop(s),
.busy(bs),
.finish(f));
endmodule
module top
(
input x,
input y,
input cin,
output reg A,
output reg cout
);
reg A1,cout1,A2,cout2;
initial begin
A = 0;
cout = 0;
end
always @(posedge x) begin
A1 <= ~y + &cin;
end
always @(posedge x) begin
cout1 <= cin ? |y : ^A;
end
always @(posedge x) begin
A <= A1|y~&cin~^A1;
end
always @(posedge x) begin
cout <= cout1&cin~|y;
end
always @(posedge x) begin
A2 <= ~(y | cin);
end
always @(posedge x) begin
cout2 <= cin ~|y;
end
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
......@@ -2,4 +2,4 @@ read_verilog ../top.v
proc
dff2dffe
synth -top top
tee -o result.log abc9 -W -lut 2
abc9 -D 2 -lut 2
......@@ -2,4 +2,4 @@ read_verilog ../top.v
proc
dff2dffe
synth -top top
tee -o result.log abc9 -fast -lut 2
abc9 -W -lut 2
abc9 -box box.txt -lut 2
ERROR: Can't open ABC output file
read_verilog ../top_dff.v
proc
dff2dffe
synth -top top
abc9 -lut 5
abc9 -lut 5
read_verilog ../top_dff.v
proc
dff2dffe
synth -top top
abc9 -lut 5 -nomfs
abc9 -lut 5
read_verilog ../top_dff.v
proc
dff2dffe
techmap
abc9 -lut 5
abc9 -lut 5
......@@ -2,4 +2,4 @@ read_verilog ../top.v
proc
dff2dffe
synth -top top
tee -o result.log abc9 -lut 2
abc9 -fast -lut 2
read_verilog ../top.v
tee -o result.log abc9 -lut 2
abc9 -luts 2:2:2:/2
......@@ -2,4 +2,4 @@ read_verilog ../top.v
proc
dff2dffe
synth -top top
tee -o result.log abc9 -luts 2,3,4
abc9 -lut 2
......@@ -2,4 +2,4 @@ read_verilog ../top.v
proc
dff2dffe
synth -top top
tee -o result.log abc9 -markgroups -lut 2
abc9 -luts 2,3,4
......@@ -2,4 +2,4 @@ read_verilog ../top.v
proc
dff2dffe
synth -top top
tee -o result.log abc9 -nocleanup -lut 2
abc9 -markgroups -lut 2
read_verilog ../top_mem.v
proc
dff2dffe
synth -top top
abc9 -D 2 -lut 2
read_verilog ../top_mux.v
proc
synth -top top
abc9 -lut 2
......@@ -2,4 +2,4 @@ read_verilog ../top.v
proc
dff2dffe
synth -top top
tee -o result.log abc9 -showtmp -lut 2
abc9 -nocleanup -lut 2
abc9 -script box.txt -lut 2
......@@ -2,4 +2,4 @@ read_verilog ../top.v
proc
dff2dffe
synth -top top
tee -o result.log abc -D 2
abc9 -showtmp -lut 2
read_verilog ../top_mux.v
proc
techmap
abc9 -lut 2
read_verilog ../top_dff.v
abc9 -lut 2
read_verilog ../top_mux.v
proc
abc9 -lut 2
......@@ -8,10 +8,6 @@
output cout
);
`ifndef BUG
assign {cout,A} = cin + y + x;
`else
assign {cout,A} = cin - y * x;
`endif
endmodule
......@@ -5,11 +5,7 @@ module adff
end
always @( posedge clk, posedge clr )
if ( clr )
`ifndef BUG
q <= 1'b0;
`else
q <= d;
`endif
else
q <= d;
endmodule
......@@ -21,11 +17,7 @@ module adffn
end
always @( posedge clk, negedge clr )
if ( !clr )
`ifndef BUG
q <= 1'b0;
`else
q <= d;
`endif
else
q <= d;
endmodule
......@@ -37,11 +29,7 @@ module dffe
end
always @( posedge clk )
if ( en )
`ifndef BUG
q <= d;
`else
q <= 1'b0;
`endif
endmodule
module dffsr
......@@ -51,11 +39,7 @@ module dffsr
end
always @( posedge clk, posedge pre, posedge clr )
if ( clr )
`ifndef BUG
q <= 1'b0;
`else
q <= d;
`endif
else if ( pre )
q <= 1'b1;
else
......@@ -69,11 +53,7 @@ module ndffnsnr
end
always @( negedge clk, negedge pre, negedge clr )
if ( !clr )
`ifndef BUG
q <= 1'b0;
`else
q <= d;
`endif
else if ( !pre )
q <= 1'b1;
else
......@@ -95,7 +75,7 @@ dffsr u_dffsr (
.d (a ),
.q (b )
);
ndffnsnr u_ndffnsnr (
.clk (clk ),
.clr (clr),
......@@ -103,21 +83,21 @@ ndffnsnr u_ndffnsnr (
.d (a ),
.q (b1 )
);
adff u_adff (
.clk (clk ),
.clr (clr),
.d (a ),
.q (b2 )
);
adffn u_adffn (
.clk (clk ),
.clr (clr),
.d (a ),
.q (b3 )
);
dffe u_dffe (
.clk (clk ),
.en (clr),
......
......@@ -7,38 +7,30 @@ module top
);
// Declare the RAM variable
reg [7:0] ram[63:0];
initial begin
q_a <= 8'h00;
q_a <= 8'h00;
q_b <= 8'd0;
end
// Port A
always @ (posedge clka)
begin
`ifndef BUG
if (we_a)
`else
if (we_b)
`endif
if (we_a)
begin
ram[addr_a] <= data_a;
q_a <= data_a;
end
if (re_b)
if (re_b)
begin
q_a <= ram[addr_a];
end
end
// Port B
always @ (posedge clkb)
begin
`ifndef BUG
if (we_b)
`else
if (we_a)
`endif
if (we_b)
begin
ram[addr_b] <= data_b;
q_b <= data_b;
......@@ -48,5 +40,5 @@ module top
q_b <= ram[addr_b];
end
end
endmodule
endmodule
......@@ -3,6 +3,7 @@ input [7:0] S,
input [255:0] D,
output M256
);
parameter i = 3;
assign M256 = D[S];
......
(* black_box *) module top
(
input x,
input y,
input cin,
output A,
output cout
);
`ifndef BUG
assign {cout,A} = cin + y + x;
`else
assign {cout,A} = cin - y * x;
`endif
endmodule
wire width 0 \\w
read_verilog ../top.v
add -wire w 0
tee -o result.log dump
tee -o result.out dump
ERROR: Found incompatible object with same name in module \\top2!
wire width 32000 input 6 \\gi
read_verilog ../top.v
add -global_input gi 32000
tee -o result.log dump
tee -o result.out dump
wire width 3 inout 6 \\34
read_verilog ../top.v
add -inout \34 3
tee -o result.log dump
tee -o result.out dump
wire width 2 input 6 \\i
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
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