当前位置:网站首页>The method of ram and ROM initialization in FPGA design

The method of ram and ROM initialization in FPGA design

2022-06-21 22:36:00 Jida qinshaoyou


FPGA In design RAM and ROM Used as a memory to store variable or immutable types of data , There are different initialization methods according to different usage scenarios .ROM Initialization is usually to load fixed data ,RAM It is declared as unsteady data by default , When initializing, the data can be all 1 Or all 0.

RAM Initialization method of

Method 1: small RAM When resetting, write the initial value according to the address

For small RAM You can directly write the initial value by address during reset , Examples are as follows .

always @(posedge Wr_clk or negedge rst_n)begin
    if (!rst_n) begin 
        Mem[0] <= 24'b0;
        Mem[1] <= 24'b0;
        Mem[2] <= 24'b0;
        Mem[3] <= 24'b0;
        Mem[4] 
原网站

版权声明
本文为[Jida qinshaoyou]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/172/202206212039544434.html