完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在寻找一个更好的,即更低的传播延迟,来做到这一点:
pixel_out px0到px31是4位整数(值0到15)。 我只需要第一个不为零的px值。 上面的代码有效,但超出了我的时间限制(出于显而易见的原因)。 我并不十分关心节省空间,因为我在FPGA中仍有足够的空间,即我宁愿拥有更快的电路来占用更多的空间。 在使用VHDL描述它们之前,我一直在尝试使用分立元件来研究我的电路,但是在这种情况下我无法想出一个电路,而且我不完全确定这个代码产生了什么。 32个比较器可以提供32比1多路复用器吗? 但是在那里有“其他”,我觉得如果不等待信号传播通过至少31个门,最终结果就无法解决? 我开始认为我需要一个优先电路来提供多路复用器或类似的东西,但我无法弄清楚逻辑。 任何见解将不胜感激。 谢谢, 马修 以上来自于谷歌翻译 以下为原文 I'm looking for a better, i.e. lower propagation delay, to do this: pixel_out <= px0 when px0 /= 0 else px1 when px1 /= 0 else px2 when px2 /= 0 else... px31 when px31 /= 0 else 0; px0 through px31 are 4-bit integers (values 0 to 15). I simply need the first px value that is not zero. The code above works, but is exceeding my timing constraint (for obvious reasons). I'm not terribly concerned with saving space, since I still have plenty of room in the FPGA, i.e. I'd rather have a faster circuit that takes up more room. Lately I've been trying to work out my circuits with discrete components before using VHDL to describe them, but in this case I can't come up with a circuit, and I'm not entirely sure what this code is generating. 32 comparators feeding into a 32-to-1 mux maybe? But with the "else" in there, I get the feeling that the end result cannot be resolved without waiting for a signal to propagate through at least 31 gates? I started thinking that I need a priority circuit to feed a mux or something like that, but I can't work out the logic. Any insight would be greatly appreciated. Thanks, Matthew |
|
相关推荐
3个回答
|
|
阅读XST用户指南,它包括为MUX,FSM,锁存器,寄存器等功能编写“样式”。
您可以从ISE Navigator帮助菜单访问XST用户指南。 - 鲍勃埃尔金德 签名:新手的自述文件在这里:http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369总结:1。 阅读手册或用户指南。 你读过手册了吗? 你能找到手册吗?2。 搜索论坛(并搜索网页)以寻找类似的主题。 不要在多个论坛上发布相同的问题。 不要在别人的主题上发布新主题或问题,开始新的主题!5。 学生:复制代码与学习设计不同.6“它不起作用”不是一个可以回答的问题。 提供有用的详细信息(请与网页,数据表链接).7。 您的代码中的评论不需要支付额外费用。 我没有支付论坛帖子的费用。 如果我写一篇好文章,那么我一无所获。 以上来自于谷歌翻译 以下为原文 Read the XST user guide, it includes coding "styles" for functions such as MUXes, FSMs, latches, registers, etc. You can access the XST user guide from the ISE Navigator HELP menu. -- 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. |
|
|
|
你需要优先考虑吗?
如果是这样,那么您的选择是有限的。 但是如果你能够容忍管道中的延迟,可以考虑创建一个由32个注册比较器组成的存储库,每个比较器对应一个pxX。 比较优先级编码器中的32个寄存器所需的逻辑比测试所有比较器要少得多。 ----------------------------是的,我这样做是为了谋生。 以上来自于谷歌翻译 以下为原文 Do you need the priority? If so, then your options are limited. But if you can tolerate the latency in a pipeline, consider creating a bank of 32 registered comparators, one for each of pxX. Comparing 32 registers in a priority encoder takes a lot less logic than testing all of the comparators. ----------------------------Yes, I do this for a living. |
|
|
|
pxX信号是当前x,y栅格位置的像素颜色索引。
每个pxX颜色来自“精灵”移位寄存器,精灵可以与最低精灵数最高的“分层”重叠。 因此,如果sprite0(px0)不是0,它的像素颜色将显示,如果它是0,那么如果它不是0,则可以显示下一个sprite的像素。因此,我认为我需要描述的电路涉及prioirty。 使用移位寄存器是我正在复制的原始电路如何工作,但它在水平线上只有4个可能的精灵,并且使用FPGA我可以完成所有32个。但是,解析精灵在给定的x,y处显示 我正在使用的VHDL正在导致约束问题。 我可以想到使用单个移位寄存器(并行工作)的唯一其他选择是使用行缓冲器并将像素信息从最高精灵覆盖到最低。 但是,我不确定这会更有效率吗? 我想这将是一个寄存器文件,如: signal pixel_buf:整数范围0到15的数组(0到384); 所以这样我就会在检索像素数据时解析像素选择,并在水平线的时间内对其进行传播。 但我也必须加倍缓冲,所以我可以填充一个缓冲区,同时显示另一个缓冲区。 马修 以上来自于谷歌翻译 以下为原文 The pxX signals are pixel color indexes for the current x,y raster location. Each pxX color is from a "sprite" shift register, and sprites can overlap with the "layering" going from lowest sprite number being the top-most. So if sprite0 (px0) is other than 0, its pixel color will show, if it is 0, then next sprite's pixel may be shown if it is not 0, etc. Thus, I think the circuit I need to describe involves prioirty. Using shift registers is how the original circuit that I'm reproducing worked, but it only had 4 possible sprites on a horizontal line, and with the FPGA I can do all 32. However, resolving the sprite to display at a given x,y with the VHDL I'm currently using is causing the constraint problem. The only other alternative I can think of to using individual shift registers (which work in parallel), would be to use a line buffer and overlay the pixel information from highest sprite to lowest. However, I'm not sure this would be any more efficient? I guess it would be a register file, something like: signal pixel_buf : is array (0 to 384) of integer range 0 to 15; So this way I would be resolving the pixel selection as the pixel data is retrieved, which spreads it over the time of a horizontal line. But I would have to double buffer too, so I could populate one buffer while displaying the other. Matthew |
|
|
|
只有小组成员才能发言,加入小组>>
2388 浏览 7 评论
2803 浏览 4 评论
Spartan 3-AN时钟和VHDL让ISE合成时出现错误该怎么办?
2270 浏览 9 评论
3338 浏览 0 评论
如何在RTL或xilinx spartan fpga的约束文件中插入1.56ns延迟缓冲区?
2438 浏览 15 评论
有输入,但是LVDS_25的FPGA内部接收不到数据,为什么?
767浏览 1评论
请问vc707的电源线是如何连接的,我这边可能出现了缺失元件的情况导致无法供电
551浏览 1评论
求一块XILINX开发板KC705,VC707,KC105和KCU1500
382浏览 1评论
1974浏览 0评论
691浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-28 03:56 , Processed in 1.256442 second(s), Total 52, Slave 45 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号