Skip to main content

RAMSTYLE

Constant RAMSTYLE 

Source
pub const RAMSTYLE: &str = "`ifndef LOGOS_RAMSTYLE
// The block RAM a memory of `words` words read into a register asks for: MLABs to thirty-two words (an MLAB's depth),
// M20K blocks beyond.
`define LOGOS_RAMSTYLE(words) (* ramstyle = (words) <= 32 ? \"MLAB\" : \"M20K\" *)
// The same for a memory read without a register after it, its MLABs checking no read-during-write: the build times an
// MLAB's read in the clock after its word's write.
`define LOGOS_RAMSTYLE_ASYNC(words) (* ramstyle = (words) <= 32 ? \"MLAB, no_rw_check\" : \"M20K\" *)
`endif
";
Expand description

LOGOS_RAMSTYLE(words): the ramstyle attribute of a memory of words words (a constant expression of the module’s parameters) read into a register — MLABs to MLAB_WORDS words, M20K blocks beyond — and LOGOS_RAMSTYLE_ASYNC(words) the same for a memory read without a register after it (unregistered, or at a registered address, so seeing a word the clock it is written), its MLABs asking for no read-during-write check: Quartus Prime Pro builds an MLAB’s read only through the MLAB’s output register otherwise, and builds such a memory in flip-flops (a probe’s 32 x 1,056-bit buffer: 33,797 registers). An engine’s build times an MLAB’s read of a word in the clock after its write (logos_settings.tcl, super::super::ofs), so the word read is the one written, as the RTL reads it. Defined once in whichever text names it first, so every unit’s text carries it.