Commit Graph

4349 Commits

Author SHA1 Message Date
Clifford Wolf 953e0bf88d Rename "yosys -D" to "yosys -U", add "yosys -D" with expected behavior
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-02-21 14:27:46 +01:00
Eddie Hung 31fea5eb33
Merge pull request #817 from eddiehung/dff_init
Cleanup #805
2019-02-20 17:26:56 -08:00
Eddie Hung 4035ec8933 Remove simple_defparam tests 2019-02-20 15:45:45 -08:00
Eddie Hung 2a8e5bf953
Merge pull request #805 from eddiehung/dff_init
write_verilog to write initial statement for initial flop state
2019-02-19 12:32:40 -08:00
Eddie Hung 11480b4fa3 Instead of INIT param on cells, use initial statement with hier ref as
per @cliffordwolf
2019-02-17 12:18:12 -08:00
Eddie Hung 3d3353e020 Revert "Add INIT parameter to all ff/latch cells"
This reverts commit 742b4e01b4.
2019-02-17 12:11:52 -08:00
Eddie Hung 17cd5f759f Merge https://github.com/YosysHQ/yosys into dff_init 2019-02-17 11:49:06 -08:00
Clifford Wolf e45f62b0c5
Merge pull request #811 from ucb-bar/firrtlfixes
Update cells supported for verilog to FIRRTL conversion.
2019-02-17 11:39:14 +01:00
Jim Lawson c245041bfe Removed unused variables, functions. 2019-02-15 12:00:28 -08:00
Jim Lawson 34153adef4 Append (instead of over-writing) EXTRA_FLAGS 2019-02-15 11:56:51 -08:00
Jim Lawson fc1c9aa11f Update cells supported for verilog to FIRRTL conversion.
Issue warning messages for missing parameterized modules and attempts to set initial values.
Replace simple "if (cell-type)" with "else if" chain.
Fix FIRRTL shift handling.
Add support for parameterized modules, $shift, $shiftx.
Handle default output file.
Deal with no top module.
Automatically run pmuxtree pass.
Allow EXTRA_FLAGS and SEED parameters to be set in the environment for tests/tools/autotest.mk.
Support FIRRTL regression testing in tests/tools/autotest.sh
Add xfirrtl files to test directories to exclude files from FIRRTL regression tests that are known to fail.
2019-02-15 11:14:17 -08:00
Clifford Wolf 807b3c7697 Fix sign handling of real constants
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-02-13 12:36:47 +01:00
Clifford Wolf 1f2548a564
Merge pull request #802 from whitequark/write_verilog_async_mem_ports
write_verilog: correctly emit asynchronous transparent ports
2019-02-12 14:41:34 +01:00
Clifford Wolf b9f6ed40b6
Merge pull request #806 from daveshah1/fsm_opt_no_reset
fsm_opt: Fix runtime error for FSMs without a reset state
2019-02-12 14:39:39 +01:00
David Shah a4515712cb fsm_opt: Fix runtime error for FSMs without a reset state
Signed-off-by: David Shah <dave@ds0.me>
2019-02-07 10:35:36 +00:00
Eddie Hung e8f4dc739c Cope WIDTH of ff/latch cells is default of zero 2019-02-06 15:51:12 -08:00
Eddie Hung 20ca795b87 Remove check for cell->name[0] == '$' 2019-02-06 14:53:40 -08:00
Eddie Hung c373640a3a Refactor 2019-02-06 14:28:44 -08:00
Eddie Hung 8241db6960 write_verilog to cope with init attr on q when -noexpr 2019-02-06 14:17:09 -08:00
Eddie Hung 742b4e01b4 Add INIT parameter to all ff/latch cells 2019-02-06 14:16:26 -08:00
Eddie Hung 115883f467 Add tests for simple cases using defparam 2019-02-06 14:15:17 -08:00
Eddie Hung 281f2aadca Add -B option to autotest.sh to append to backend_opts 2019-02-06 14:14:55 -08:00
Eddie Hung 03cf1532a7 Extend testcase 2019-02-06 14:02:11 -08:00
Eddie Hung a9674bd2ec Add testcase 2019-02-06 12:49:30 -08:00
Clifford Wolf e112d2fbf5 Add missing blackslash-to-slash convertion to smtio.py (matching Smt2Worker::get_id() behavior)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-02-06 16:35:59 +01:00
whitequark da65e1e8d9 write_verilog: correctly emit asynchronous transparent ports.
This commit fixes two related issues:
  * For asynchronous ports, clock is no longer added to domain list.
    (This would lead to absurd constructs like `always @(posedge 0)`.
  * The logic to distinguish synchronous and asynchronous ports is
    changed to correctly use or avoid clock in all cases.

Before this commit, the following RTLIL snippet (after memory_collect)

    cell $memrd $2
      parameter \MEMID "\\mem"
      parameter \ABITS 2
      parameter \WIDTH 4
      parameter \CLK_ENABLE 0
      parameter \CLK_POLARITY 1
      parameter \TRANSPARENT 1
      connect \CLK 1'0
      connect \EN 1'1
      connect \ADDR \mem_r_addr
      connect \DATA \mem_r_data
    end

would lead to invalid Verilog:

    reg [1:0] _0_;
    always @(posedge 1'h0) begin
      _0_ <= mem_r_addr;
    end
    assign mem_r_data = mem[_0_];

Note that there are two potential pitfalls remaining after this
change:
  * For asynchronous ports, the \EN input and \TRANSPARENT parameter
    are silently ignored. (Per discussion in #760 this is the correct
    behavior.)
  * For synchronous transparent ports, the \EN input is ignored. This
    matches the behavior of the $mem simulation cell. Again, see #760.
2019-01-29 02:24:00 +00:00
Clifford Wolf 266511b29e
Merge pull request #798 from mmicko/master
Fixed Anlogic simulation model
2019-01-27 09:25:18 +01:00
Clifford Wolf 81581f24fc
Merge pull request #800 from whitequark/write_verilog_tribuf
write_verilog: write $tribuf cell as ternary
2019-01-27 09:23:41 +01:00
Clifford Wolf bf798a9020 Merge branch 'whitequark-write_verilog_keyword' 2019-01-27 09:17:29 +01:00
Clifford Wolf 9666cca9dd Remove asicworld tests for (unsupported) switch-level modelling
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-01-27 09:17:02 +01:00
whitequark 3d7925ad9f write_verilog: write $tribuf cell as ternary. 2019-01-27 00:24:06 +00:00
whitequark 42c47a83da write_verilog: escape names that match SystemVerilog keywords. 2019-01-27 00:03:53 +00:00
David Shah c82aa49d9e
Merge pull request #796 from whitequark/proc_clean_typo
proc_clean: fix critical typo
2019-01-25 21:33:06 +00:00
Miodrag Milanovic 0de328da8f Fixed Anlogic simulation model 2019-01-25 19:25:25 +01:00
whitequark 58d059ccb7 proc_clean: fix critical typo. 2019-01-23 22:08:38 +00:00
Clifford Wolf c4b61f2d69
Merge pull request #793 from whitequark/proc_clean_fix_fully_def
proc_clean: fix fully def check to consider compare/signal length
2019-01-19 09:31:17 +01:00
whitequark 95b6c35882 proc_clean: fix fully def check to consider compare/signal length.
Fixes #790.
2019-01-18 23:22:19 +00:00
Clifford Wolf f3556e9f7a Cleanups in igloo2 example design
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-01-17 14:54:04 +01:00
Clifford Wolf db5765b443 Add SF2 IO buffer insertion
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-01-17 14:38:37 +01:00
Clifford Wolf 9b277fc21e Improve Igloo2 example
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-01-17 13:35:52 +01:00
Clifford Wolf 841ca74c90 Add "synth_sf2 -vlog", fix "synth_sf2 -edif"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-01-17 13:33:45 +01:00
Clifford Wolf 54dc33b905 Add "write_edif -gndvccy"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-01-17 13:33:11 +01:00
Clifford Wolf e70ebe557c Add optional nullstr argument to log_id()
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-01-15 11:06:48 +01:00
Clifford Wolf 6c5049f016 Fix handling of $shiftx in Verilog back-end
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-01-15 10:55:27 +01:00
Clifford Wolf 1d82a88e94
Merge pull request #788 from whitequark/master
Document $tribuf and some gates
2019-01-15 09:52:01 +01:00
Clifford Wolf 0994cfce7b
Merge pull request #787 from whitequark/flowmap_relax
flowmap: implement depth relaxation
2019-01-15 09:50:58 +01:00
whitequark fc2dd7ec8e manual: document some gates. 2019-01-14 16:17:25 +00:00
whitequark 7a45122168 manual: explain $tribuf cell. 2019-01-14 16:08:58 +00:00
Clifford Wolf 2a2e0a4722 Improve igloo2 example
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-01-08 20:16:36 +01:00
whitequark e792bd56b7 flowmap: clean up terminology.
* "map": group gates into LUTs;
  * "pack": replace gates with LUTs.

This is important because we have FlowMap and DF-Map, and currently
our messages are ambiguous.

Also clean up some other log messages while we're at it.
2019-01-08 02:05:06 +00:00