File: test_arith.ys

package info (click to toggle)
yosys 0.23-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 20,644 kB
  • sloc: cpp: 138,485; python: 8,605; yacc: 3,451; sh: 2,358; makefile: 1,204; lex: 696; perl: 399; ansic: 371; javascript: 323; tcl: 78; vhdl: 46
file content (22 lines) | stat: -rw-r--r-- 589 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Our implementation
read_verilog ../arith_map.v
read_verilog ../cells_sim.v
read_verilog -DSIMLIB_NOCHECKS ../../common/simlib.v
rename \$__SF2_ALU gate
hierarchy -top gate -chparam A_WIDTH 4 -chparam B_WIDTH 5 -chparam Y_WIDTH 5
flatten
opt
write_verilog gate.v

# The reference
read_verilog -DSIMLIB_NOCHECKS ../../common/simlib.v
rename \$alu gold
hierarchy -top gold -chparam A_WIDTH 4 -chparam B_WIDTH 5 -chparam Y_WIDTH 5
flatten
proc
clean
write_verilog gold.v

read_verilog gate.v
miter -equiv -flatten -make_outputs gold gate miter
sat -verify -prove trigger 0 -show-ports miter