mirror of
https://github.com/YosysHQ/yosys
synced 2026-05-29 13:26:31 +00:00
Experimental abc_new tests.
This commit is contained in:
parent
ca88868902
commit
dc9109316f
4 changed files with 153 additions and 0 deletions
63
tests/techmap/abc_new_basic_gates.ys
Normal file
63
tests/techmap/abc_new_basic_gates.ys
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
design -reset
|
||||
read_verilog <<EOT
|
||||
module top(input a, input b, output y);
|
||||
assign y = a | b;
|
||||
endmodule
|
||||
EOT
|
||||
hierarchy -check -top top
|
||||
proc; opt -fast
|
||||
logger -expect log "ABC: .*i/o = +2/ +1" 2
|
||||
logger -expect log "ABC: Warning: The network is combinational\." 1
|
||||
logger -expect log "ABC: Networks are equivalent\." 1
|
||||
logger -expect warning "Wire top\.\$lit[0-9]+ is used but has no driver\." 1
|
||||
logger -expect error "Found 1 problems in 'check -assert'" 1
|
||||
abc_new -script "+&scorr;&sweep;&dc2;&dch,-f;&nf,{D}" -liberty ../../examples/cmos/cmos_cells.lib
|
||||
check -assert
|
||||
|
||||
design -reset
|
||||
read_verilog <<EOT
|
||||
module top(input a, input b, output y);
|
||||
assign y = ~(a & b);
|
||||
endmodule
|
||||
EOT
|
||||
hierarchy -check -top top
|
||||
proc; opt -fast
|
||||
logger -expect log "ABC: .*i/o = +2/ +1" 2
|
||||
logger -expect log "ABC: Warning: The network is combinational\." 1
|
||||
logger -expect log "ABC: Networks are equivalent\." 1
|
||||
logger -expect warning "Wire top\.\$lit[0-9]+ is used but has no driver\." 1
|
||||
logger -expect error "Found 1 problems in 'check -assert'" 1
|
||||
abc_new -script "+&scorr;&sweep;&dc2;&dch,-f;&nf,{D}" -liberty ../../examples/cmos/cmos_cells.lib
|
||||
check -assert
|
||||
|
||||
design -reset
|
||||
read_verilog <<EOT
|
||||
module top(input a, input b, output y);
|
||||
assign y = a ^ b;
|
||||
endmodule
|
||||
EOT
|
||||
hierarchy -check -top top
|
||||
proc; opt -fast
|
||||
logger -expect log "ABC: .*i/o = +2/ +1" 2
|
||||
logger -expect log "ABC: Warning: The network is combinational\." 1
|
||||
logger -expect log "ABC: Networks are equivalent\." 1
|
||||
logger -expect warning "Wire top\.\$lit[0-9]+ is used but has no driver\." 1
|
||||
logger -expect error "Found 1 problems in 'check -assert'" 1
|
||||
abc_new -script "+&scorr;&sweep;&dc2;&dch,-f;&nf,{D}" -liberty ../../examples/cmos/cmos_cells.lib
|
||||
check -assert
|
||||
|
||||
design -reset
|
||||
read_verilog <<EOT
|
||||
module top(input a, input b, input c, input d, output y);
|
||||
assign y = (a & b) | (c & d);
|
||||
endmodule
|
||||
EOT
|
||||
hierarchy -check -top top
|
||||
proc; opt -fast
|
||||
logger -expect log "ABC: .*i/o = +4/ +1" 2
|
||||
logger -expect log "ABC: Warning: The network is combinational\." 1
|
||||
logger -expect log "ABC: Networks are equivalent\." 1
|
||||
logger -expect warning "Wire top\.\$lit[0-9]+ is used but has no driver\." 1
|
||||
logger -expect error "Found 1 problems in 'check -assert'" 1
|
||||
abc_new -script "+&scorr;&sweep;&dc2;&dch,-f;&nf,{D}" -liberty ../../examples/cmos/cmos_cells.lib
|
||||
check -assert
|
||||
Loading…
Add table
Add a link
Reference in a new issue