完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,
我无法合成LUT RAM(16深48位宽),而RAM则由寄存器构建。 经过实验,我发现我可以通过注释掉一些代码来获得LUT RAM综合,以帮助模拟。 在代码中我有两个块,一个用于模拟,一个用于实现。 使用哪个块依赖于if(SIM_ENB = TRUE / FALSE)生成语句。 唯一的区别是模拟代码在复位或启动时将内存初始化为零。 SIM_ENB是一个通用的布尔值。 当我设置SIM_ENB = FALSE时,我很惊讶它会影响合成方法,因为它不应该生成条件重置代码。 所以我的问题是: 1)为什么未使用和未生成的代码会影响我想要的代码? 这听起来像Xilinx综合中的“错误”吗? 2)是否有办法强制工具使用LUT RAM(或块RAM)而不是寄存器,或者如果不能这样做则使工具失败? 很抱歉,如果答案在论坛的其他地方或已经被询问过。 我搜索但没有发现任何类似的东西。 我现在通过评论模拟代码来解决这个问题。 关心所有人, 汤姆朗兹 这是代码 - - 用于存储过滤器旧输出值的RAM: - 使用RAM进行仿真:推断单个端口,异步读取,同步写入, - 包括用于仿真的自清除代码:如果在综合中启用,则将实现寄存器而不是RAM - 注释掉本节将正确合成LUT RAM。 SIM_RESULT_RAM:if(SIM_ENB = TRUE)生成 Proc_SIM_RESULT_RAM: 过程(MCLK) 变量STARTUP:boolean:= true; - 用于模拟的临时变量 开始 if(rising_edge(MCLK))然后 如果(STARTUP或RESET ='1')则 - 同步清除以初始化RAM内容 for i in 0 to(STAGE_NUM * CHANNELS-1)循环 - (模拟需要RAM清除) LPF_RAM(i)'0'); 结束循环; STARTUP:= FALSE; - 在声明阶段数据就绪信号时存储新的输出数据。 - 应该使用一些FPGA RAM。 elsif(STAGE_DRDY ='1')然后 LPF_RAM(to_integer(无符号(LPF_RAM_ADR))) |
|
相关推荐
13个回答
|
|
trounds写道:
感谢您及时的回复。 我只指定了一个初始条件,它是作为模拟的一部分生成的。 代码特定的合成没有初始条件。 为什么软件不知道这个? 您在此主题的第一篇文章中的代码看起来是正确的。 您确定在合成选项中正确设置了通用吗? 我假设SIM_ENB常量由实体的端口列表中的泛型设置,我进一步假设所讨论的实体不是FPGA设计的顶级。 您必须确保通用过滤器一直到层次结构的顶部,因此可以在综合和模拟选项中进行设置。 否则,工具将采用默认值(从您发布的代码中不清楚),老实说,我不知道在没有默认情况下会发生什么。 我的猜测是综合工具实际上使用的是SIM_RESULT_RAM。 值得一提的是:当你推断出一个内存时,模拟工具并不神奇地知道你的代码引用了一个特定的库元素。 它只是模拟您编码的内容。 最后,鲍勃对初始化器的建议应该是正确的。 所以类似于: type lutram_t是std_logic_vector的数组(0到15)(47 downto 0); signal lutram:lutram_t:=(others =>(others =>'0')); - signal addr:自然范围0到15; signal foo:std_logic_vector(47 downto 0); u_lutram:process(clk)是 开始 如果rising_edge(clk)那么 如果我们='1'那么 LUTRAM(地址) 万一; 万一; 结束过程u_lutram; 那个做得好。 ----------------------------是的,我这样做是为了谋生。 在原帖中查看解决方案 以上来自于谷歌翻译 以下为原文 trounds wrote:Your code in the first post in this thread looks correct. Are you sure you set the generic properly in the synthesis options? I assume that the SIM_ENB constant is set by a generic in the entity's port list, and I futher assume that the entity in question isn't the top level of the FPGA design. You have to make sure that the generic filters all the way up to the top of the hierarchy, so it can be set in the synthesis and simulation options. Otherwise, the tools will assume the default (which isn't clear from the code you posted) and honestly, I don't know what happens in absence of a default. My guess is that the synthesis tool is actually using the SIM_RESULT_RAM. And for what it's worth: when you infer a memory, the simulation tool doesn't magically know that your code refers to a specific library element. It just simulates exactly what you code. Finally, what Bob suggests about an initializer should be correct. So something like: type lutram_t is array (0 to 15) of std_logic_vector(47 downto 0); signal lutram : lutram_t := (others => (others => '0')); -- <<== this is the initializer signal addr : natural range 0 to 15; signal foo : std_logic_vector(47 downto 0); u_lutram : process (clk) is begin if rising_edge(clk) then if we = '1' then lutram(addr) <= foo; end if; end if; end process u_lutram; that oughta do it. ----------------------------Yes, I do this for a living.View solution in original post |
|
|
|
汤姆,
如果指定初始条件或需要复位,则不能使用LUTRAM(因为它没有复位/设置,并且在配置时始终从0开始)。 Austin Lesea主要工程师Xilinx San Jose 以上来自于谷歌翻译 以下为原文 Tom, If you specify an initial condition, or require a reset, LUTRAM can not be used (as it has no reset/set, and always starts out at 0's when configured). Austin Lesea Principal Engineer Xilinx San Jose |
|
|
|
感谢您及时的回复。
我只指定了一个初始条件,它是作为模拟的一部分生成的。 代码特定的合成没有初始条件。 为什么软件不知道这个? 以上来自于谷歌翻译 以下为原文 Thanks for the quick response. I only specify an initial condition with this is generated as part of simulation. There is no initial condition for the code specific to synthesis. Why doesn't the software know this? |
|
|
|
这并没有解决trounds的主要问题,但它确实清除了似乎是错误的表示,不应该让它站起来。
奥斯汀写道: 如果指定初始条件或需要复位,则不能使用LUTRAM(因为它没有复位/设置,并且在配置时始终从0开始)。 复位引脚确实会排除LUT-RAM,但指定初始条件应该不是障碍。 如果不是具有指定初始条件的LUT-RAM,那么FPGA设计中的所有逻辑LUT是什么? @trounds: 为了消除路径中的障碍,具有初始化状态(但没有归零功能)的16x48位分布式RAM是否满足综合和仿真要求,并可能帮助您继续设计? - 鲍勃埃尔金德 签名:新手的自述文件在这里:http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369总结:1。 阅读手册或用户指南。 你读过手册了吗? 你能找到手册吗?2。 搜索论坛(并搜索网页)以寻找类似的主题。 不要在多个论坛上发布相同的问题。 不要在别人的主题上发布新主题或问题,开始新的主题!5。 学生:复制代码与学习设计不同.6“它不起作用”不是一个可以回答的问题。 提供有用的详细信息(请与网页,数据表链接).7。 您的代码中的评论不需要支付额外费用。 我没有支付论坛帖子的费用。 如果我写一篇好文章,那么我一无所获。 以上来自于谷歌翻译 以下为原文 This doesn't address the primary problem for trounds, but it does clear up what appears to be a mistaken representation which should not be left to stand. Austin wrote: If you specify an initial condition, or require a reset, LUTRAM can not be used (as it has no reset/set, and always starts out at 0's when configured). A reset pin will indeed preclude LUT-RAM, but specifiying an initial condition should be no obstacle. What are all the logic LUTs in an FPGA design, if not LUT-RAM with a specified initial condition? @trounds: In the interest of removing a roadblock in your path, would a 16x48-bit distributed RAM with initialised state (but no reset-to-zero capability) satisfy both synthesis and simulation requirements, and possibly help you move forward with your design? -- Bob Elkind SIGNATURE: README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369 Summary: 1. Read the manual or user guide. Have you read the manual? Can you find the manual? 2. Search the forums (and search the web) for similar topics. 3. Do not post the same question on multiple forums. 4. Do not post a new topic or question on someone else's thread, start a new thread! 5. Students: Copying code is not the same as learning to design. 6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please). 7. You are not charged extra fees for comments in your code. 8. I am not paid for forum posts. If I write a good post, then I have been good for nothing. |
|
|
|
是的,这将满足两个条件。
我只需要某种初始状态进行模拟。 我不关心状态在合成中是什么,因为我使用它进行低通滤波,它最终将在现实世界的应用程序中清空。 当我设置SIM_ENB = FALSE时,我很惊讶工具正在查看与模拟相关的代码。 我本以为会忽视它。 我在这个FPGA中有相当多的滤波器,纠正这个问题使我对XC6SLX45的利用率从73%降低到31%。 我使用的是Webpack工具的13.3版。 我以前忽略了这一点。 我知道13.4已经出局但我尚未升级。 以上来自于谷歌翻译 以下为原文 Yes that would satisfy both conditions. I only need some sort of initial state for simulation. I don't care what the states are in synthesis since I'm using this for low pass filtering and it will eventually flush out in the real world application. I'm just surprised that the tools are looking at the code related to simulation when I set SIM_ENB = FALSE. I would have thought it would disregard it. I have quite a few filters in this FPGA and correcting this problem reduced my utilization of an XC6SLX45 from 73% down to 31%. I am using version 13.3 of the Webpack tools. I had neglected to mention that before. I know 13.4 is out but I haven't upgraded yet. |
|
|
|
我刚刚尝试去除模拟的RESET ='1'测试,并将变量留在STARTUP中。
它没有帮助。 可以肯定的是,我没有陷入困境。 我只是在报告它表现得不像我认为的那样。 我知道如何解决这个问题; 我已选择注释掉代码的模拟部分并添加一个断言语句,如果SIM_ENB = TRUE则会发出警告,所以我记得取消注释模拟代码。 我还可以从Coregen工具中专门实例化一个简单的RAM。 我更倾向于推断这种逻辑对于未来的变化尽可能灵活。 以上来自于谷歌翻译 以下为原文 I have just tried getting rid of the RESET = '1' test for simulation and left in the variable for STARTUP. It didn't help. To be sure, I'm not stuck. I'm just reporting that it isn't behaving like I think it should. I know how to get around this problem; I have chosen to comment out the simulation section of code and add in an assert statement that warns me if SIM_ENB = TRUE so I remember to uncomment the code for simulation. I could also specifically instantiate a simple RAM from the Coregen tool. I prefer to infer this logic to be as flexible as possible for future changes. |
|
|
|
我只需要某种初始状态进行模拟。
初始状态要求已经满足,无需额外努力。 配置完成后,分布式RAM默认为包含零的所有位置。 对于分布式RAM的非零初始状态,您有(至少)三种选择: Distributed Memory Generator coregen向导会提示您输入.COE(系数)文件来定义初始内容。 使用稍微通用的HDL构造来推断RAM,结合用于指定RAM的初始内容和合成样式(例如分布式)的合成指令。 如果使用设备原语(例如Spartan-3E RAM16x2S原语),则可以使用.INIT属性在实例化原语的代码中在线指定初始内容。 ISE语言模板中的示例(单击ISE Navigator中的灯泡图标): RAM16X2S#(。INIT_00(16'h0000),// RAM的位0的初始内容.INIT_01(16'h0000)// RAM的第1位的初始内容)RAM16X2S_inst(.O0(O0),// RAM数据[ 0]输出.O1(O1),// RAM数据[1]输出.A0(A0),// RAM地址[0]输入.A1(A1),// RAM地址[1]输入.A2(A2) ,// RAM地址[2]输入.A3(A3),// RAM地址[3]输入.D0(D0),// RAM数据[0]输入.D1(D1),// RAM数据[1] 输入.WCLK(WCLK),//写时钟输入.WE(WE)//写使能输入); 参数RAM_WIDTH =; 参数RAM_ADDR_BITS =; (* RAM_STYLE =“{AUTO | DISTRIBUTED | PIPE_DISTRIBUTED}”*)reg [RAM_WIDTH-1:0] [(2 ** RAM_ADDR_BITS)-1:0]; 电线[RAM_WIDTH-1:0]; [RAM_ADDR_BITS-1:0]; [RAM_WIDTH-1:0]; 总是@(posedge)if()[]; assign = []; 进一步阅读:XST用户指南(UG627)的整个部分标题为初始化RAM编码示例。 - 鲍勃埃尔金德 签名:新手的自述文件在这里:http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369总结:1。 阅读手册或用户指南。 你读过手册了吗? 你能找到手册吗?2。 搜索论坛(并搜索网页)以寻找类似的主题。 不要在多个论坛上发布相同的问题。 不要在别人的主题上发布新主题或问题,开始新的主题!5。 学生:复制代码与学习设计不同.6“它不起作用”不是一个可以回答的问题。 提供有用的详细信息(请与网页,数据表链接).7。 您的代码中的评论不需要支付额外费用。 我没有支付论坛帖子的费用。 如果我写一篇好文章,那么我一无所获。 以上来自于谷歌翻译 以下为原文 I only need some sort of initial state for simulation. The initial state requirement is already met with no additional effort. A distributed RAM defaults to all locations containing zero after configuration is completed. For non-zero initial state of distributed RAM, you have (at least) three choices:
Examples from the ISE Language Templates (click on the light-bulb icon within ISE Navigator): RAM16X2S #( .INIT_00(16'h0000), // Initial contents of bit 0 of RAM .INIT_01(16'h0000) // Initial contents of bit 1 of RAM ) RAM16X2S_inst ( .O0(O0), // RAM data[0] output .O1(O1), // RAM data[1] output .A0(A0), // RAM address[0] input .A1(A1), // RAM address[1] input .A2(A2), // RAM address[2] input .A3(A3), // RAM address[3] input .D0(D0), // RAM data[0] input .D1(D1), // RAM data[1] input .WCLK(WCLK), // Write clock input .WE(WE) // Write enable input ); parameter RAM_WIDTH = parameter RAM_ADDR_BITS = (* RAM_STYLE="{AUTO | DISTRIBUTED | PIPE_DISTRIBUTED}" *) reg [RAM_WIDTH-1:0] wire [RAM_WIDTH-1:0] always @(posedge if ( assign Further reading: XST User Guide (UG627) has an entire section titled Initializing RAM Coding Examples. -- Bob Elkind SIGNATURE: README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369 Summary: 1. Read the manual or user guide. Have you read the manual? Can you find the manual? 2. Search the forums (and search the web) for similar topics. 3. Do not post the same question on multiple forums. 4. Do not post a new topic or question on someone else's thread, start a new thread! 5. Students: Copying code is not the same as learning to design. 6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please). 7. You are not charged extra fees for comments in your code. 8. I am not paid for forum posts. If I write a good post, then I have been good for nothing. |
|
|
|
是的,我同意,但模拟器似乎不知道零驱动器的初始/上电配置,因此它在RAM中给出了未定义的值,因此我无法模拟滤波器操作。
滤波器的新值基于先前的值(它是IIR滤波器),因此除非我强制模拟某个值,否则它永远不会消失。 以上来自于谷歌翻译 以下为原文 Yes, I agree, but the simulator doesn't seem to know about the initial/powerup configuration of zero states so it gives me undefined values in the RAM and so I cannot simulate the filter operation. The new values of the filter are based on previous values (it is an IIR filter) so it never settles out unless I force the simulation to some value. |
|
|
|
值得一提的是,以下快速实验成功合成了(ISE 13.4)带有24个Spartan-6 LUT的16x48单端口SRAM(每个LUT 2位,因为Spartan-6 LUT为64x1或32x2)。
模块s6_forum_top(输入inclk100m,输入[3:0] lut_addr,输入[47:0] lut_din,输入lut_we,输出[47:0] lut_dout);(* RAM_STYLE =“DISTRIBUTED”*)reg [47:0] forum_lutram [15:0]; //深16个字,48个数据位宽 initial begin forum_lutram [0] = 48'h0000_0000_0000; forum_lutram [1] = 48'h0001_0000_0001; forum_lutram [2] = 48'h0002_0000_0002; forum_lutram [3] = 48'h0003_0000_0003; forum_lutram [4] = 48'h0004_0000_0004; forum_lutram [5] = 48'h0005_0000_0005; forum_lutram [6] = 48'h0006_0000_0006; forum_lutram [7] = 48'h0007_0000_0007; forum_lutram [8] = 48'h0000_0008_0008; forum_lutram [9] = 48'h0000_0009_0009; forum_lutram [10] = 48'h0000_000A_000A; forum_lutram [11] = 48'h0000_000B_000B; forum_lutram [12] = 48'h0000_000C_000C; forum_lutram [13] = 48'h0000_000D_000D; forum_lutram [14] = 48'h0000_000E_000E; forum_lutram [15] = 48'h0000_000F_000F;结束 总是@(posedge inclk100m)如果(lut_we)forum_lutram [lut_addr]指定lut_dout = forum_lutram [lut_addr]; endmodule 我没有打扰内存字深度和数据宽度的参数,但这应该没问题。 - 鲍勃埃尔金德 签名:新手的自述文件在这里:http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369总结:1。 阅读手册或用户指南。 你读过手册了吗? 你能找到手册吗?2。 搜索论坛(并搜索网页)以寻找类似的主题。 不要在多个论坛上发布相同的问题。 不要在别人的主题上发布新主题或问题,开始新的主题!5。 学生:复制代码与学习设计不同.6“它不起作用”不是一个可以回答的问题。 提供有用的详细信息(请与网页,数据表链接).7。 您的代码中的评论不需要支付额外费用。 我没有支付论坛帖子的费用。 如果我写一篇好文章,那么我一无所获。 以上来自于谷歌翻译 以下为原文 For what it's worth, the following quick experiment successfully synthesised (ISE 13.4) a 16x48 single port SRAM with 24 Spartan-6 LUTs (2 bits per LUT, as Spartan-6 LUTs are either 64x1 or 32x2). module s6_forum_top ( input inclk100m, input [3:0] lut_addr, input [47:0] lut_din, input lut_we, output [47:0] lut_dout ); (* RAM_STYLE="DISTRIBUTED" *) reg [47:0] forum_lutram [15:0]; // 16 words deep, 48 data bits wide initial begin forum_lutram[0] = 48’h0000_0000_0000; forum_lutram[1] = 48’h0001_0000_0001; forum_lutram[2] = 48’h0002_0000_0002; forum_lutram[3] = 48’h0003_0000_0003; forum_lutram[4] = 48’h0004_0000_0004; forum_lutram[5] = 48’h0005_0000_0005; forum_lutram[6] = 48’h0006_0000_0006; forum_lutram[7] = 48’h0007_0000_0007; forum_lutram[8] = 48’h0000_0008_0008; forum_lutram[9] = 48’h0000_0009_0009; forum_lutram[10] = 48’h0000_000A_000A; forum_lutram[11] = 48’h0000_000B_000B; forum_lutram[12] = 48’h0000_000C_000C; forum_lutram[13] = 48’h0000_000D_000D; forum_lutram[14] = 48’h0000_000E_000E; forum_lutram[15] = 48’h0000_000F_000F; end always @(posedge inclk100m) if (lut_we) forum_lutram[lut_addr] <= lut_din; assign lut_dout = forum_lutram[lut_addr]; endmodule I didn't bother with parameters for memory word depth and data width, but this should be no problem. -- Bob Elkind SIGNATURE: README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369 Summary: 1. Read the manual or user guide. Have you read the manual? Can you find the manual? 2. Search the forums (and search the web) for similar topics. 3. Do not post the same question on multiple forums. 4. Do not post a new topic or question on someone else's thread, start a new thread! 5. Students: Copying code is not the same as learning to design. 6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please). 7. You are not charged extra fees for comments in your code. 8. I am not paid for forum posts. If I write a good post, then I have been good for nothing. |
|
|
|
是的,我同意,但模拟器似乎不知道零驱动器的初始/上电配置,因此它在RAM中给出了未定义的值,因此我无法模拟滤波器操作。
这似乎很奇怪。 您是否尝试过具有相同结果的行为和结构模拟模型? 只是猜测...... - 鲍勃埃尔金德 签名:新手的自述文件在这里:http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369总结:1。 阅读手册或用户指南。 你读过手册了吗? 你能找到手册吗?2。 搜索论坛(并搜索网页)以寻找类似的主题。 不要在多个论坛上发布相同的问题。 不要在别人的主题上发布新主题或问题,开始新的主题!5。 学生:复制代码与学习设计不同.6“它不起作用”不是一个可以回答的问题。 提供有用的详细信息(请与网页,数据表链接).7。 您的代码中的评论不需要支付额外费用。 我没有支付论坛帖子的费用。 如果我写一篇好文章,那么我一无所获。 以上来自于谷歌翻译 以下为原文 Yes, I agree, but the simulator doesn't seem to know about the initial/powerup configuration of zero states so it gives me undefined values in the RAM and so I cannot simulate the filter operation. This seems like odd behaviour. Have you tried both behavioural and structural simulation models with identical results? Just a wild guess.... -- Bob Elkind SIGNATURE: README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369 Summary: 1. Read the manual or user guide. Have you read the manual? Can you find the manual? 2. Search the forums (and search the web) for similar topics. 3. Do not post the same question on multiple forums. 4. Do not post a new topic or question on someone else's thread, start a new thread! 5. Students: Copying code is not the same as learning to design. 6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please). 7. You are not charged extra fees for comments in your code. 8. I am not paid for forum posts. If I write a good post, then I have been good for nothing. |
|
|
|
trounds写道:
感谢您及时的回复。 我只指定了一个初始条件,它是作为模拟的一部分生成的。 代码特定的合成没有初始条件。 为什么软件不知道这个? 您在此主题的第一篇文章中的代码看起来是正确的。 您确定在合成选项中正确设置了通用吗? 我假设SIM_ENB常量由实体的端口列表中的泛型设置,我进一步假设所讨论的实体不是FPGA设计的顶级。 您必须确保通用过滤器一直到层次结构的顶部,因此可以在综合和模拟选项中进行设置。 否则,工具将采用默认值(从您发布的代码中不清楚),老实说,我不知道在没有默认情况下会发生什么。 我的猜测是综合工具实际上使用的是SIM_RESULT_RAM。 值得一提的是:当你推断出一个内存时,模拟工具并不神奇地知道你的代码引用了一个特定的库元素。 它只是模拟您编码的内容。 最后,鲍勃对初始化器的建议应该是正确的。 所以类似于: type lutram_t是std_logic_vector的数组(0到15)(47 downto 0); signal lutram:lutram_t:=(others =>(others =>'0')); - signal addr:自然范围0到15; signal foo:std_logic_vector(47 downto 0); u_lutram:process(clk)是 开始 如果rising_edge(clk)那么 如果我们='1'那么 LUTRAM(地址) 万一; 万一; 结束过程u_lutram; 那个做得好。 ----------------------------是的,我这样做是为了谋生。 以上来自于谷歌翻译 以下为原文 trounds wrote:Your code in the first post in this thread looks correct. Are you sure you set the generic properly in the synthesis options? I assume that the SIM_ENB constant is set by a generic in the entity's port list, and I futher assume that the entity in question isn't the top level of the FPGA design. You have to make sure that the generic filters all the way up to the top of the hierarchy, so it can be set in the synthesis and simulation options. Otherwise, the tools will assume the default (which isn't clear from the code you posted) and honestly, I don't know what happens in absence of a default. My guess is that the synthesis tool is actually using the SIM_RESULT_RAM. And for what it's worth: when you infer a memory, the simulation tool doesn't magically know that your code refers to a specific library element. It just simulates exactly what you code. Finally, what Bob suggests about an initializer should be correct. So something like: type lutram_t is array (0 to 15) of std_logic_vector(47 downto 0); signal lutram : lutram_t := (others => (others => '0')); -- <<== this is the initializer signal addr : natural range 0 to 15; signal foo : std_logic_vector(47 downto 0); u_lutram : process (clk) is begin if rising_edge(clk) then if we = '1' then lutram(addr) <= foo; end if; end if; end process u_lutram; that oughta do it. ----------------------------Yes, I do this for a living. |
|
|
|
谢谢你们两个!我应该考虑正确设置初始化程序,而不是在我想模拟时编写specialVHDL代码。
这就像模拟和合成的魅力,我可以摆脱SIM_ENB泛型。 虽然我很惊讶,当SIM_ENB = FUE时,当SIM_ENB = TRUE时,包含少量将RAM初始化为0的行会影响合成代码。 我原以为它会完全被忽略。 这不是条件代码生成的全部意义吗? 顺便说一句,这是一个修辞问题,而索诺的回答是需要的。 干杯全都。 以上来自于谷歌翻译 以下为原文 Thank you both! I should have thought of setting the initializer properly instead of writing special VHDL code to do it when I wanted to simulate. That works like a charm for simulation and synthesis and I can get rid of the SIM_ENB generic. Though I am still surprised that the inclusion of the few lines that initialize the RAM to 0's when SIM_ENB=TRUE affects the synthesized code when SIM_ENB=FALSE. I would have thought it would be ignored entirely. Isn't that what conditional code generation is all about? BTW that's a rhetorical question so no answer is needed. Cheers all. |
|
|
|
trounds写道:
虽然我很惊讶,当SIM_ENB = FUE时,当SIM_ENB = TRUE时,包含少量将RAM初始化为0的行会影响合成代码。 我原以为它会完全被忽略。 这不是条件代码生成的全部意义吗? 顺便说一句,这是一个修辞问题,而索诺的回答是需要的。 我仍然认为SIM_ENB的设置方式不是你认为它应该是FALSE的情况。 检查综合报告。 ----------------------------是的,我这样做是为了谋生。 以上来自于谷歌翻译 以下为原文 trounds wrote: I still think the SIM_ENB isn't being set the way you think it is for the case where it's supposed to be FALSE. Check your synthesis reports. ----------------------------Yes, I do this for a living. |
|
|
|
只有小组成员才能发言,加入小组>>
2380 浏览 7 评论
2797 浏览 4 评论
Spartan 3-AN时钟和VHDL让ISE合成时出现错误该怎么办?
2262 浏览 9 评论
3335 浏览 0 评论
如何在RTL或xilinx spartan fpga的约束文件中插入1.56ns延迟缓冲区?
2428 浏览 15 评论
有输入,但是LVDS_25的FPGA内部接收不到数据,为什么?
756浏览 1评论
请问vc707的电源线是如何连接的,我这边可能出现了缺失元件的情况导致无法供电
545浏览 1评论
求一块XILINX开发板KC705,VC707,KC105和KCU1500
366浏览 1评论
1963浏览 0评论
682浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 19:59 , Processed in 1.566577 second(s), Total 101, Slave 84 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号