aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2019-01-29 02:24:00 +0000
committerwhitequark <whitequark@whitequark.org>2019-01-29 02:24:00 +0000
commitda65e1e8d9552f64e1e03c08108ca0532719bbfe (patch)
treebfdf72ced308dd77096bc29d4445f640dc50bc33 /README.md
parent266511b29eb66486bd17210eb28454a2efee218a (diff)
downloadyosys-da65e1e8d9552f64e1e03c08108ca0532719bbfe.tar.gz
yosys-da65e1e8d9552f64e1e03c08108ca0532719bbfe.tar.bz2
yosys-da65e1e8d9552f64e1e03c08108ca0532719bbfe.zip
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.
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions