- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi,
I try to use a code but there are more WAIT. How can i change it ???? I change "wait until" to wait until Clk'event ????
StartTx <= '0';
DataToTx_M <= "0101010101010101";
DataToTx_S <= "1010101010101010";
--wait until Clk = '1';
wait until Clk'event and Clk='1';
reset <= '0';
--wait until Clk = '1';
wait until Clk'event and Clk='1';
StartTx <= '1';
wait until Clk = '1';
StartTx <= '0';
The error is Error (10398): VHDL Process Statement error at simpleSPI_M_S_tb.vhd(100): Process Statement must contain only one Wait Statement Thanks for your help Jennifer
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
The rule is correct - you can only have 1 wait statement in a process if you want to compile the code for an fpga.
Your code looks like software, not hardware. I highly recommend you find a VHDL tutorial or VHDL textbook that has digital logic examples. VHDL is a hardware description language, not a programming language. Have you drawn your circuit on paper (or visio or something) before you tried to write the code? as a description language, you need to know what you are describing first.- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
--- Quote Start --- The rule is correct - you can only have 1 wait statement in a process if you want to compile the code for an fpga. Your code looks like software, not hardware. I highly recommend you find a VHDL tutorial or VHDL textbook that has digital logic examples. VHDL is a hardware description language, not a programming language. Have you drawn your circuit on paper (or visio or something) before you tried to write the code? as a description language, you need to know what you are describing first. --- Quote End --- Thanks BUT it is a sample that find on web !!!!! How can i change this code ??? Best regards Jennifer
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
THis code sample you have found is probably from a testbench, where many wait statements are allowed and often required.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
--- Quote Start --- THis code sample you have found is probably from a testbench, where many wait statements are allowed and often required. --- Quote End --- Yes you are right, the name is "tb" I look for a SPI Master programme. Thanks Jennifer
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
When writing code for an FPGA it's best to avoid using wait, it will make code more difficult to read, and too tempting to put several of them, making it impossible for the software to synthesize. It's better to stick with the recommended template for a clocked process:<optional_label>:
process(reset, clk) is
-- Declaration(s)
begin
if(reset = '1') then
-- Asynchronous Sequential Statement(s)
elsif(rising_edge(clk)) then
-- Synchronous Sequential Statement(s)
end if;
end process;
