Skip to content

Commit 10ecbe9

Browse files
docs: updating memory mapping text
More complete code examples and confirming Verific support thanks to @povik
1 parent 93c9bf2 commit 10ecbe9

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

docs/source/using_yosys/memory_mapping.rst

+10-9
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ Synchronous SDP with write-first behavior (alternate pattern)
248248

249249
.. code:: verilog
250250
251+
reg [ADDR_WIDTH - 1 : 0] read_addr_reg;
251252
reg [DATA_WIDTH - 1 : 0] mem [2**ADDR_WIDTH - 1 : 0];
252253
253254
always @(posedge clk) begin
@@ -374,7 +375,7 @@ Synchronous reset, reset priority over enable
374375
mem[write_addr] <= write_data;
375376
376377
if (read_reset)
377-
read_data <= {sval};
378+
read_data <= 'h1234;
378379
else if (read_enable)
379380
read_data <= mem[read_addr];
380381
end
@@ -408,8 +409,8 @@ Synchronous read port with asynchronous reset
408409
mem[write_addr] <= write_data;
409410
end
410411
411-
always @(posedge clk, posedge reset_read) begin
412-
if (reset_read)
412+
always @(posedge clk, posedge read_reset) begin
413+
if (read_reset)
413414
read_data <= 'h1234;
414415
else if (read_enable)
415416
read_data <= mem[read_addr];
@@ -590,14 +591,14 @@ TDP with multiple read ports
590591
assign read_data_b = mem[read_addr_b];
591592
assign read_data_c = mem[read_addr_c];
592593
593-
Not yet supported patterns
594-
--------------------------
594+
Patterns only supported with Verific
595+
------------------------------------
595596

596597
Synchronous SDP with write-first behavior via blocking assignments
597598
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
598599

599-
- Would require modifications to the Yosys Verilog frontend.
600-
- Use `Synchronous SDP with write-first behavior`_ instead
600+
- Use `Synchronous SDP with write-first behavior`_ for compatibility with Yosys
601+
Verilog frontend.
601602

602603
.. code:: verilog
603604
@@ -614,8 +615,8 @@ Synchronous SDP with write-first behavior via blocking assignments
614615
Asymmetric memories via part selection
615616
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
616617

617-
- Would require major changes to the Verilog frontend.
618-
- Build wide ports out of narrow ports instead (see `Wide synchronous read port`_)
618+
- Build wide ports out of narrow ports instead (see `Wide synchronous read
619+
port`_) for compatibility with Yosys Verilog frontend.
619620

620621
.. code:: verilog
621622

0 commit comments

Comments
 (0)