Hello,
Yeah, the idea is that the ram proc models a ram for simulation, but when you go to generate RTL you generate the block without the ram. It's sort of an implicit assumption in XLS that we stitch leaf level blocks externally, although
this issue is our tracker for a feature we call multi-proc codegen where we'd like to do more of the stitching in XLS. RAMs are parallel leafs to the leaf-level blocks we generate, i.e. they are expected to be instantiated externally and then stitched together to your block. The BUILD file for the delay example shows some codegen options (see
here for more info) that will cause the channels to/from a RAM to be codegen'd specially, i.e. instead of ready/valid/data, it's flat addr, rd_data, wr_data, we, re, etc. ports.
My suggestion is to figure out what sort of RAMs you want to use (e.g. openram, FPGA block RAM, or whatever), use the ram model for XLS simulation, but use the ram codegen flags + a top-level block (handwritten is probably fine if you're only managing a handful of RAMs) that stitches the chosen RAM and XLS block together.
Note that the user interface is kind of clunky and annoying, ideally I'd like to have something that fills the same role of an SDC as part of the XLS flow to make specifying these sorts of metadata easier than passing a bunch of flags around. For now it's manageable if you have a small number of RAMs.
Thanks,
Paul