VHDL错误:Error (10500): VHDL syntax error at adff.vhd(16) near text "process"; expecting "if"

VHDL错误:Error (10500): VHDL syntax error at adff.vhd(16) near text "process"; expecting "if";
Error (10500): VHDL syntax error at adff.vhd(18) near text "rtl"; expecting "if";
这是在写一个上升沿D触发器,代码如下:

LiBRARY iEEE;
USE ieee.STD_logic_1164.all;
ENTITY adff is
port(clk,d,r,s:in STD_login;
q:out STD_login);
end adff;
architecture rtl of adff is
signal q_temp,qb_temp :std_logic;
begin
process(clk,r,s)
begin
if(r='0' and s='1') then q_temp<='1';
else if (r='1' and s='0') then q_temp<='0';
else if (clk='1') then q_temp<= d;
end if;
end process;
q<=q_temp;
end rtl;

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
vhdl语言:如何将正弦信号的数字数据输入到wm8731并通过示波器测得正弦波?
* 我已经将正弦信号的数字部分编好 这部分代码有3个功能:1. 输出不同频率的信号 2.人为控制输出有限周期的信号 3.可以输出正弦波和三角波 详细问题:一个信号可以通过wm8731里的DA-转换器将数字信号转换成模拟信号,但是我怎么用vhdl语言去调用wm8731将并行的数字信号的数据输入到wm8731里面去 ``` entity generator_gai is port( clk,reset,zustand: in bit; --clk: 50MHz,PIN_L1; reset:SW9,PIN_L2; -- zustand: SW8,PIN_M1, Um zwischen die Sinussignal und Dreiecksignal zu wechseln. Zustand = 1: Dreiecksignal; Zustand = 0: Sinussignal; key: in bit_vector(3 downto 0); --Die Frequenz der Signal wird durch Switches von 0 bis 9999 Hz eingestellt. Spg: out integer range 256 downto 0; -- Spg: die Spannungswert der Signal Schalter: in bit_vector(7 downto 0); -- Die Zahl der Ausgabe der Signal wird durch Switches eingestellt. R: out bit; -- Ausgang der Rechtecksignal eine: out bit_vector(6 downto 0); -- Beispiel: 9876: za=6, zehn=7, hundert=8, tausend=9. Die 4 Ausgangen bedeuten, dass der Wert auf der 7-Segment dargestellt wird. zehn: out bit_vector(6 downto 0); hundert: out bit_vector(6 downto 0); tausend: out bit_vector(6 downto 0)); end generator_gai; architecture structure of generator_gai is signal cnt,cnt_folge,f_divide: integer range 50000000 downto 0; -- f_divide: frequenz-divide, Man möchte eine Frequenz bestimmen, muss man die Count beschränkt. signal f_divide_halbe: integer range 25000000 downto 0; signal sw0,sw1,sw2,sw3,sw4,sw5,sw6,sw7,sw_ges: integer range 512 downto 0; -- diese Parameter bedeuten den Wert der Schalter. a: die 1.Schalter und bedeutet 0 und 1. b: die 2.Schalter und bedeutet 0 und 2....... signal clk1,Swg_clk: bit;-- clk1:Frequenz der Signal. Swg_clk: wenn man möchte die Taste benutzen, muss man die Schwingung beseitigen. Deshalb kann man mit der Periode sichern, dass die Tastt schon gedrückt wird. signal Swg_cnt,Swg_cnt_folge: integer range 10000 downto 0; -- Count zum Vermeiden der Schwingung signal key0_count,key0_count_folge,key1_count,key1_count_folge,key2_count,key2_count_folge,key3_count,key3_count_folge,clk1_count: integer range 5000000 downto 0; signal clk1_count_folge: integer range 5000001 downto 0; signal eine1,zehn1,hundert1,tausend1: integer range 10 downto 0; -- Die Wert der Frequenz signal num,num_folge: integer range 255 downto 0;-- num: sie ist die Abszisse(X-wert). signal periode,periode_folge: integer range 0 to 255; -- Die Anzahl der Ausgabe des Signals signal key0,key0_folge: integer range 10 downto 0; -- Die Werte der Frequenz des Signals signal key1,key1_folge: integer range 100 downto 0; signal key2,key2_folge: integer range 1000 downto 0; signal key3,key3_folge,key_ges: integer range 10000 downto 0; begin Z_Speicher:process(clk) begin if reset = '1' then periode <= 1; elsif clk = '1' and clk'event then cnt <= cnt_folge; Swg_cnt <= Swg_cnt_folge; key0_count <= key0_count_folge; key1_count <= key1_count_folge; key2_count <= key2_count_folge; key3_count <= key3_count_folge; key0 <= key0_folge; key1 <= key1_folge; key2 <= key2_folge; key3 <= key3_folge; clk1_count <= clk1_count_folge; periode <= periode_folge; end if; if reset = '1' then num <= 255; elsif clk1 = '1' and clk1'event then num <= num_folge; end if; end process Z_Speicher; UE_SN:process(cnt,Swg_clk,key,reset) begin if cnt >= f_divide then cnt_folge <= 0; else cnt_folge <= cnt + 1; end if; if Schalter(0) = '1' then sw0 <= 1; else sw0 <= 0; end if; if Schalter(1) = '1' then sw1 <= 2; else sw1 <= 0; end if; if Schalter(2) = '1' then sw2 <= 4; else sw2 <= 0; end if; if Schalter(3) = '1' then sw3 <= 8; else sw3 <= 0; end if; if Schalter(4) = '1' then sw4 <= 16; else sw4 <= 0; end if; if Schalter(5) = '1' then sw5 <= 32; else sw5 <= 0; end if; if Schalter(6) = '1' then sw6 <= 64; else sw6 <= 0; end if; if Schalter(7) = '1' then sw7 <= 128; else sw7 <= 0; end if; sw_ges <= sw0 + sw1 + sw2 + sw3 + sw4 + sw5 + sw6 + sw7; if Swg_cnt >= 10000 then -- Festfrequenz 5kHz: 200us; Swg_cnt_folge <= 0; else Swg_cnt_folge <= Swg_cnt + 1; end if; if reset = '1' then key0_folge <= 0; key1_folge <= 0; key2_folge <= 0; key3_folge <= 0; elsif clk = '1' and clk'event then if clk1 = '1' then clk1_count_folge <= clk1_count + 1; -- Das Signal kommt viele Peak auf dem Anfangsplatz aus. Deshalb muss man diese Peak vermeiden. else if clk1_count > 20 then clk1_count_folge <= 0; if num >= 255 then periode_folge <= periode + 1; if sw_ges = 128 then -- Wenn SW7(Schalter(7)) = 1, dann läuft das Signal immer. num_folge <= 0; else if sw_ges >= periode then num_folge <= 0; else num_folge <= 255; periode_folge <= sw_ges + 1; end if; end if; else num_folge <= num + 1; end if; else clk1_count_folge <= 0; end if; end if; if key(0) = '0' then key0_count_folge <= key0_count + 1; else if key0_count > 500000 then -- Wenn man ein Key drücken, soll man die Schwingung vermeiden. key0_count_folge <= 0; if key0 < 9 then key0_folge <= key0 + 1; else key0_folge <= 0; end if; else key0_count_folge <= 0; end if; end if; if key(1) = '0' then key1_count_folge <= key1_count + 1; else if key1_count > 500000 then key1_count_folge <= 0; if key1 < 90 then key1_folge <= key1 + 10; else key1_folge <= 0; end if; else key1_count_folge <= 0; end if; end if; if key(2) = '0' then key2_count_folge <= key2_count + 1; else if key2_count > 500000 then key2_count_folge <= 0; if key2 < 900 then key2_folge <= key2 + 100; else key2_folge <= 0; end if; else key2_count_folge <= 0; end if; end if; if key(3) = '0' then key3_count_folge <= key3_count + 1; else if key3_count > 500000 then key3_count_folge <= 0; if key3 < 9000 then key3_folge <= key3 + 1000; else key3_folge <= 0; end if; else key3_count_folge <= 0; end if; end if; end if; if key0 = 0 and key1 = 0 and key2 = 0 and key3 = 0 then f_divide <= 0; else f_divide <= 50000000/(key0 + key1 + key2 + key3); end if; eine1 <= key0; zehn1 <= key1/10; hundert1 <= key2/100; tausend1 <= key3/1000; end process UE_SN; AUS_SN:process(eine1,zehn1,hundert1,tausend1,cnt) begin case eine1 is when 0 => eine <= "1000000"; -- Die Binärcode des Nummer für 7-Segment when 1 => eine <= "1111001"; when 2 => eine <= "0100100"; when 3 => eine <= "0110000"; when 4 => eine <= "0011001"; when 5 => eine <= "0010010"; when 6 => eine <= "0000011"; when 7 => eine <= "1111000"; when 8 => eine <= "0000000"; when others => eine <= "0011000"; end case; case zehn1 is when 0 => zehn <= "1000000"; when 1 => zehn <= "1111001"; when 2 => zehn <= "0100100"; when 3 => zehn <= "0110000"; when 4 => zehn <= "0011001"; when 5 => zehn <= "0010010"; when 6 => zehn <= "0000011"; when 7 => zehn <= "1111000"; when 8 => zehn <= "0000000"; when others => zehn <= "0011000"; end case; case hundert1 is when 0 => hundert <= "1000000"; when 1 => hundert <= "1111001"; when 2 => hundert <= "0100100"; when 3 => hundert <= "0110000"; when 4 => hundert <= "0011001"; when 5 => hundert <= "0010010"; when 6 => hundert <= "0000011"; when 7 => hundert <= "1111000"; when 8 => hundert <= "0000000"; when others => hundert <= "0011000"; end case; case tausend1 is when 0 => tausend <= "1000000"; when 1 => tausend <= "1111001"; when 2 => tausend <= "0100100"; when 3 => tausend <= "0110000"; when 4 => tausend <= "0011001"; when 5 => tausend <= "0010010"; when 6 => tausend <= "0000011"; when 7 => tausend <= "1111000"; when 8 => tausend <= "0000000"; when others => tausend <= "0011000"; end case; if Swg_cnt >= 5000 then Swg_clk <= '1'; else Swg_clk <= '0'; end if; if cnt >= f_divide/2 then clk1 <= '1'; else clk1 <= '0'; end if; R <= clk1; if zustand = '1' then case num is when 0 => Spg <= 64; when 33 => Spg <= 97; when 66 => Spg <= 126; when 99 => Spg <= 93; when 1 => Spg <= 65; when 34 => Spg <= 98; when 67 => Spg <= 125; when 100 => Spg <= 92; when 2 => Spg <= 66; when 35 => Spg <= 99; when 68 => Spg <= 124; when 101 => Spg <= 91; when 3 => Spg <= 67; when 36 => Spg <= 100; when 69 => Spg <= 123; when 102 => Spg <= 90; when 4 => Spg <= 68; when 37 => Spg <= 101; when 70 => Spg <= 122; when 103 => Spg <= 89; when 5 => Spg <= 69; when 38 => Spg <= 102; when 71 => Spg <= 121; when 104 => Spg <= 88; when 6 => Spg <= 70; when 39 => Spg <= 103; when 72 => Spg <= 120; when 105 => Spg <= 87; when 7 => Spg <= 71; when 40 => Spg <= 104; when 73 => Spg <= 119; when 106 => Spg <= 86; when 8 => Spg <= 72; when 41 => Spg <= 105; when 74 => Spg <= 118; when 107 => Spg <= 85; when 9 => Spg <= 73; when 42 => Spg <= 106; when 75 => Spg <= 117; when 108 => Spg <= 84; when 10 => Spg <= 74; when 43 => Spg <= 107; when 76 => Spg <= 116; when 109 => Spg <= 83; when 11 => Spg <= 75; when 44 => Spg <= 108; when 77 => Spg <= 115; when 110 => Spg <= 82; when 12 => Spg <= 76; when 45 => Spg <= 109; when 78 => Spg <= 114; when 111 => Spg <= 81; when 13 => Spg <= 77; when 46 => Spg <= 110; when 79 => Spg <= 113; when 112 => Spg <= 80; when 14 => Spg <= 78; when 47 => Spg <= 111; when 80 => Spg <= 112; when 113 => Spg <= 79; when 15 => Spg <= 79; when 48 => Spg <= 112; when 81 => Spg <= 111; when 114 => Spg <= 78; when 16 => Spg <= 80; when 49 => Spg <= 113; when 82 => Spg <= 110; when 115 => Spg <= 77; when 17 => Spg <= 81; when 50 => Spg <= 114; when 83 => Spg <= 109; when 116 => Spg <= 76; when 18 => Spg <= 82; when 51 => Spg <= 115; when 84 => Spg <= 108; when 117 => Spg <= 75; when 19 => Spg <= 83; when 52 => Spg <= 116; when 85 => Spg <= 107; when 118 => Spg <= 74; when 20 => Spg <= 84; when 53 => Spg <= 117; when 86 => Spg <= 106; when 119 => Spg <= 73; when 21 => Spg <= 85; when 54 => Spg <= 118; when 87 => Spg <= 105; when 120 => Spg <= 72; when 22 => Spg <= 86; when 55 => Spg <= 119; when 88 => Spg <= 104; when 121 => Spg <= 71; when 23 => Spg <= 87; when 56 => Spg <= 120; when 89 => Spg <= 103; when 122 => Spg <= 70; when 24 => Spg <= 88; when 57 => Spg <= 121; when 90 => Spg <= 102; when 123 => Spg <= 69; when 25 => Spg <= 89; when 58 => Spg <= 122; when 91 => Spg <= 101; when 124 => Spg <= 68; when 26 => Spg <= 90; when 59 => Spg <= 123; when 92 => Spg <= 100; when 125 => Spg <= 67; when 27 => Spg <= 91; when 60 => Spg <= 124; when 93 => Spg <= 99; when 126 => Spg <= 66; when 28 => Spg <= 92; when 61 => Spg <= 125; when 94 => Spg <= 98; when 127 => Spg <= 65; when 29 => Spg <= 93; when 62 => Spg <= 126; when 95 => Spg <= 97; when 128 => Spg <= 64; when 30 => Spg <= 94; when 63 => Spg <= 127; when 96 => Spg <= 96; when 129 => Spg <= 63; when 31 => Spg <= 95; when 64 => Spg <= 128; when 97 => Spg <= 95; when 130 => Spg <= 62; when 32 => Spg <= 96; when 65 => Spg <= 127; when 98 => Spg <= 94; when 131 => Spg <= 61; when 132 => Spg <= 60; when 162 => Spg <= 30; when 192 => Spg <= 0; when 222 => Spg <= 30; when 133 => Spg <= 59; when 163 => Spg <= 29; when 193 => Spg <= 1; when 223 => Spg <= 31; when 134 => Spg <= 58; when 164 => Spg <= 28; when 194 => Spg <= 2; when 224 => Spg <= 32; when 135 => Spg <= 57; when 165 => Spg <= 27; when 195 => Spg <= 3; when 225 => Spg <= 33; when 136 => Spg <= 56; when 166 => Spg <= 26; when 196 => Spg <= 4; when 226 => Spg <= 34; when 137 => Spg <= 55; when 167 => Spg <= 25; when 197 => Spg <= 5; when 227 => Spg <= 35; when 138 => Spg <= 54; when 168 => Spg <= 24; when 198 => Spg <= 6; when 228 => Spg <= 36; when 139 => Spg <= 53; when 169 => Spg <= 23; when 199 => Spg <= 7; when 229 => Spg <= 37; when 140 => Spg <= 52; when 170 => Spg <= 22; when 200 => Spg <= 8; when 230 => Spg <= 38; when 141 => Spg <= 51; when 171 => Spg <= 21; when 201 => Spg <= 9; when 231 => Spg <= 39; when 142 => Spg <= 50; when 172 => Spg <= 20; when 202 => Spg <= 10; when 232 => Spg <= 40; when 143 => Spg <= 49; when 173 => Spg <= 19; when 203 => Spg <= 11; when 233 => Spg <= 41; when 144 => Spg <= 48; when 174 => Spg <= 18; when 204 => Spg <= 12; when 234 => Spg <= 42; when 145 => Spg <= 47; when 175 => Spg <= 17; when 205 => Spg <= 13; when 235 => Spg <= 43; when 146 => Spg <= 46; when 176 => Spg <= 16; when 206 => Spg <= 14; when 236 => Spg <= 44; when 147 => Spg <= 45; when 177 => Spg <= 15; when 207 => Spg <= 15; when 237 => Spg <= 45; when 148 => Spg <= 44; when 178 => Spg <= 14; when 208 => Spg <= 16; when 238 => Spg <= 46; when 149 => Spg <= 43; when 179 => Spg <= 13; when 209 => Spg <= 17; when 239 => Spg <= 47; when 150 => Spg <= 42; when 180 => Spg <= 12; when 210 => Spg <= 18; when 240 => Spg <= 48; when 151 => Spg <= 41; when 181 => Spg <= 11; when 211 => Spg <= 19; when 241 => Spg <= 49; when 152 => Spg <= 40; when 182 => Spg <= 10; when 212 => Spg <= 20; when 242 => Spg <= 50; when 153 => Spg <= 39; when 183 => Spg <= 9; when 213 => Spg <= 21; when 243 => Spg <= 51; when 154 => Spg <= 38; when 184 => Spg <= 8; when 214 => Spg <= 22; when 244 => Spg <= 52; when 155 => Spg <= 37; when 185 => Spg <= 7; when 215 => Spg <= 23; when 245 => Spg <= 53; when 156 => Spg <= 36; when 186 => Spg <= 6; when 216 => Spg <= 24; when 246 => Spg <= 54; when 157 => Spg <= 35; when 187 => Spg <= 5; when 217 => Spg <= 25; when 247 => Spg <= 55; when 158 => Spg <= 34; when 188 => Spg <= 4; when 218 => Spg <= 26; when 248 => Spg <= 56; when 159 => Spg <= 33; when 189 => Spg <= 3; when 219 => Spg <= 27; when 249 => Spg <= 57; when 160 => Spg <= 32; when 190 => Spg <= 2; when 220 => Spg <= 28; when 250 => Spg <= 58; when 161 => Spg <= 31; when 191 => Spg <= 1; when 221 => Spg <= 29; when 251 => Spg <= 59; when 252 => Spg <= 60; when 253 => Spg <= 61; when 254 => Spg <= 62; when 255 => Spg <= 63; end case; elsif zustand = '0' then case num is when 0 => Spg <= 128; when 33 => Spg <= 221; when 66 => Spg <= 256; when 99 => Spg <= 212; when 1 => Spg <= 131; when 34 => Spg <= 223; when 67 => Spg <= 256; when 100 => Spg <= 209; when 2 => Spg <= 134; when 35 => Spg <= 225; when 68 => Spg <= 255; when 101 => Spg <= 207; when 3 => Spg <= 137; when 36 => Spg <= 227; when 69 => Spg <= 255; when 102 => Spg <= 204; when 4 => Spg <= 141; when 37 => Spg <= 229; when 70 => Spg <= 255; when 103 => Spg <= 202; when 5 => Spg <= 144; when 38 => Spg <= 231; when 71 => Spg <= 254; when 104 => Spg <= 199; when 6 => Spg <= 147; when 39 => Spg <= 233; when 72 => Spg <= 254; when 105 => Spg <= 196; when 7 => Spg <= 150; when 40 => Spg <= 234; when 73 => Spg <= 253; when 106 => Spg <= 194; when 8 => Spg <= 153; when 41 => Spg <= 236; when 74 => Spg <= 252; when 107 => Spg <= 191; when 9 => Spg <= 156; when 42 => Spg <= 238; when 75 => Spg <= 251; when 108 => Spg <= 188; when 10 => Spg <= 159; when 43 => Spg <= 239; when 76 => Spg <= 250; when 109 => Spg <= 186; when 11 => Spg <= 162; when 44 => Spg <= 241; when 77 => Spg <= 250; when 110 => Spg <= 183; when 12 => Spg <= 165; when 45 => Spg <= 242; when 78 => Spg <= 249; when 111 => Spg <= 180; when 13 => Spg <= 168; when 46 => Spg <= 244; when 79 => Spg <= 247; when 112 => Spg <= 177; when 14 => Spg <= 171; when 47 => Spg <= 245; when 80 => Spg <= 246; when 113 => Spg <= 174; when 15 => Spg <= 174; when 48 => Spg <= 246; when 81 => Spg <= 245; when 114 => Spg <= 171; when 16 => Spg <= 177; when 49 => Spg <= 247; when 82 => Spg <= 244; when 115 => Spg <= 168; when 17 => Spg <= 180; when 50 => Spg <= 249; when 83 => Spg <= 242; when 116 => Spg <= 165; when 18 => Spg <= 183; when 51 => Spg <= 250; when 84 => Spg <= 241; when 117 => Spg <= 162; when 19 => Spg <= 186; when 52 => Spg <= 250; when 85 => Spg <= 239; when 118 => Spg <= 159; when 20 => Spg <= 188; when 53 => Spg <= 251; when 86 => Spg <= 238; when 119 => Spg <= 156; when 21 => Spg <= 191; when 54 => Spg <= 252; when 87 => Spg <= 236; when 120 => Spg <= 153; when 22 => Spg <= 194; when 55 => Spg <= 253; when 88 => Spg <= 234; when 121 => Spg <= 150; when 23 => Spg <= 196; when 56 => Spg <= 254; when 89 => Spg <= 233; when 122 => Spg <= 147; when 24 => Spg <= 199; when 57 => Spg <= 254; when 90 => Spg <= 231; when 123 => Spg <= 144; when 25 => Spg <= 202; when 58 => Spg <= 255; when 91 => Spg <= 229; when 124 => Spg <= 141; when 26 => Spg <= 204; when 59 => Spg <= 255; when 92 => Spg <= 227; when 125 => Spg <= 137; when 27 => Spg <= 207; when 60 => Spg <= 255; when 93 => Spg <= 225; when 126 => Spg <= 134; when 28 => Spg <= 209; when 61 => Spg <= 256; when 94 => Spg <= 223; when 127 => Spg <= 131; when 29 => Spg <= 212; when 62 => Spg <= 256; when 95 => Spg <= 221; when 128 => Spg <= 128; when 30 => Spg <= 214; when 63 => Spg <= 256; when 96 => Spg <= 219; when 129 => Spg <= 125; when 31 => Spg <= 216; when 64 => Spg <= 256; when 97 => Spg <= 216; when 130 => Spg <= 122; when 32 => Spg <= 219; when 65 => Spg <= 256; when 98 => Spg <= 214; when 131 => Spg <= 119; when 132 => Spg <= 115; when 162 => Spg <= 33; when 192 => Spg <= 0; when 222 => Spg <= 33; when 133 => Spg <= 112; when 163 => Spg <= 31; when 193 => Spg <= 0; when 223 => Spg <= 35; when 134 => Spg <= 109; when 164 => Spg <= 29; when 194 => Spg <= 0; when 224 => Spg <= 37; when 135 => Spg <= 106; when 165 => Spg <= 27; when 195 => Spg <= 0; when 225 => Spg <= 40; when 136 => Spg <= 103; when 166 => Spg <= 25; when 196 => Spg <= 1; when 226 => Spg <= 42; when 137 => Spg <= 100; when 167 => Spg <= 23; when 197 => Spg <= 1; when 227 => Spg <= 44; when 138 => Spg <= 97; when 168 => Spg <= 22; when 198 => Spg <= 1; when 228 => Spg <= 47; when 139 => Spg <= 94; when 169 => Spg <= 20; when 199 => Spg <= 2; when 229 => Spg <= 49; when 140 => Spg <= 91; when 170 => Spg <= 18; when 200 => Spg <= 2; when 230 => Spg <= 52; when 141 => Spg <= 88; when 171 => Spg <= 17; when 201 => Spg <= 3; when 231 => Spg <= 54; when 142 => Spg <= 85; when 172 => Spg <= 15; when 202 => Spg <= 4; when 232 => Spg <= 57; when 143 => Spg <= 82; when 173 => Spg <= 14; when 203 => Spg <= 5; when 233 => Spg <= 60; when 144 => Spg <= 79; when 174 => Spg <= 12; when 204 => Spg <= 6; when 234 => Spg <= 62; when 145 => Spg <= 76; when 175 => Spg <= 11; when 205 => Spg <= 6; when 235 => Spg <= 65; when 146 => Spg <= 73; when 176 => Spg <= 10; when 206 => Spg <= 7; when 236 => Spg <= 68; when 147 => Spg <= 70; when 177 => Spg <= 9; when 207 => Spg <= 9; when 237 => Spg <= 70; when 148 => Spg <= 68; when 178 => Spg <= 7; when 208 => Spg <= 10; when 238 => Spg <= 73; when 149 => Spg <= 65; when 179 => Spg <= 6; when 209 => Spg <= 11; when 239 => Spg <= 76; when 150 => Spg <= 62; when 180 => Spg <= 6; when 210 => Spg <= 12; when 240 => Spg <= 79; when 151 => Spg <= 60; when 181 => Spg <= 5; when 211 => Spg <= 14; when 241 => Spg <= 82; when 152 => Spg <= 57; when 182 => Spg <= 4; when 212 => Spg <= 15; when 242 => Spg <= 85; when 153 => Spg <= 54; when 183 => Spg <= 3; when 213 => Spg <= 17; when 243 => Spg <= 88; when 154 => Spg <= 52; when 184 => Spg <= 2; when 214 => Spg <= 18; when 244 => Spg <= 91; when 155 => Spg <= 49; when 185 => Spg <= 2; when 215 => Spg <= 20; when 245 => Spg <= 94; when 156 => Spg <= 47; when 186 => Spg <= 1; when 216 => Spg <= 22; when 246 => Spg <= 97; when 157 => Spg <= 44; when 187 => Spg <= 1; when 217 => Spg <= 23; when 247 => Spg <= 100; when 158 => Spg <= 42; when 188 => Spg <= 1; when 218 => Spg <= 25; when 248 => Spg <= 103; when 159 => Spg <= 40; when 189 => Spg <= 0; when 219 => Spg <= 27; when 249 => Spg <= 106; when 160 => Spg <= 37; when 190 => Spg <= 0; when 220 => Spg <= 29; when 250 => Spg <= 109; when 161 => Spg <= 35; when 191 => Spg <= 0; when 221 => Spg <= 31; when 251 => Spg <= 112; when 252 => Spg <= 115; when 253 => Spg <= 119; when 254 => Spg <= 122; when 255 => Spg <= 128; end case; end if; end process AUS_SN; end structure; ```
基于VHDL语言 quartus2 9仿真时赋值了,但没有波形结果出来
![图片说明](https://img-ask.csdn.net/upload/202001/04/1578119543_34448.png)![图片说明](https://img-ask.csdn.net/upload/202001/04/1578119565_104409.png) 实现周期、占空比均可调的脉冲发生器。 (1)采用 1khz 的工作时钟; (2)脉冲周期 0.5s~6s,占空比 10%~90%; (3)可初始化:周期 2.5s,占空比 50% 但我改了 Time Period,Time offset,Duty cycle, period 1 ms;Offset 0; Duty cycle 50 也把end time改为了50ms 也试过把setting 里改了functional 还是没有结果
Quartus II做四位全加器的时候 整体编译通过但波形仿真报error
用顶层原理图 底层VHDL写的四位全加器 编译都通过了但最后波形仿真的时候报错 ![图片说明](https://img-ask.csdn.net/upload/201912/07/1575705049_543652.jpg) 看不懂这个报错是啥意思![图片说明](https://img-ask.csdn.net/upload/201912/07/1575705508_674152.png) 这是我的顶层原理图和底层一位全加器代码 是个新手 求大家救我 LIBRARY ieee; USE ieee.std_logic_1164.all; -- Entity Declaration ENTITY block_name IS -- {{ALTERA_IO_BEGIN}} DO NOT REMOVE THIS LINE! PORT ( a0 : IN STD_LOGIC; b0 : IN STD_LOGIC; ci : IN STD_LOGIC; s0 : OUT STD_LOGIC; c0 : OUT STD_LOGIC ); -- {{ALTERA_IO_END}} DO NOT REMOVE THIS LINE! END block_name;
VHDL在testbench里的二进制变量循环+1
1.VHDL 在testbench里一个三位的二进制数a <= "000",如何实现每隔一个50ns,a+1?也就是让a在 000 ,001,010,011,...,110,111,000这样循环变化。
求助,quartus ii 下vhdl编译问题,和错误原因
本人初学fpga,用quartus II 64,vhdl写的代码,不知道为什么一个简单的代码都编译不通过。 源代码: library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; ENTITY buzzer IS PORT ( clk : IN std_logic; dout : OUT std_logic); END buzzer; ARCHITECTURE arch OF buzzer IS SIGNAL num: std_logic_vector(31 downto 0); SIGNAL vet: std_logic := '0'; BEGIN PROCESS(clk) BEGIN IF(clk'event and clk ='1') THEN num <= num + 1; IF(num = 48000) THEN num <= "00000000000000000000000000000000"; vet <= vet XOR '1'; END IF; END IF; END PROCESS; dout <= vet; END arch; 不知道下列错误原因,求大佬给个解决办法, 错误: Internal Error: Sub-system: FSAC, File: /quartus/fitter/fsac/fsac_lvds_mgr.cpp, Line: 5347 m_util->m_max_non_serdes_ppds_datarate != DTM_ILLEGAL_DELAY Stack Trace: 0x8b10d: FSAC_LVDS_MGR::init_constant_information + 0xe7d (FITTER_FSAC) 0x8e029: FSAC_LVDS_MGR::FSAC_LVDS_MGR + 0x419 (FITTER_FSAC) 0x8e0ca: FSAC_LVDS_MGR::create_manager + 0x4a (FITTER_FSAC) 0x5c88: fcuda_execute + 0x14f8 (fitter_fcuda) 0x8d89: fcuda_execute + 0x45f9 (fitter_fcuda) 0x4509f: FITCC_EXPERT::fitter_preparation + 0x23f (FITTER_FITCC) 0x46ed7: FITCC_EXPERT::invoke_fitter + 0x427 (FITTER_FITCC) 0x497e: fcuda_execute + 0x1ee (fitter_fcuda) 0xb55d: fmain_start + 0x7cd (FITTER_FMAIN) 0x1264b: qexe_get_command_line + 0x1c5b (comp_qexe) 0x1588d: qexe_process_cmdline_arguments + 0x5ad (comp_qexe) 0x159a1: qexe_standard_main + 0xa1 (comp_qexe) 0x1a48: MSG_INITIALIZER::~MSG_INITIALIZER + 0x118 (CCL_MSG) 0x19ec: MSG_INITIALIZER::~MSG_INITIALIZER + 0xbc (CCL_MSG) 0x53e4: MEM_INITIALIZER::~MEM_INITIALIZER + 0x244 (ccl_mem) 0x3379f: msg_exe_main + 0x8f (CCL_MSG) 0x12773: BaseThreadInitThunk + 0x13 (KERNEL32) 0x70d50: RtlUserThreadStart + 0x20 (ntdll) End-trace Quartus II 64-Bit Version 11.1 Build 216 11/23/2011 SJ Full Version Service Pack Installed: 1
vhdl错误,急求帮忙看一下
错误是:syntax error:near text"end process ",expecting"if"自己没找到T。T 我就把结构体里面的贴出来,求帮忙 architecture behav of dianti is signal d11,d22,d33,d44,d55,d66: std_logic; signal c_u11,c_u22,c_u33,c_u44,c_u55: std_logic; signal c_d22,c_d33,c_d44,c_d55,c_d66: std_logic; signal q: integer range 0 to 1; signal q1: integer range 0 to 6; signal q2: integer range 0 to 9; signal dd,cc_u,cc_d,dd_cc: std_logic_vector(5 downto 0); signal opendoor: std_logic; signal updown: std_logic; signal en_up,en_dw: std_logic; begin process(clk) begin if clk'event and clk='1' then if clr='1' then q1<=0;q2<=0;wahaha<='0'; elsif full='1' then alarm<='1';q1<=0; if q1>=3 then door<="10"; else door<="00"; end if; elsif q=1 then q<=0;alarm<='0'; if q2=3 then wahaha<='1'; else if opendoor='1' then door<="10";q1<=0;q2<=0;up<='0';down<='0'; elsif en_up='1' then if deng='1' then door<="10";q1<=0;q2<=q2+1; elsif quick='1' then q1<=3; elsif q1>3 then door<="01";q1<=q1+1; elsif q1=6 then door<="00";updown<='1';up<='1'; else q1<=q1+1;door<="00"; end if; elsif en_dw='1' then if deng='1' then door<="10";q1<=0;q2<=q2+1; elsif quick='1' then q1<=3; elsif q1>3 then door<="01";q1<=q1+1; elsif q1=6 then door<="00";updown<='0';down<='1'; else q1<=q1+1;door<="00"; end if; end if; if g1='1' then led<="1001111"; if d11='1' or c_u11='1' then dll<='0';c_u11<='0';opendoor<='1'; elsif dd_cc>"00000001" then en_up<='1';en_dw<='0';openfoor<='0'; elsif dd_cc="00000000" then opendoor<='0'; end if; elsif g2='1' then led<="0010010"; if updown='1' then if d22='1' or c_u22='1' then d22<='0';c_u22<='0';opendoor<='1'; elsif dd_cc>"00000011" then en_up<='1';en_dw<='0';opendoor<='0'; elsif dd_cc<"00000010" then en_dw<='1';en_up<='0';opendoor<='0'; end if; elsif updown='0' then if d22='1' or c_d22='1' then d22<='0';c_d22<='0';opendoor<='1'; elsif dd_cc<"00000010" then en_dw<='1';en_up<='0';opendoor<='0'; elsif dd_cc>"00000011" then en_up<='1';en_dw<='0';opendoor<='0'; end if; elsif g3='1' then led<="0000110"; if updown='1' then if d33='1' or c_u33='1' then d33<='0';c_u33<='0';opendoor<='1'; elsif dd_cc>"00000111" then en_up<='1';en_dw<='0';opendoor<='0'; elsif dd_cc<"00000100" then en_dw<='1';en_up<='0';opendoor<='0'; end if; elsif updown='0' then if d33='1' or c_d33='1' then d33<='0';c_d33<='0';opendoor<='1'; elsif dd_cc<"00000100" then en_dw<='1';en_up<='0';opendoor<='0'; elsif dd_cc>"00000111" then en_up<='1';en_dw<='0';opendoor<='0'; end if; elsif g4='1' then led<="1001100"; if updown='1' then if d44='1' or c_u44='1' then d44<='0';c_u44<='0';opendoor<='1'; elsif dd_cc>"00001111" then en_up<='1';en_dw<='0';opendoor<='0'; elsif dd_cc<"00001000" then en_dw<='1';en_up<='0';opendoor<='0'; end if; elsif updown='0' then if d44='1' or c_d44='1' then d44<='0';c_d44<='0';opendoor<='1'; elsif dd_cc<"00001000" then en_dw<='1';en_up<='0';opendoor<='0'; elsif dd_cc>"00001111" then en_up<='1';en_dw<='0';opendoor<='0'; end if; elsif g5='1' then led<="0100100"; if updown='1' then if d55='1' or c_u55='1' then d55<='0';c_u55<='0';opendoor<='1'; elsif dd_cc>"00011111" then en_up<='1';en_dw<='0';opendoor<='0'; elsif dd_cc<"00010000" then en_dw<='1';en_up<='0';opendoor<='0'; end if; elsif updown='0' then if d55='1' or c_d55='1' then d55<='0';c_d55<='0';opendoor<='1'; elsif dd_cc<"00010000" then en_dw<='1';en_up<='0';opendoor<='0'; elsif dd_cc>"00011111" then en_up<='1';en_dw<='0';opendoor<='0'; end if; elsif g6='1' then led<="0100000"; if d66='1'or c_d66='1' then d66<='0';c_d66<='0';opendoor<='1'; elsif dd_cc<"10000000" then en_dw<='1';en_up<='0';opendoor<='0'; end if; else en_up<='0';en_dw<='0'; end if; end if; else q<=1;alarm<='0'; if d1='1' then d11<=d1; elsif d2='1' then d22<=d2; elsif d3='1' then d33<=d3; elsif d4='1' then d44<=d4; elsif d5='1' then d55<=d5; elsif d6='1' then f66<=d6; end if; if c_u1='1' then c_u11<=c_u1; elsif c_u2='1' then c_u22<=c_u2; elsif c_u3='1' then c_u33<=c_u3; elsif c_u4='1' then c_u44<=c_u4; elsif c_u5='1' then c_u55<=c_u5; end if; if c_d2='1' then c_d22<=c_d2; elsif c_d3='1' then c_d33<=c_d3; elsif c_d4='1' then c_d44<=c_d4; elsif c_d5='1' then c_d55<=c_d5; elsif c_d6='1' then c_d66<=c_d6; end if; dd<=d66 & d55 & d44 & d33 & d22 & d11; cc_u<='0' & c_u55 & c_u44 & c_u33 & c_u22 & c_u11; cc_d<=c_d66 & c_d55 & c_d44 & c_d33 & c_d22 & '0'; dd_cc<= dd or cc_u or cc_d; end if; ud<=updown; led_d<=dd; led_c_u<=cc_u; led_c_d<=cc_d; end if; end process; end behav;
vhdl语言SIGNAL i : integer range 0 to 31;
如果有这样一个定义后面一直i++,加到31之后再加会怎么样,,一直i++会自动有从零开始循环吗
vhdl点阵只亮一个,无法扫描?
library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity ledlie is port (clk:in std_logic; hang: out std_logic_vector (15 downto 0); liem: out std_logic_vector (3 downto 0)); end ledlie; architecture behave of ledlie is begin process(clk) variable ql:std_logic_vector(3 downto 0); begin if rising_edge(clk) then if(ql="1111") then ql:="0000"; else ql := ql +1; end if; end if; liem <=ql; hang <="1011111111111111"; end process; end behave; 一段遍历扫描点阵的程序,liem为四 十六译码器输入端 控制点阵的列,程序想实现一行亮,但是只有一个亮,请大神帮忙。
VHDL语言中关于运算符
VHDL语言中fr_beyond/='1'表示什么意思,/=运算符在VHDL中是什么意思。
vhdl语言如何设计图像处理系统
要求:用vhdl语言设计一个图像处理系统,可完成以下功能1.嵌入功能:可将一幅256x256的彩色图像转为8位灰度图像,然后在该灰度图像的LSB比特面随机嵌入三个不同的二值序列;最后,将嵌入水印序列的灰度图像恢复为彩色图像。2.检测功能:输入任意彩色图像,可从对应灰度图像的LSB平面检测上述三个序列。3.三个序列为序列1:01101序列2:10101序列3:110014. 输入端口包括三个坐标值信号,分别作为三个序列嵌入的起始位置5. 建立序列检测状态机,实现图像中三个序列的检测。注:嵌入是指用指定的序列替代图像中原来的比特序列LSB平面是指8bit灰度图像每个像素的最低位比特构成的二值矩阵
求基于VHDL的16QAM调制解调设计代码?
VHDL小白一枚,急于课题,基于VHDL,用Quartus ‖仿真,希望有大佬能帮忙解决。感激不尽
VHDL 语言三位计数器
BCD计数器的设计 一、实验目的 1、掌握对时序电路进行设计。 2、设计一个计数范围为0~999的BCD计数器并在七段显示数码管上显示出来。 二、实验原理 一般情况可以采用加法计数器。加法计数器的动作是,每次时钟脉冲信号CLK的上升沿到来时,计数器会将计数值加1。作为计数器还应该由一个使能端EN和清零端CLR:当使能端EN为高电平“1”时,计数器开始计数;当使能端EN为低电平“0”时,计数器停止计数;清零端CLR一般由同步清零和异步清零两种,当清零端CLR为高电平“1”时有效;反之无效。 十进制计数器,当计数满“十”时,应该向高位进位,同时计数变为“0”。在7段显示数码管上显示计数还需要把BCD码转换成7段显示相对应的码,这就需要设计一个译码器。 三、实验内容 1、用VHDL语言编写一个BCD计数器并在七段显示数码管上显示的程序 2、锁定引脚并下载验证结果
Verilog VHDL排版插件
在vs中你粘贴一段c代码,它可以自动排版。那常用的编辑器如notepad++,ultra edit,vim有没有相应的排版插件对Verilog VHDL排版?
求一个vhdl语言写的键盘防抖程序
求一个vhdl写的epm1270144C5的4*4矩阵键盘防抖动程序啊 小女子必有重谢。没有c币(๑•ั็ω•็ั๑)
FPGA弹球显示 VHDL设计
设计一个游戏,用vhdl设计一个可以在vga上显示的弹球游戏,上面有一些彩条,下面一个滑块,一个小球碰到滑块弹起,消除上面的彩条!!!!!!求帮帮忙,有没有能写出程序的
VHDL多个数码管同时操控
用VHDL编程控制多个数码管,**比如这两个数码管显示可调数字,另两个数码管倒计时**,关于如何实现有个想法:先在全局用高频扫描所有数码管,每次只亮一个,然后在到了指定数码管位置时,再加上一个约束,强制使数码管其他熄灭,如此唯一得到想要的数字,之后依靠视觉暂离得到完整影像。 现在只是一个想法, 可不能确定实施起来效果,感觉显示会混乱,请问各位有什么更好的方法吗?谢谢
vhdl中buffer与inout的区别
library ieee; use ieee.numeric_bit.all; entity clock is port (clk, inch, incm, incha, incma, set_alarm, alarm_off:in bit; hours, ahours, minutes, aminutes, seconds: inout unsigned(7 downto 0); am_pm, aam_pm, ring: inout bit; alarm_set: inout bit); end clock; architecture clock1 of clock is component CTR_59 is port(clk, inc, reset:in bit;dout: out unsigned(7 downto 0); t59: out bit); end component; component CTR_12 IS port(clk, inc: in bit; dout: out unsigned(7 downto 0);am_pm: inout bit); end component; signal s59 , m59 , inchr , incmin ,c99 :bit; signal alarm_ring_time :integer range 0 to 50; signal div100:integer range 0 to 99; a begin sec1:ctr_59 port map(clk,c99,'0',seconds,s59); min1:ctr_59 port map(clk,incmin,'0',minutes,m59); hrs1:ctr_12 port map(clk,inchr,hours,am_pm); incmin<=(s59 and c99)or incm; inchr<=(m59 and s59 and c99)or inch; alarm_min:ctr_59 port map(clk,incma,'0',aminutes,open); alarm_hr:ctr_12 port map(clk,incha,ahours,aam_pm); c99<='1' when div100 =99 else '0'; process(clk) begin if clk'event and clk='1' then if c99='1' then div100<= 0; else div100<=div100+1; end if; if set_alarm='1' then alarm_set <=not alarm_set; end if; if ((minutes=aminutes)and(hours=ahours)and(am_pm=aam_pm))and seconds=0 and alarm_set='1' then ring<='1'; end if; if ring='1' and c99='1' then alarm_ring_time<=alarm_ring_time+1; end if; if alarm_ring_time=50 or alarm_off='1' then ring<='0';alarm_ring_time<=0; end if; end if; end process; end clock1; 这段程序出自数字系统设计与VHDL(第二版)385-386页,书上使用的是inout,但是我换成buffer仿真结果也没有区别,请问大家这里有必须要用inout的理由嘛?
基于vhdl的交通灯控制程序,需要管教配置图,
基于vhdl的交通灯控制程序,需要管教配置图,,能在实验箱上实现
求大神VHDL数字时钟设计 所有的源程序 编译和仿真
完成数字时钟的设计,要求该时钟具有下述功能: 1. 具有时,分,秒,计数显示功能,以24小时循环计时。 2. 具有清零,调节小时、分钟功能。 3. 具有整点报时功能,整点报时的同时LED灯花样显示。
相见恨晚的超实用网站
相见恨晚的超实用网站 持续更新中。。。
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 free -m 其中:m表示兆,也可以用g,注意都要小写 Men:表示物理内存统计 total:表示物理内存总数(total=used+free) use...
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
python 简易微信实现(注册登录+数据库存储+聊天+GUI+文件传输)
socket+tkinter详解+简易微信实现 历经多天的努力,查阅了许多大佬的博客后终于实现了一个简易的微信O(∩_∩)O~~ 简易数据库的实现 使用pands+CSV实现数据库框架搭建 import socket import threading from pandas import * import pymysql import csv # 创建DataFrame对象 # 存储用户数据的表(...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发...
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 演示地点演示 html代码如下` music 这个年纪 七月的风 音乐 ` 然后就是css`*{ margin: 0; padding: 0; text-decoration: none; list-...
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。
数据库优化 - SQL优化
以实际SQL入手,带你一步一步走上SQL优化之路!
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 cpp 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7 p...
通俗易懂地给女朋友讲:线程池的内部原理
餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
将代码部署服务器,每日早上定时获取到天气数据,并发送到邮箱。 也可以说是一个小型人工智障。 知识可以运用在不同地方,不一定非是天气预报。
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹...
面试官:你连RESTful都不知道我怎么敢要你?
干货,2019 RESTful最贱实践
刷了几千道算法题,这些我私藏的刷题网站都在这里了!
遥想当年,机缘巧合入了 ACM 的坑,周边巨擘林立,从此过上了"天天被虐似死狗"的生活… 然而我是谁,我可是死狗中的战斗鸡,智力不够那刷题来凑,开始了夜以继日哼哧哼哧刷题的日子,从此"读题与提交齐飞, AC 与 WA 一色 ",我惊喜的发现被题虐既刺激又有快感,那一刻我泪流满面。这么好的事儿作为一个正直的人绝不能自己独享,经过激烈的颅内斗争,我决定把我私藏的十几个 T 的,阿不,十几个刷题网...
JavaScript 为什么能活到现在?
作者 | 司徒正美 责编 |郭芮 出品 | CSDN(ID:CSDNnews) JavaScript能发展到现在的程度已经经历不少的坎坷,早产带来的某些缺陷是永久性的,因此浏览器才有禁用JavaScript的选项。甚至在jQuery时代有人问出这样的问题,jQuery与JavaScript哪个快?在Babel.js出来之前,发明一门全新的语言代码代替JavaScript...
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
Nginx 原理和架构
Nginx 是一个免费的,开源的,高性能的 HTTP 服务器和反向代理,以及 IMAP / POP3 代理服务器。Nginx 以其高性能,稳定性,丰富的功能,简单的配置和低资源消耗而闻名。 Nginx 的整体架构 Nginx 里有一个 master 进程和多个 worker 进程。master 进程并不处理网络请求,主要负责调度工作进程:加载配置、启动工作进程及非停升级。worker 进程负责处...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
Python 编程开发 实用经验和技巧
Python是一门很灵活的语言,也有很多实用的方法,有时候实现一个功能可以用多种方法实现,我这里总结了一些常用的方法和技巧,包括小数保留指定位小数、判断变量的数据类型、类方法@classmethod、制表符中文对齐、遍历字典、datetime.timedelta的使用等,会持续更新......
吐血推荐珍藏的Visual Studio Code插件
作为一名Java工程师,由于工作需要,最近一个月一直在写NodeJS,这种经历可以说是一部辛酸史了。好在有神器Visual Studio Code陪伴,让我的这段经历没有更加困难。眼看这段经历要告一段落了,今天就来给大家分享一下我常用的一些VSC的插件。 VSC的插件安装方法很简单,只需要点击左侧最下方的插件栏选项,然后就可以搜索你想要的插件了。 下面我们进入正题 Material Theme ...
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
开源并不是你认为的那些事
点击上方蓝字 关注我们开源之道导读所以 ————想要理清开源是什么?先要厘清开源不是什么,名正言顺是句中国的古代成语,概念本身的理解非常之重要。大部分生物多样性的起源,...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
Python 植物大战僵尸代码实现(2):植物卡片选择和种植
这篇文章要介绍的是: - 上方植物卡片栏的实现。 - 点击植物卡片,鼠标切换为植物图片。 - 鼠标移动时,判断当前在哪个方格中,并显示半透明的植物作为提示。
相关热词 c#委托 逆变与协变 c#新建一个项目 c#获取dll文件路径 c#子窗体调用主窗体事件 c# 拷贝目录 c# 调用cef 网页填表c#源代码 c#部署端口监听项目、 c#接口中的属性使用方法 c# 昨天
立即提问