======================================== memory_bram - map memories to block rams ======================================== .. raw:: latex \begin{comment} .. cmd:def:: memory_bram :title: map memories to block rams .. code:: yoscrypt memory_bram -rules [selection] :: This pass converts the multi-port $mem memory cells into block ram instances. The given rules file describes the available resources and how they should be used. The rules file contains configuration options, a set of block ram description and a sequence of match rules. The option 'attr_icase' configures how attribute values are matched. The value 0 means case-sensitive, 1 means case-insensitive. A block ram description looks like this: bram RAMB1024X32 # name of BRAM cell init 1 # set to '1' if BRAM can be initialized abits 10 # number of address bits dbits 32 # number of data bits groups 2 # number of port groups ports 1 1 # number of ports in each group wrmode 1 0 # set to '1' if this groups is write ports enable 4 1 # number of enable bits transp 0 2 # transparent (for read ports) clocks 1 2 # clock configuration clkpol 2 2 # clock polarity configuration endbram For the option 'transp' the value 0 means non-transparent, 1 means transparent and a value greater than 1 means configurable. All groups with the same value greater than 1 share the same configuration bit. For the option 'clocks' the value 0 means non-clocked, and a value greater than 0 means clocked. All groups with the same value share the same clock signal. For the option 'clkpol' the value 0 means negative edge, 1 means positive edge and a value greater than 1 means configurable. All groups with the same value greater than 1 share the same configuration bit. Using the same bram name in different bram blocks will create different variants of the bram. Verilog configuration parameters for the bram are created as needed. It is also possible to create variants by repeating statements in the bram block and appending '@