Skip to content

Commit

Permalink
Added unique log files for each yosys command (#446)
Browse files Browse the repository at this point in the history
The yosys call is modified with the -ql flag and ~a to support
generating log files for each unique *.sv filename that is called by
Yosys.

---------

Co-authored-by: Gus Smith <guscomps@gmail.com>
  • Loading branch information
cknizek and gussmith23 authored Jul 15, 2024
1 parent 38eb7f4 commit d1fce6e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/main.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
(define yices-path (make-parameter #f))
(define cvc4-path (make-parameter #f))
(define boolector-path (make-parameter #f))
(define yosys-log-filepath (make-parameter #f))

(command-line
#:program "lakeroad"
Expand All @@ -95,6 +96,7 @@
v
"Solver to use. Supported: cvc5, bitwuzla, boolector. Defaults to bitwuzla."
(solver v)]
["--yosys-log-filepath" v "Generate a Yosys log file (specify a file)." (yosys-log-filepath v)]
["--out-format"
fmt
"Output format. Supported: 'verilog' for outputting to raw Verilog,"
Expand Down Expand Up @@ -295,7 +297,8 @@
;;; TODO(@gussmith23): This is a very important line -- we need to determine whether
;;; clk2fflogic is the correct thing to use. See
;;; https://github.com/uwsampl/lakeroad/issues/238
"yosys -q -p 'read_verilog -sv ~a; hierarchy -simcheck -top ~a; prep; proc; flatten; clk2fflogic; write_btor;'"
"yosys ~a -p 'read_verilog -sv ~a; hierarchy -simcheck -top ~a; prep; proc; flatten; clk2fflogic; write_btor;'"
(if (yosys-log-filepath) (format "-ql ~a" (yosys-log-filepath)) "-q")
(verilog-module-filepath)
(top-module-name))))
(error "Yosys failed."))))))
Expand Down

0 comments on commit d1fce6e

Please sign in to comment.