aboutsummaryrefslogtreecommitdiffstats
path: root/backends/verilog
Commit message (Collapse)AuthorAgeFilesLines
* substr() -> compare()Eddie Hung2019-08-071-2/+2
|
* RTLIL::S{0,1} -> State::S{0,1}Eddie Hung2019-08-071-6/+6
|
* Use State::S{0,1}Eddie Hung2019-08-061-2/+2
|
* Make liberal use of IdString.in()Eddie Hung2019-08-061-1/+1
|
* Add $_NMUX_, add "abc -g cmos", add proper cmos cell costsClifford Wolf2019-08-061-0/+14
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Merge pull request #1203 from whitequark/write_verilog-zero-width-valuesClifford Wolf2019-07-181-1/+2
|\ | | | | write_verilog: dump zero width constants correctly
| * write_verilog: dump zero width constants correctly.whitequark2019-07-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, zero width constants were dumped as "" (empty string). Unfortunately, 1364-2005 5.2.3.3 indicates that an empty string is equivalent to "\0", and is 8 bits wide, so that's wrong. After this commit, a replication operation with a count of zero is used instead, which is explicitly permitted per 1364-2005 5.1.14, and is defined to have size zero. (Its operand has to have a non-zero size for it to be legal, though.) Fixes #948 (again).
* | Remove old $pmux_safe code from write_verilogClifford Wolf2019-07-171-5/+4
|/ | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Merge pull request #1172 from whitequark/write_verilog-Sa-as-qmarkClifford Wolf2019-07-111-2/+8
|\ | | | | write_verilog: write RTLIL::Sa aka - as Verilog ?
| * write_verilog: write RTLIL::Sa aka - as Verilog ?.whitequark2019-07-091-2/+8
| | | | | | | | | | | | | | Currently, the only ways (determined by grepping for regex \bSa\b) to end up with RTLIL::Sa in a netlist is by reading a Verilog constant with ? in it as a part of case, or by running certain FSM passes. Both of these cases should be round-tripped back to ? in Verilog.
* | write_verilog: fix placement of case attributes. NFC.whitequark2019-07-091-3/+2
|/
* verilog_backend: dump attributes on SwitchRule.whitequark2019-07-081-0/+1
| | | | This appears to be an omission.
* verilog_backend: dump attributes on CaseRule, as comments.whitequark2019-07-081-6/+10
| | | | Attributes are not permitted in that position by Verilog grammar.
* Fix handling of partial init attributes in write_verilog, fixes #997Clifford Wolf2019-05-071-1/+2
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Improve write_verilog specify supportClifford Wolf2019-05-041-15/+71
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Rename T_{RISE,FALL}_AVG to T_{RISE,FALL}_TYP to better match verilog std ↵Clifford Wolf2019-04-231-2/+2
| | | | | | nomenclature Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Add $specify2/$specify3 support to write_verilogClifford Wolf2019-04-231-0/+47
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Add support for $assert/$assume/$cover to write_verilogClifford Wolf2019-04-231-0/+10
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Add support for zero-width signals to Verilog back-end, fixes #948Clifford Wolf2019-04-221-0/+8
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Add "whitebox" attribute, add "read_verilog -wb"Clifford Wolf2019-04-181-1/+1
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Improve determinism of IdString DB for similar scriptsClifford Wolf2019-03-111-0/+4
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Add "write_verilog -siminit"Clifford Wolf2019-02-281-2/+11
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Instead of INIT param on cells, use initial statement with hier ref asEddie Hung2019-02-171-18/+13
| | | | per @cliffordwolf
* Merge https://github.com/YosysHQ/yosys into dff_initEddie Hung2019-02-171-38/+41
|\
| * write_verilog: correctly emit asynchronous transparent ports.whitequark2019-01-291-38/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Remove check for cell->name[0] == '$'Eddie Hung2019-02-061-1/+1
| |
* | RefactorEddie Hung2019-02-061-21/+5
| |
* | write_verilog to cope with init attr on q when -noexprEddie Hung2019-02-061-2/+32
|/
* Merge pull request #800 from whitequark/write_verilog_tribufClifford Wolf2019-01-271-0/+12
|\ | | | | write_verilog: write $tribuf cell as ternary
| * write_verilog: write $tribuf cell as ternary.whitequark2019-01-271-0/+12
| |
* | write_verilog: escape names that match SystemVerilog keywords.whitequark2019-01-271-0/+27
|/
* Fix handling of $shiftx in Verilog back-endClifford Wolf2019-01-151-3/+6
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Fix typographical and grammatical errors and inconsistencies.whitequark2019-01-021-1/+1
| | | | | | | | | | | | The initial list of hits was generated with the codespell command below, and each hit was evaluated and fixed manually while taking context into consideration. DIRS="kernel/ frontends/ backends/ passes/ techlibs/" DIRS="${DIRS} libs/ezsat/ libs/subcircuit" codespell $DIRS -S *.o -L upto,iff,thru,synopsys,uint More hits were found by looking through comments and strings manually.
* write_verilog: handle the $shift cell.whitequark2018-12-161-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation corresponds to the following Verilog, which is lifted straight from simlib.v: module \\$shift (A, B, Y); parameter A_SIGNED = 0; parameter B_SIGNED = 0; parameter A_WIDTH = 0; parameter B_WIDTH = 0; parameter Y_WIDTH = 0; input [A_WIDTH-1:0] A; input [B_WIDTH-1:0] B; output [Y_WIDTH-1:0] Y; generate if (B_SIGNED) begin:BLOCK1 assign Y = $signed(B) < 0 ? A << -B : A >> B; end else begin:BLOCK2 assign Y = A >> B; end endgenerate endmodule
* Merge pull request #736 from whitequark/select_assert_listClifford Wolf2018-12-161-1/+1
|\ | | | | select: print selection if a -assert-* flag causes an error
| * write_verilog: add a missing newline.whitequark2018-12-161-1/+1
| |
* | write_verilog: correctly map RTLIL `sync init`.whitequark2018-12-071-0/+2
|/
* adding offset info to memoriesrafaeltp2018-10-181-1/+1
|
* adding offset info to memoriesrafaeltp2018-10-181-2/+3
|
* Fixed typo in "verilog_write" help messageacw12512018-09-181-3/+3
|
* Add $lut support to Verilog back-endClifford Wolf2018-09-061-0/+13
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Consistent use of 'override' for virtual methods in derived classes.Henner Zeller2018-07-201-2/+2
| | | | | | | | | o Not all derived methods were marked 'override', but it is a great feature of C++11 that we should make use of. o While at it: touched header files got a -*- c++ -*- for emacs to provide support for that language. o use YS_OVERRIDE for all override keywords (though we should probably use the plain keyword going forward now that C++11 is established)
* Add $dlatch support to write_verilogClifford Wolf2018-04-221-0/+38
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Add $shiftx support to verilog front-endClifford Wolf2017-10-071-0/+17
|
* Rename "write_verilog -nobasenradix" to "write_verilog -decimal"Clifford Wolf2017-10-031-16/+13
|
* Fixed wrong declaration in Verilog backenddh732017-10-011-3/+3
|
* Adding Cyclone IV (E, GX), Arria 10, Cyclone V and LPM functions (ALTPLL and ↵dh732017-10-011-3/+16
| | | | M9K); M9K is not finished yet. Achronix Speedster also in this commit. Both Arria10 and Speedster-i are still experimental due complexity, but you can experiment around those devices right now
* Add $_ANDNOT_ and $_ORNOT_ gatesClifford Wolf2017-05-171-4/+6
|
* Cleanups and fixed in write_verilog regarding reg initClifford Wolf2016-11-161-15/+61
|
* Added hex constant support to write_verilogClifford Wolf2016-11-031-4/+62
|