導航:首頁 > 編程語言 > eda程序設計

eda程序設計

發布時間:2024-01-22 12:53:19

① 求EDA用VHDL語言的程序設計,急急急!給高分!(要求在Quartus Ⅱ中完成一個正弦信號發生器,詳見提問)

在Quartus Ⅱ中完成一個正弦信號發生器的設計。系統可由五部分組成,如下圖所示:嵌入式鎖相環、分頻器、帶有清零、使能功能的數據計數器(地址發生器)、存儲數據的ROM、D/A和濾波電路。
我是初學者,雖然還不會做這個東西。但是一定不能急,在網上搜也不可能直接得到答案。還是沉下來自己慢慢扣吧,沒有量的積累是不會有質的飛躍的。我會分階段進行:第一步:在網路文庫中查各種計數器的資料;
第二步:分頻器可用計數器和VHDL直接寫出;
第三步:8為DA晶元非常好用,要敢於試驗;
第四步:看書查資料直接找相關資料;
網路查資料非常方便,但是結果要靠你自己總結!

② 求eda數字鍾設計程序

1.Topclock(元件例化 頂層文件
Library ieee;
Use ieee.std_logic_1164.all;
Use ieee.std_logic_arith.all;
Use ieee.std_logic_unsigned.all;
Entity topclock is
Port(clk,clr,en,m1,h1:in std_logic;
alarm:out std_logic;
secs,secg,mins,ming,hours,hourg:buffer std_logic_vector(3 downto 0));
End;
2. 秒模塊程序
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity SECOND is
port(clk,clr:in std_logic;
sec1,sec0:out std_logic_vector(3 downto 0);
co:out std_logic);
end SECOND;

architecture SEC of SECOND is
begin
process(clk,clr)
variable cnt1,cnt0:std_logic_vector(3 downto 0);
begin
if clr='1' then
cnt1:="0000";
cnt0:="0000";
elsif clk'event and clk='1' then
if cnt1="0101" and cnt0="1000" then
co<='1';
cnt0:="1001";
elsif cnt0<"1001" then
cnt0:=cnt0+1;
else
cnt0:="0000";

if cnt1<"0101" then
cnt1:=cnt1+1;
else
cnt1:="0000";
co<='0';
end if;
end if;
end if;
sec1<=cnt1;
sec0<=cnt0;

end process;
end SEC;

3.分模塊程序
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity MINUTE is
port(clk,en:in std_logic;
min1,min0:out std_logic_vector(3 downto 0);
co:out std_logic);
end MINUTE;

architecture MIN of MINUTE is
begin
process(clk)
variable cnt1,cnt0:std_logic_vector(3 downto 0);
begin
if clk'event and clk='1' then
if en='1' then
if cnt1="0101" and cnt0="1000" then
co<='1';
cnt0:="1001";
elsif cnt0<"1001" then
cnt0:=cnt0+1;
else
cnt0:="0000";

if cnt1<"0101" then
cnt1:=cnt1+1;
else
cnt1:="0000";
co<='0';
end if;
end if;
end if;
end if;
min1<=cnt1;
min0<=cnt0;

end process;
end MIN;

4.時模塊程序

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity HOUR is
port(clk,en:in std_logic;
h1,h0:out std_logic_vector(3 downto 0));
end HOUR;

architecture hour_arc of HOUR is
begin
process(clk)
variable cnt1,cnt0:std_logic_vector(3 downto 0);
begin
if clk'event and clk='1' then
if en='1' then
if cnt1="0010" and cnt0="0011" then
cnt1:="0000";
cnt0:="0000";
elsif cnt0<"1001" then
cnt0:=cnt0+1;
end if;
end if;
end if;
h1<=cnt1;
h0<=cnt0;

end process;
end hour_arc;

----5.掃描模塊程序

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
entity SELTIME is
port(
clk:in std_logic;
sec1,sec0,min1,min0,h1,h0:in std_logic_vector(3 downto 0);
ut:out std_logic_vector(3 downto 0);
sel:out std_logic_vector(2 downto 0));
end SELTIME;
architecture fun of SELTIME is
signal count:std_logic_vector(2 downto 0);
begin
sel<=count;
process(clk)
begin
if(clk'event and clk='1') then
if(count>="101") then
count<="000";
else
count<=count+1;
end if;
end if;
case count is
when"000"=>ut<= sec0;
when"001"=>ut<= sec1;
when"010"=>ut<= min0;
when"011"=>ut<= min1;
when"100"=>ut<=h0;
when others =>ut<=h1;
end case;
end process;
end fun;

6.顯示模塊程序

library ieee;
use ieee.std_logic_1164.all;
entity DISPLAY is
port(d:in std_logic_vector(3 downto 0);
q:out std_logic_vector(6 downto 0));
end DISPLAY;
architecture disp_are of DISPLAY is
begin
process(d)
begin

case d is
when"0000" =>q<="0111111";
when"0001" =>q<="0000110";
when"0010" =>q<="1011011";
when"0011" =>q<="1001111";
when"0100" =>q<="1100110";
when"0101" =>q<="1101101";
when"0110" =>q<="1111101";
when"0111" =>q<="0100111";
when"1000" =>q<="1111111";
when others =>q<="1101111";
end case;
end process;
end disp_are;

-----7.定時鬧鍾模塊程序

library ieee;
use ieee.std_logic_1164.all;
entity ALERT is
port(m1,m0,s1,s0:in std_logic_vector(3 downto 0);
clk:in std_logic;
q500,qlk:out std_logic);
end ALERT;

architecture sss_arc of ALERT is
begin
process(clk)
begin

if clk'event and clk='1' then
if m1="0101" and m0="1001" and s1="0101" then
if s0="0001" or s0="0011" or s0="0101" or s0="0111" then
q500<='1';
else
q500<='0';
end if;
end if;

if m1="0101" and m0="1001" and s1="0101" and s0="1001" then
qlk<='1';
else
qlk<='0';
end if;
end if;
end process;
end sss_arc;
Architecture one of topclock is
Component second1
Port( clks,clr:in std_logic;
secs,secg: buffer std_logic_vector(3 downto 0);
cout1: out std_logic);
End Component;
Component min1
Port(clkm,clr:in std_logic;
mins,ming:buffer std_logic_vector(3 downto 0);
enmin,alarm: out std_logic);
End Component;
Component hour1
Port(clkh,clr:in std_logic;
hours,hourg:buffer std_logic_vector(3 downto 0));
End Component;
Component madapt
Port(en,m1,clk,secin:in std_logic;
minset:out std_logic);
End Component;
Component hadapt
Port(en,h1,clk,minin:in std_logic;
hourset:out std_logic);
End Component;
signal a,b,c,d: std_logic;
begin
u1:second1 port map(clr=>clr,
secs=>secs,secg=>secg,clks=>clk, cout1=>a);
u2:min1 port map(clr=>clr,alarm=>alarm,
mins=>mins,ming=>ming,clkm=>b,enmin=>c);
u3:hour1 port map(clr=>clr,
hours=>hours,hourg=>hourg,clkh=>d);
u4:madapt port map(en=>en,m1=>m1,clk=>clk,secin=>a,minset=>b);
u5:hadapt port map(en=>en,h1=>h1,clk=>clk,minin=>c,hourset=>d);
end;

③ 基於eda的30秒倒計時程序設計

給你一個10進製程序參考一下:
CLK,
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
ENTITY dcnt10 IS
PORT(ena,load,clk:IN STD_LOGIC;
datein:IN STD_LOGIC_VECTOR(3 DOWNTO 0);
cq:OUT STD_LOGIC_VECTOR(3 DOWNTO 0););

END dcnt10;
ARCHITECTURE one OF dcnt10 IS
SIGNAL cq1:STD_LOGIC_VECTOR(3 DOWNTO 0);
BEGIN
PROCESS(clk,ena)IS
BEGIN
IF CLK'EVENT AND clk='1' THEN
IF ena='1'THEN
IF cq1="0000"THEN cq1<="1001";
ELSE cq1<=cq1-1;
END IF;
END IF;
END IF;
END PROCESS;
cq<=cq1;

④ 急!EDA程序設計改錯問題,萬分感謝!

好多地方都有問題。。。改正後如下:
LIBRARY ieee;
USE ieee.STD_LOGIC_1164.ALL;
use ieee.std_logic_unsigned.all;
ENTITY abc IS
PORT (clk, rst : IN STD_LOGIC;
load,EN : IN STD_LOGIC;
din : IN STD_LOGIC_vector (7 downTO 0);
qb : out STD_LOGIC);
END abc;

ARCHITECTURE one OF abc IS
signal reg : STD_LOGIC_vector(7 downTO 0);
begin
PROCESS(rst,load,EN,clk)
BEGIN
IF rst='1' THEN
reg <= "00000000";
ELSIF rising_edge(clk) THEN
IF load = '1' THEN
reg <= din;
ELSIF EN='1' THEN
reg(6 downTO 0) <= reg(7 downTO 1);
END IF;
END IF;
END PROCESS;
qb <= reg(1);
END one;

閱讀全文

與eda程序設計相關的資料

熱點內容
mdfldf是什麼文件 瀏覽:569
文件在桌面怎麼刪除干凈 瀏覽:439
馬蘭士67cd機版本 瀏覽:542
javaweb爬蟲程序 瀏覽:537
word中千位分隔符 瀏覽:392
迷你編程七天任務的地圖怎麼過 瀏覽:844
word2003格式不對 瀏覽:86
百度雲怎麼編輯文件在哪裡 瀏覽:304
起名app數據哪裡來的 瀏覽:888
微信怎麼去泡妞 瀏覽:52
百度廣告html代碼 瀏覽:244
qq瀏覽器轉換完成後的文件在哪裡 瀏覽:623
jsp中的session 瀏覽:621
壓縮完了文件去哪裡找 瀏覽:380
武裝突襲3浩方聯機版本 瀏覽:674
網路機頂盒移動網路 瀏覽:391
iphone手機百度雲怎麼保存到qq 瀏覽:148
資料庫設計與實踐讀後感 瀏覽:112
js對象是什麼 瀏覽:744
網頁文件存pdf 瀏覽:567

友情鏈接