0
我正在嘗試爲Spartan-S6系列FPGA使用VHDL過程製作DNA閱讀器模塊。問題是我的代碼無法合成。它適用於模擬,但在綜合它只是stucks。我也搜索了關於不可合成的VHDL過程,但我認爲我做得很好,它必須合成得很好。 這裏是我的過程代碼:不可合成的VHDL代碼
FSMOutputController:process(state,readDnaCmd)
variable clkCounter :unsigned(7 downto 0) := "00000000";
begin
case state is
when zeroState =>
if readDnaCmd = '1' then
DNA_Read <= '1';
SR_read <= '0';
else
SR_read <= '1';
end if;
when initState =>
DNA_Read <= '0';
SR_read <= '1';
SR_clk <= DNA_CLK_temp;
DNA_Shift <= '1';
when endReadState =>
DNA_shift <= '0';
SR_read <= '0';
when readState =>
clkCounter := clkCounter + 1;
--clkCounter2 <= clkCounter2 + X"01";
SR_read <= '0';
end case;
end process FSMOutputController;
這裏是ISE的日誌的一部分時,試圖合成:
=========================================================================
* HDL Synthesis *
=========================================================================
Synthesizing Unit <testDNALock>.
Related source file is "C:\Projects\Anti clone S6\code\test1\DNATest\testDNALock.vhd".
WARNING:Xst:647 - Input <CLK_98MHz> is never used. This port will be preserved and left unconnected if it belongs to a top-level block or it belongs to a sub-block and the hierarchy of this sub-block is preserved.
WARNING:Xst:2935 - Signal 'DNAVerify', unconnected in block 'testDNALock', is tied to its initial value (0).
Summary:
no macro.
Unit <testDNALock> synthesized.
,它stucks剛剛在這裏不走了包含我DNALock文件我process.There是另一件事:當我註釋掉分配線將正確合成:
FSMOutputController:process(state,readDnaCmd)
variable clkCounter :unsigned(7 downto 0) := "00000000";
begin
case state is
when zeroState =>
if readDnaCmd = '1' then
--DNA_Read <= '1';
--SR_read <= '0';
else
--SR_read <= '1';
end if;
when initState =>
--DNA_Read <= '0';
--SR_read <= '1';
--SR_clk <= DNA_CLK_temp;
--DNA_Shift <= '1';
when endReadState =>
-- DNA_shift <= '0';
-- SR_read <= '0';
when readState =>
clkCounter := clkCounter + 1;
--clkCounter2 <= clkCounter2 + X"01";
-- SR_read <= '0';
end case;
end process FSMOutputController;
那麼報告將是:
=========================================================================
* Design Summary *
=========================================================================
Clock Information:
------------------
No clock signals found in this design
Asynchronous Control Signals Information:
----------------------------------------
No asynchronous control signals found in this design
Timing Summary:
---------------
Speed Grade: -3
Minimum period: No path found
Minimum input arrival time before clock: No path found
Maximum output required time after clock: No path found
Maximum combinational path delay: No path found
=========================================================================
Process "Synthesize - XST" completed successfully
顯然你不知道如何處理同步設計中的時鐘。恐怕,您最需要的是VHDL書籍或課程。與所有的編程語言一樣,如果不具備最低限度的相關知識,就不能編寫體面的VHDL代碼。所以在這裏幫不了忙。 –
雷諾:我知道它有一些重大的錯誤,我應該更多地瞭解它。關於VHDL書籍,我搜索了它,但我找不到一個好的。你能介紹一本書嗎? – reza
尋找「時鐘進程」,而不是閱讀和學習...該合成報告說,你有一個98兆赫的時鐘可用...使用它。 –