Parallel RAM: Difference between revisions

Content deleted Content added
OAbot (talk | contribs)
m Open access bot: doi added to citation with #oabot.
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
Line 34:
This is an example of [[SystemVerilog]] code which finds the maximum value in the array in only 2 clock cycles. It compares all the combinations of the elements in the array at the first clock, and merges the result at the second clock. It uses CRCW memory; <code>m[i] <= 1</code> and <code>maxNo <= data[i]</code> are written concurrently. The concurrency causes no conflicts because the algorithm guarantees that the same value is written to the same memory. This code can be run on [[Field-programmable gate array|FPGA]] hardware.
 
<sourcesyntaxhighlight lang="SystemVerilog">
module FindMax #(parameter int len = 8)
(input bit clock, resetN, input bit[7:0] data[len], output bit[7:0] maxNo);
Line 68:
end
endmodule
</syntaxhighlight>
</source>
 
== See also ==