Commit 639715e9 by Eddie Hung

Use 'script -select' to check area as we go along, not all at end

parent 3c5df7dd
...@@ -43,8 +43,12 @@ for fn in glob.glob('*.v'): ...@@ -43,8 +43,12 @@ for fn in glob.glob('*.v'):
bn,_ = os.path.splitext(fn) bn,_ = os.path.splitext(fn)
print('design -reset') with open(fn, 'a') as f:
print('read_verilog {0}.out/{0}_syn0.v'.format(bn)) assert_area = ['select t:{0} -assert-count {1}'.format(r,v*W) for r,v in zip(['LUT1','LUT2','LUT3','LUT4','LUT5','LUT6','MUXF7','MUXF8'], area[N])]
for r,v in zip(['LUT1','LUT2','LUT3','LUT4','LUT5','LUT6','MUXF7','MUXF8'], area[N]): print('''
print('select t:{0} -assert-count {1}'.format(r,v*W)) `ifndef _AUTOTB
module \$__test ;
wire [4095:0] assert_area = "%s";
endmodule
`endif
''' % '; '.join(assert_area), file=f)
...@@ -22,7 +22,7 @@ wget https://raw.githubusercontent.com/YosysHQ/yosys-bench/master/verilog/benchm ...@@ -22,7 +22,7 @@ wget https://raw.githubusercontent.com/YosysHQ/yosys-bench/master/verilog/benchm
wget https://raw.githubusercontent.com/YosysHQ/yosys-bench/master/verilog/benchmarks_large/mux/generate.py -O generate_large.py -o /dev/null wget https://raw.githubusercontent.com/YosysHQ/yosys-bench/master/verilog/benchmarks_large/mux/generate.py -O generate_large.py -o /dev/null
python3 generate_small.py python3 generate_small.py
python3 generate_large.py python3 generate_large.py
${MAKE:-make} -f ../../../../tools/autotest.mk $seed *.v EXTRA_FLAGS="-p 'synth_xilinx -abc9 -widemux 5' -l ../../../../../techlibs/xilinx/cells_sim.v" python3 ../assert_area.py
${MAKE:-make} -f ../../../../tools/autotest.mk $seed *.v EXTRA_FLAGS="\
python3 ../assert_area.py > assert_area.ys -p 'synth_xilinx -abc9 -widemux 5; script -select \$__test/w:assert_area'\
yosys -q assert_area.ys -l ../../../../../techlibs/xilinx/cells_sim.v"
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