mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-01 03:57:52 +00:00
memory_dff: Recognize soft transparency logic.
This commit is contained in:
parent
616ace2d92
commit
9fdedf4d1c
4 changed files with 1355 additions and 7 deletions
21
tests/memories/trans_sdp.v
Normal file
21
tests/memories/trans_sdp.v
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// expect-wr-ports 1
|
||||
// expect-rd-ports 1
|
||||
// expect-rd-clk \clk
|
||||
// expect-rd-en \re
|
||||
|
||||
module top(input clk, we, re, input [7:0] ra, wa, wd, output reg [7:0] rd);
|
||||
|
||||
reg [7:0] mem[0:255];
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (we)
|
||||
mem[wa] <= wd;
|
||||
|
||||
if (re) begin
|
||||
rd <= mem[ra];
|
||||
if (we && ra == wa)
|
||||
rd <= wd;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
Loading…
Add table
Add a link
Reference in a new issue