用quartus2編寫的程式出現錯誤

時間 2021-05-02 11:30:44

1樓:曦月李嬌

出現此錯誤一般有以下三種情況:

1.某一句**後面缺少「;」;

2.begin 和end不對應;

3.某乙個變數在always語句中等號的左邊卻沒有定義成reg型別。

2樓:

這樣的情況可能是由於你輸入法的緣故導致的...也就是符號的全形和半形...

3樓:匿名使用者

語法有問題,建議把問題**貼出來

4樓:

module shi(reset,d5,d6,dw_shi);

output d5,d6;

input reset,dw_shi;

reg[3:0] d5;

reg[1:0] d6;

reg[4:0] count;

always@(posedge reset or posedgedw_shi )

begin

if(reset)

begin

d5<=4'b0;

d6<=2'b0;

count<=5'b0;

endelse

begin

else if(count==5'd23)count=count+5'b1;

d5<=count%5'd10;

d6<=count/5'd10;

endendendmodule

error (10170): verilog hdl syntax error at verilog7.v(17) near text "else"; expecting "end"(大佬們能看看這是錯在哪了嗎?)

5樓:

這是**,有大神幫忙看一下問題出在**嗎?實在找不出來

library ieee;

use ieee.std_logic_1164. all;

ues ieee.std_logic_unsigned. all;

entity show is

port(

clk:in std_logic;

clk011hz£ºbuffer std_logic;

wei: out std_logic_vector(2 downto 0);

duan: out std_logic_vector(7 downto 0)

);end entity show;

architecture 1xf of show is

signal clt1£ºstd_logic;

signal cnt1:intger range 0 to 1000;

signal cnt2: intger range 0 to 500;

signal yima: std_logic_vector(3 downto 0);

signal count: std_logic_vector(1 downto 0);

begin

process(clk)

begin

if(clk¡¯event and clk=¡¯1¡¯)then

if(cnt1<1000)then cnt1<=cn1+1;

eles

cnt1<=0;clk1<=not clk1;

if count>¡±10¡±then

count<=¡¯00¡¯;

eles

eount<=count+1;

end if;

end if;

end if;

end process;

process(clk1)

begin

if(clk1¡¯event and clk1=¡¯1¡¯)then

if(cnt2<500)then cnt2<=cnt2+1;

eles

cnt2<=0;clk01hz<=not clkj01hz;

end if;

end if;

end process;

process(count,date,yima)

begin

case count is

when ¡°00¡±=>yima<=date(3 downto 0);wei<=¡±001¡±;--1

case yima is

when¡±0000¡±=>duan<=¡°11000000¡±£»--0

when¡±0001¡±=>duan<=¡°11111001¡±£»--1

when¡±0010¡±=>duan<=¡°10100100¡±£»--2

when¡±0011¡±=>duan<=¡°10110000¡±£»--3

when¡±0100¡±=>duan<=¡°10011001¡±£»--4

when¡±0101¡±=>duan<=¡°10010010¡±£»--5

when¡±0110¡±=>duan<=¡°11000010¡±£»--6

when¡±0111¡±=>duan<=¡°11111000¡±£»--7

when¡±1000¡±=>duan<=¡°10000000¡±£»--8

when¡±1001¡±=>duan<=¡°10010000¡±£»--9

when others=>duan <=¡±11111111¡±;

end case;

when ¡°01¡±=>yima<=date(7 downto 4)£»wei<=¡±010¡±;

case yima is

when¡±0000¡±=>duan<=¡°01000000¡±£»--0

when¡±0001¡±=>duan<=¡°01111001¡±£»--1

when¡±0010¡±=>duan<=¡°00100100¡±£»--2

when¡±0011¡±=>duan<=¡°00110000¡±£»--3

when¡±0100¡±=>duan<=¡°00011001¡±£»--4

when¡±0101¡±=>duan<=¡°00010010¡±£»--5

when¡±0110¡±=>duan<=¡°00000010¡±£»--6

when¡±0111¡±=>duan<=¡°01111000¡±£»--7

when¡±1000¡±=>duan<=¡°00000000¡±£»--8

when¡±1001¡±=>duan<=¡°00010000¡±£»--9

when others=>duan <=¡±01000000¡±;

end case;

when ¡°10¡±=>yima<=date(11 downto 8)£»wei<=¡±100¡±;

case yima is

when¡±0000¡±=>duan<=¡°11000000¡±£»--0

when¡±0001¡±=>duan<=¡°11111001¡±£»--1

when¡±0010¡±=>duan<=¡°10100100¡±£»--2

when¡±0011¡±=>duan<=¡°10110000¡±£»--3

when¡±0100¡±=>duan<=¡°10011001¡±£»--4

when¡±0101¡±=>duan<=¡°10010010¡±£»--5

when¡±0110¡±=>duan<=¡°11000010¡±£»--6

when¡±0111¡±=>duan<=¡°11111000¡±£»--7

when¡±1000¡±=>duan<=¡°10000000¡±£»--8

when¡±1001¡±=>duan<=¡°10010000¡±£»--9

when others=>duan <=¡±11111111¡±;

end case;

when others=>duan <=¡±11111111¡±;

end case;

end process;

end 1xf;

關於用quartus 2編寫verilog程式出現error (10170) 怎麼回事?大神們幫幫忙

6樓:匿名使用者

reg[6:0]m; begin 這個begin前面加always @(),括號裡面是敏感訊號列表,建議多看看verilog 語法書吧,這是最基本的。

滿意請採納

在Quartus 2裡面有D觸發器嗎

鄭浪啪 在quartus 2裡面是有d觸發器的。尋找方法 選擇insert symbol primitives storage dff,就能找到。quartus ii 是altera公司的綜合性cpld fpga開發軟體,原理圖 vhdl veriloghdl以及ahdl altera hardwa...

街頭籃球背2怎麼用,街頭籃球超級背2怎麼用的

預先判斷是必要的.背二出現時很明顯的會發現有個橫跳的預兆,如果當時對手正在用左 左或左 右時這個時間回停留的更長一些,在這個時機,站位合適用搶斷是可以直接把球拿過來的,如果這時來不及搶,就跟著他跳的同一方向跑你就不會倒了,等他落地再按s搶,成功的機率是很大的,就算沒有搶到,你只要跟著他的方向跑,你也...

用「2」怎樣變出「111」,用四個「2」怎樣變出「111」

用四個二的話,當然可以變出111了,可以用222,然後除以二就可以了 用四個 2 怎樣變出 111,像這個多減一半就變成三個1了,因為幾個二的話它的對稱一般就是11,所以除以2就可以了。用四個二怎樣變出三個一?四個2 2111。這個的話現在來說是沒有辦法進行的呀,畢竟你一共就4個2,如何相乘都不可能...