3f-macro macro= memory-compiler binding
Bind a reg memory to a specific memory-compiler macro; the
toolchain maps the inferred access ports onto the macro's pins instead of
emitting a behavioral array. No code handles the attribute today.
Failing example (pyrope → expected Verilog instance)
// ram_macro.prp
mod ram_macro(we:bool, waddr:u10, raddr:u10, din:u32) -> (q:u32@[0]) {
reg ram:[1024]u32:[macro="sram_32kx32"] = nil
if we { ram[waddr] = din }
q = ram[raddr]
}
// expected: the emitted netlist instantiates the macro instead of flops
module ram_macro(...);
sram_32kx32 ram_i(/* ports mapped by the toolchain */);
endmodule
Docs (TBD markers)
- docs/pyrope/08-memories.md — RTL instantiation section,
macroparagraph - docs/pyrope/15-tbd.md
Done when
Compiling the example emits a sram_32kx32 instance (blackbox
is fine; port-mapping rules need a small spec). Then drop the TBD note in
08-memories.