完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
您好我试图在aspratan6中实现此代码我无法理解为什么它永远不会完成合成过程,我明白这是很多路由要完成但它甚至无法完成SYNTHESIS。
这个代码在isim上工作,它完全符合我的预期。我实例化的处理元素是一个8位XOR.entity dicionario isPort(sys_clk:在STD_LOGIC中; sys_rst:在STD_LOGIC中; word:在STD_LOGIC_VECTOR中) (7 downto 0); valid_word:在STD_LOGIC; symbol_out:out std_logic_vector(23 downto 0)); end dicionario;架构行为的dicionario istype arr是std_logic_vector的数组(0到2047)(7 downto 0);类型symbol_arr是数组 (0到255)std_logic_vector(7 downto 0);类型sm_t是(WAIT_START,COUNT_WORDS,PRIORITY_ENCODER); - sinais做dicionariosignal匹配:std_logic_vector(2047 downto 0);信号old_match:std_logic_vector(2047 downto 0);信号search_buff :std_logic_vector(2047 downto 0);信号lookahead_buff:std_logic_vector(63 downto 0);信号past_words:std_logic_vector(2047 downto 0);信号符号:std_logic_vector(23 downto 0);信号word_counter:自然范围0到2048;信号done_reg: std_logic;信号word_reg:std_logic_vecto r(7 downto 0);信号symbol_vector:symbol_arr;信号word_vector:arr;信号状态:sm_t;信号set_reg:std_logic;信号info_pack:std_logic_vector(31 downto 0);常数零:std_logic_vector(2047 downto 0):=(其他 =>'0');常量:std_logic_vector(2047 downto 0):=(其他=>'1'); COMPONENT processing_elementPORT(sys_clk:IN std_logic; sys_rst:IN std_logic; set:IN std_logic; x:IN std_logic_vector( 7 downto 0); y:IN std_logic_vector(7 downto 0); match:OUT std_logic); END COMPONENT; startsymbol_out processing_element_for:for 0 in 0到2047 generateInst_processing_element:processing_element PORT MAP(sys_clk => sys_clk,sys_rst => sys_rst,set => set_reg,x => word,y => word_vector(2047-i),match => match(2047-i)); end generate processing_element_for; process(sys_clk)beginif rising_edge(sys_clk)thenif sys_rst ='1'setset_reg done_reg symbol'0'); state old_match'0'); elsecase state iswhen WAIT_START => if valid_word ='1'soset_reg if((match / = zeroes)and(matc h / = 1))thenword_counter state end if; end if;当COUNT_WORDS => if valid_word ='1'soleword_counter end if; if match = zeroes thenset_reg symbol word_counter state elseold_match end if; end case; end if; end if; end 进程; - SHIFT REGISTERprocess(sys_clk)beginif rising_edge(sys_clk)thenif sys_rst ='1'henword_reg'0'); for 0 in 0 to 2047 loopword_vector(i)'0'); end loop; elseif valid_word ='1' thenword_reg word_vector(2047)for i in 0 to 2046 loopword_vector(2047-i-1)end loop; end if; end if; end if; end process; end Behavioral; 以上来自于谷歌翻译 以下为原文 Hello i am trying to implement this code in a spratan6 I can't understand why it never finishes the synthesis process, i do understand that it's a lot of routing to be done but it can't even finish SYNTHESIS. And this code does work at the isim, it does exactly what i expect it to do. The processing element which i am instantiating is an 8 bits XOR. entity dicionario is Port ( sys_clk : in STD_LOGIC; sys_rst : in STD_LOGIC; word : in STD_LOGIC_VECTOR(7 downto 0); valid_word : in STD_LOGIC; symbol_out : out std_logic_vector(23 downto 0) ); end dicionario; architecture Behavioral of dicionario is type arr is array(0 to 2047) of std_logic_vector(7 downto 0); type symbol_arr is array(0 to 255) of std_logic_vector(7 downto 0); type sm_t is (WAIT_START, COUNT_WORDS, PRIORITY_ENCODER); -- sinais do dicionario signal match : std_logic_vector(2047 downto 0); signal old_match : std_logic_vector(2047 downto 0); signal search_buff : std_logic_vector(2047 downto 0); signal lookahead_buff : std_logic_vector(63 downto 0); signal past_words : std_logic_vector(2047 downto 0); signal symbol : std_logic_vector(23 downto 0); signal word_counter : natural range 0 to 2048; signal done_reg : std_logic; signal word_reg : std_logic_vector(7 downto 0); signal symbol_vector : symbol_arr; signal word_vector : arr; signal state : sm_t; signal set_reg : std_logic; signal info_pack : std_logic_vector ( 31 downto 0); constant zeroes : std_logic_vector(2047 downto 0) := (others => '0'); constant ones : std_logic_vector(2047 downto 0) := (others => '1'); COMPONENT processing_element PORT( sys_clk : IN std_logic; sys_rst : IN std_logic; set : IN std_logic; x : IN std_logic_vector(7 downto 0); y : IN std_logic_vector(7 downto 0); match : OUT std_logic ); END COMPONENT; begin symbol_out <= symbol; processing_element_for: for I in 0 to 2047 generate Inst_processing_element : processing_element PORT MAP( sys_clk => sys_clk, sys_rst => sys_rst, set => set_reg, x => word, y => word_vector(2047-i), match => match(2047-i) ); end generate processing_element_for; process(sys_clk) begin if rising_edge(sys_clk) then if sys_rst = '1' then set_reg <= '1'; done_reg <= '0'; symbol <= (others => '0'); state <= WAIT_START; old_match <= ( others => '0'); else case state is when WAIT_START => if valid_word = '1' then set_reg <= '0'; if ((match /= zeroes) and (match /= ones)) then word_counter <= word_counter + 1; state <= COUNT_WORDS; end if; end if; when COUNT_WORDS => if valid_word = '1' then word_counter <= word_counter + 1; end if; if match = zeroes then set_reg <= '1'; symbol <= x"00" & std_logic_vector(to_unsigned(word_counter,16)); word_counter <= 0; state <= WAIT_START; else old_match <= match; end if; end case; end if; end if; end process; -- SHIFT REGISTER process(sys_clk) begin if rising_edge(sys_clk) then if sys_rst = '1' then word_reg <= (others => '0'); for i in 0 to 2047 loop word_vector(i) <= (others => '0'); end loop; else if valid_word = '1' then word_reg <= word; word_vector(2047) <= word_reg ; for i in 0 to 2046 loop word_vector(2047-i-1) <= word_vector(2047-i); end loop; end if; end if; end if; end process; end Behavioral; |
|
相关推荐
9个回答
|
|
嗨,
你用一个巨大的生成循环来进行合成,这不仅会进行大量的布线,而且还会产生大量的LUT,最后所有这些巨大的电路似乎都毫无意义。 实际上你输入一个字节“单词”并处理2048次eqaly并行。 所以你在一个时钟周期内得到2048个相同的结果。 我怀疑这是你的意图。 这个东西在模拟中很有用,但是你想要合成工具创建的硬件似乎仍然过于夸张。 你在S6系列中实际使用的是什么设备? 虽然我没有你的处理元件代码(或用于模拟的测试平台),但我已经制作了一些xoring PE并在我们的服务器(64GB RAM)上开始合成,并选择了最大的S6-FPGA。 基本的综合步骤进行得非常快,但优化需要一些时间...... (你的代码也存在一些问题,因为你的CASE没有其他内容而第三个状态丢失。我只是在其他人进行测试时。) 我让它运行到明天,并报告结果。 同时你可能想发布缺失的PE和tb源,所以我可以进行进一步的测试并看一下波形。 有一个很好的综合 Eilert 以上来自于谷歌翻译 以下为原文 Hi, you fed the synthesis with a huge generate loop, which not only does a lot of wiring but also creates a huge amount of LUTs and in the end all of this huge circuitry seems to be quite meaningless. Actually you input one byte "word" and process it 2048 times eqaly and parallel. so you get 2048 equal results within one clock cycle. I doubt that this is what you intended. That this thing works in the simulation is nice, still the hardware you want the synthesis tool to create seems to be ridiculously oversized. What device are you actually using from the S6 family? While I don't have your processing element code (or a testbench for simulation) I have made up some xoring PE and started a synthesis on our server (64GB RAM) with the largest S6-FPGA selected. Basic synthesis steps went through quite fast, but optimization takes some time now... (There also was some issue with your code, because your CASE does not have a when others in it and the third state is missing. I just put in the when others for a test.) I let it run until tomorrow and report back about the results. Meanwhile you may like to post the missing sources for PE and tb, so I can run further tests and take a look at the waveforms too. Have a nice synthesis Eilert |
|
|
|
你有任何错误吗?
合成期间的任何消息? 有综合报告吗? 你使用的设备尺寸是多少? 你有一些相当大的数组和向量,更不用说生成循环实例化2048个自定义组件。 问候, 霍华德 ----------“我们必须学会做的事情,我们从实践中学习。” - 亚里士多德 以上来自于谷歌翻译 以下为原文 Do you get any errors? Any messages during synthesis? Is there a synthesis report available? What size of device are you using? You've got some pretty sizeable arrays and vectors, not to mention a generate loop instantiating 2048 custom components. Regards, Howard ---------- "That which we must learn to do, we learn by doing." - Aristotle |
|
|
|
None
以上来自于谷歌翻译 以下为原文 Hi, synthesis finished quite soon. So I wonder what your PE looks like. Here's a snippet of the synthesis report: INFO:Xst:1799 - State priority_encoder is never reached in FSM Maybe your computer needs more RAM and slows down extremely because he's doing HDD memory swapping. Have a nice synthesis Eilert |
|
|
|
这是我的PE
-------------------------------------------------- ----------------------------------公司: - 工程师: - - 创建日期:15:19 :26 03/15/2013 - 设计名称: - 模块名称:processing_element - Behavioral - 项目名称: - 目标设备: - 工具版本: - 描述:----依赖关系:----修订版 : - 修订版0.01 - 文件创建 - 附加评论:------------------------------------- ----------------------------------------------- library IEEE; 使用IEEE.STD_LOGIC_1164.ALL; - 如果使用带有有符号或无符号值的算术函数,则取消注释以下库声明 - 使用IEEE.NUMERIC_STD.ALL; - 如果在此代码中实例化 - 任何Xilinx原语,则取消注释以下库声明.-- library UNISIM; - 使用UNISIM.VComponents.all; entity processing_element是Port(sys_clk:在STD_LOGIC中; sys_rst:在STD_LOGIC中; set:在STD_LOGIC中; x:在STD_LOGIC_VECTOR中(7 downto 0); y:在STD_LOGIC_VECTOR中(7 downto 0); match:out STD_LOGIC); end processing_element; 体系结构processing_element的行为是 类型sm_t是(CHECK_COMP,WAIT_COMP);信号match_reg:std_logic;信号状态:sm_t; 开始 匹配if((x = y))然后match_reg else match_reg end if; 如果set ='1'则match_reg结束if; 当WAIT_COMP =>状态结束时的状态; 万一; 万一; 结束过程; 结束行为; 以上来自于谷歌翻译 以下为原文 This is my PE ---------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 15:19:26 03/15/2013 -- Design Name: -- Module Name: processing_element - Behavioral -- Project Name: -- Target Devices: -- Tool versions: -- Description: -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; -- Uncomment the following library declaration if using -- arithmetic functions with Signed or Unsigned values --use IEEE.NUMERIC_STD.ALL; -- Uncomment the following library declaration if instantiating -- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity processing_element is Port ( sys_clk : in STD_LOGIC; sys_rst : in STD_LOGIC; set : in STD_LOGIC; x : in STD_LOGIC_VECTOR (7 downto 0); y : in STD_LOGIC_VECTOR (7 downto 0); match : out STD_LOGIC); end processing_element; architecture Behavioral of processing_element is type sm_t is (CHECK_COMP, WAIT_COMP); signal match_reg : std_logic; signal state : sm_t; begin match <= match_reg; process(sys_clk) begin if rising_edge(sys_clk) then if sys_rst = '1' then match_reg <= '1'; state <= CHECK_COMP; else case state is when CHECK_COMP => if ((x = y)) then match_reg <= '1'; else match_reg <= '0'; end if; if set = '1' then match_reg <= '1'; end if; state <= WAIT_COMP; when WAIT_COMP => state <= CHECK_COMP; end case; end if; end if; end process; end Behavioral; |
|
|
|
@Eilert
这是一篇基于文章的VLSI的Lempel-Ziv压缩算法。 我需要所有这些人在paralel中完成并与相同的输入进行比较,如果结果匹配,那么我移动所有reigsters并比较下一个以查看匹配是否仍然存在。 谢谢你的帮助:)让它继续嘿嘿 以上来自于谷歌翻译 以下为原文 @Eilert this is a Lempel–Ziv Compression algorithm for VLSI based on an article. I need all these guys to be done in paralel and comparing to the same input, if the result is a match then i shift all the reigsters and compare the next to see if the match remains. thank you for ur help :) keep it comming hehe |
|
|
|
|
|
|
|
我使用的是spartan6 16xt。
切片逻辑利用率: 切片寄存器数量:93296中的2个0% 切片LUT数量:46648中的5个0% 用作逻辑的数字:46648中的5%0% 切片逻辑分布: 使用的LUT触发器对的数量:7 使用未使用的触发器的数字:7个中的5个71% 未使用LUT的数量:7个中的2个28% 完全使用的LUT-FF对的数量:7个中的0个0% 唯一控制集的数量:1 当我选择我的PE作为顶级并编译设计时,这是我的报告 2048 * 2给了我4k寄存器和10k luts。 (因为我实例化这个单位2048次) 我真诚地不知道是什么杀了我的设计:(也许与2048位的比较? 以上来自于谷歌翻译 以下为原文 I am using a spartan6 16xt. Slice Logic Utilization: Number of Slice Registers: 2 out of 93296 0% Number of Slice LUTs: 5 out of 46648 0% Number used as Logic: 5 out of 46648 0%Slice Logic Distribution: Number of LUT Flip Flop pairs used: 7Number with an unused Flip Flop: 5 out of 7 71% Number with an unused LUT: 2 out of 7 28% Number of fully used LUT-FF pairs: 0 out of 7 0% Number of unique control sets: 1 This is my report when i select my PE as top and compile the design 2048 * 2 gives me 4k registers and 10k luts. (Since i am instantiating this unit 2048 times) I sincerely don't get what's killing my design :( maybe the comparasion with 2048 bits? |
|
|
|
嗨安德烈,
综合仍然在进行优化。 但是从控制台输出我可以复制宏统计: ================================================== ======================= 高级HDL综合报告 宏观统计 #Adders / Subtractors:1 12位加法器:1 #Registers:20513 人字拖:20513 #Comparators:2048 8位比较器相等:2048 #Multiplexers:8 1位2对1多路复用器:3 12位2对1多路复用器:5 #FSMs:1 如您所见,有2048个8位比较器,这与我在dummy-PE中放入的简单XOR不同。 所以这可能需要一些时间。 我将在周一回复,希望合成完成。 周末愉快 Eilert 以上来自于谷歌翻译 以下为原文 Hi Andre, The synthesis is still running the optimization. However from the console output I coud copy the Macro Statistics: =========================================================================Advanced HDL Synthesis ReportMacro Statistics# Adders/Subtractors : 1 12-bit adder : 1# Registers : 20513 Flip-Flops : 20513# Comparators : 2048 8-bit comparator equal : 2048# Multiplexers : 8 1-bit 2-to-1 multiplexer : 3 12-bit 2-to-1 multiplexer : 5# FSMs : 1 As you can see, there are 2048 8-bit comparators, which differs from the simple XORs I have put in my dummy-PE. So this can take some time. I will report back on Monday, hoping that the synthesis has finished then. Have a nice weekend Eilert |
|
|
|
谢谢Eilert,2048 8位比较器是硬件实现的大数字吗?
这不像8 xors? 以上来自于谷歌翻译 以下为原文 Thank you Eilert, is 2048 8 bit comparators a big number to implement in hardware? Isnt this like 8 xors? |
|
|
|
只有小组成员才能发言,加入小组>>
2380 浏览 7 评论
2797 浏览 4 评论
Spartan 3-AN时钟和VHDL让ISE合成时出现错误该怎么办?
2262 浏览 9 评论
3335 浏览 0 评论
如何在RTL或xilinx spartan fpga的约束文件中插入1.56ns延迟缓冲区?
2428 浏览 15 评论
有输入,但是LVDS_25的FPGA内部接收不到数据,为什么?
755浏览 1评论
请问vc707的电源线是如何连接的,我这边可能出现了缺失元件的情况导致无法供电
543浏览 1评论
求一块XILINX开发板KC705,VC707,KC105和KCU1500
365浏览 1评论
1961浏览 0评论
681浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 14:57 , Processed in 1.344565 second(s), Total 94, Slave 77 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号