OpenCores
URL https://opencores.org/ocsvn/wbuart32/wbuart32/trunk

Subversion Repositories wbuart32

[/] [wbuart32/] [trunk/] [bench/] [formal/] [Makefile] - Diff between revs 22 and 26

Only display areas with differences | Details | Blame | View Log

Rev 22 Rev 26
################################################################################
################################################################################
##
##
## Filename:    Makefile
## Filename:    Makefile
##
##
## Project:     wbuart32, a full featured UART with simulator
## Project:     wbuart32, a full featured UART with simulator
##
##
## Purpose:     To direct the formal verification of the UART (and FIFO)
## Purpose:     To direct the formal verification of the UART (and FIFO)
##              sources.
##              sources.
##
##
## Targets:     The default target, all, tests all of the components defined
## Targets:     The default target, all, tests all of the components defined
##              within this module.
##              within this module.
##
##
## Creator:     Dan Gisselquist, Ph.D.
## Creator:     Dan Gisselquist, Ph.D.
##              Gisselquist Technology, LLC
##              Gisselquist Technology, LLC
##
##
################################################################################
################################################################################
##
##
## Copyright (C) 2017, Gisselquist Technology, LLC
## Copyright (C) 2017-2019, Gisselquist Technology, LLC
##
##
## This program is free software (firmware): you can redistribute it and/or
## This program is free software (firmware): you can redistribute it and/or
## modify it under the terms of  the GNU General Public License as published
## modify it under the terms of  the GNU General Public License as published
## by the Free Software Foundation, either version 3 of the License, or (at
## by the Free Software Foundation, either version 3 of the License, or (at
## your option) any later version.
## your option) any later version.
##
##
## This program is distributed in the hope that it will be useful, but WITHOUT
## This program is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
## for more details.
## for more details.
##
##
## You should have received a copy of the GNU General Public License along
## You should have received a copy of the GNU General Public License along
## with this program.  (It's in the $(ROOT)/doc directory.  Run make with no
## with this program.  (It's in the $(ROOT)/doc directory.  Run make with no
## target there if the PDF file isn't present.)  If not, see
## target there if the PDF file isn't present.)  If not, see
##  for a copy.
##  for a copy.
##
##
## License:     GPL, v3, as defined and found on www.gnu.org,
## License:     GPL, v3, as defined and found on www.gnu.org,
##              http://www.gnu.org/licenses/gpl.html
##              http://www.gnu.org/licenses/gpl.html
##
##
################################################################################
################################################################################
##
##
##
##
TESTS := ufifo txuartlite rxuartlite
TESTS := ufifo txuartlite rxuartlite txuart
.PHONY: $(TESTS)
.PHONY: $(TESTS)
all: $(TESTS)
all: $(TESTS)
RTL := ../../rtl
RTL := ../../rtl
SMTBMC  := yosys-smtbmc
 
# SOLVER  := -s z3
 
SOLVER  := -s yices
 
# BMCARGS := --presat $(SOLVER)
 
BMCARGS := $(SOLVER)
 
INDARGS := $(SOLVER) -i
 
 
 
FIFO  := ufifo
FIFO  := ufifo
TX    := txuartlite
TX    := txuart
 
TXLITE:= txuartlite
RX    := rxuartlite
RX    := rxuartlite
 
 
$(FIFO).smt2: $(RTL)/$(FIFO).v $(FIFO).ys
.PHONY: $(FIFO) $(TX) $(RX) $(TXLITE)
        yosys -ql $(FIFO).yslog -s $(FIFO).ys
$(FIFO): $(FIFO)/PASS
 
$(TX): $(TX)/PASS
$(TX).smt2: $(RTL)/$(TX).v $(TX).ys
$(RX): $(RX)_prf/PASS $(RX)_cvr/PASS
        yosys -ql $(TX).yslog -s $(TX).ys
$(TXLITE): $(TXLITE)_cvr/PASS $(TXLITE)_prf/PASS
 
 
$(RX).smt2: $(RTL)/$(RX).v $(RX).ys
$(TX)/PASS:     $(TX).sby $(RTL)/$(TX).v
        yosys -ql $(RX).yslog -s $(RX).ys
        sby -f $(TX).sby
 
 
$(FIFO) : $(FIFO).check
$(RX)_prf/PASS:     $(RX).sby $(RTL)/$(RX).v
$(FIFO).check: $(FIFO).smt2
        sby -f $(RX).sby prf
        $(SMTBMC) --presat $(BMCARGS) -t 10 --dump-vcd $(FIFO).vcd $(FIFO).smt2
$(RX)_cvr/PASS:     $(RX).sby $(RTL)/$(RX).v
        $(SMTBMC)          $(INDARGS) -t 10 --dump-vcd $(FIFO).vcd $(FIFO).smt2
        sby -f $(RX).sby cvr
        touch $@
 
 
$(TXLITE)_cvr/PASS:     $(TXLITE).sby $(RTL)/$(TXLITE).v
$(TX) : $(TX).check
        sby -f $(TXLITE).sby cvr
$(TX).check: $(TX).smt2
$(TXLITE)_prf/PASS:     $(TXLITE).sby $(RTL)/$(TXLITE).v
        $(SMTBMC) --presat $(BMCARGS) -t 90 --dump-vcd $(TX).vcd $(TX).smt2
        sby -f $(TXLITE).sby prf
        $(SMTBMC)          $(INDARGS) -t 90 --dump-vcd $(TX).vcd $(TX).smt2
 
        $(SMTBMC) -c $(SOLVER) -t 90 --dump-vcd $(TX).vcd $(TX).smt2
 
        touch $@
 
 
 
$(RX) : $(RX).check
 
$(RX).check: $(RX).sby $(RTL)/$(RX).v
 
        sby -f $(RX).sby
 
        touch $@
 
 
 
 
$(FIFO)/PASS:   $(FIFO).sby $(RTL)/$(FIFO).v
 
        sby -f $(FIFO).sby
 
 
.PHONY: clean
.PHONY: clean
clean:
clean:
        rm -f  $(FIFO).smt2 $(FIFO)*.vcd
        rm -rf $(FIFO)/ $(RX)_*/ $(TX)/ $(TXLITE)_cvr/ $(TXLITE)_prf/
        rm -f  $(TX).smt2   $(TX)*.vcd
 
        rm -rf $(RX)_one/   $(RX)_two/
 
        rm -f *.check
 
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.