私はVHDLコーディングを開始しました。私はXILINX Artix-7/NEXYS 4を使って練習しました。 私は7セグメントディスプレイを設計し、0から9までの数字を表示させたいだけです。 私の英語はあまり良くありません、私を許してください、私は私の質問を表現しようとしました。VHDL。このデザインには2つの無負荷信号があります
私のコードでは、アーキテクチャを4つのステップに分割しました。 まず、clk(100MHZ)を1hz下げます。第二に、私は0から9までの数を数えるためにカウンタを使用して、ダブルダブリングアルゴリズムをnumber.Lastを使用して、私は7セグメントデコーダにBCDを書いて、最初の陽極を選択します。
問題は、回路が実装されているときに警告が表示されますが、合成は問題ありませんが、信号が明らかに接続されていないことをRTLが示しています。 問題はダブルダブリングアルゴリズムとカウンタの間にあるようですか? (このコードを追加した後は間違っているので) この問題を解決するにはどうすればいいのでしょうか?この警告はいつ表示されますか?
警告:Par:288 - 信号clk_IBUFには負荷がありません。 PARはこの信号を経路指定しようとしません。
完成した初期タイミング解析。警告:Par:288 - シグナルbtnD_IBUFには負荷がありません。 PARはこの信号を経路指定しようとしません。
警告:Par:283 - このデザインには2つの無負荷信号があります。このデザインにより、BitgenはDRC警告を発行します。
ところで、私は目標を達成する方法はたくさんあると知っていますが、本当に何が悪いのかを知りたいのです。 誰かが私を助けることができれば、ありがとうございます。
は、ここに私のコードです:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
USE ieee.std_logic_unsigned.all;
use IEEE.numeric_std.all;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity top is
Port (clk : in STD_LOGIC;
btnD : in STD_LOGIC;
an : out STD_LOGIC_VECTOR (7 downto 0);
seg : out STD_LOGIC_VECTOR (6 downto 0));
end top;
architecture Behavioral of top is
signal clk_1hz_s : STD_LOGIC := '1';
signal clk_1hz : STD_LOGIC;
signal counter_clock : integer range 0 to 5000000 := 0;
signal sec_turth : STD_LOGIC_VECTOR (7 downto 0);
signal sec_1 : STD_LOGIC_VECTOR (3 downto 0);
begin
--new clk--
process(clk,btnD)
begin
if (clk' event and clk='1') then
if (btnD = '1') then
counter_clock <= 0;
clk_1hz_s <= '1';
elsif (counter_clock = 5000000 - 1) then
counter_clock <= 0;
clk_1hz_s <= NOT(clk_1hz_s);
else
counter_clock <= counter_clock + 1;
end if;
end if;
end process;
clk_1hz <= clk_1hz_s;
--counter--
process(clk_1hz)
variable sec :integer range 0 to 9 :=0;
begin
if (clk_1hz' event and clk_1hz='1') then
if sec > 8 then
sec := 0;
else
sec := sec + 1;
end if;
end if;
sec_turth <= STD_LOGIC_VECTOR(to_unsigned(sec,8)(7 downto 0));
end process;
--double dabble algorithm--
process(sec_turth)
variable temp_sec : STD_LOGIC_VECTOR (7 downto 0);
variable bcd_sec : unsigned (7 downto 0):= (others => '0');
begin
temp_sec := sec_turth;
bcd_sec := (others => '0');
for i in 0 to 7 loop
if bcd_sec(3 downto 0) > 4 then
bcd_sec(3 downto 0) := bcd_sec(3 downto 0) + 3;
end if;
-- if bcd_sec(7 downto 4) > 4 then
-- bcd_sec(7 downto 4) := bcd_sec(7 downto 4) + 3;
-- end if;
bcd_sec := bcd_sec(7 downto 1) & temp_sec(7);
temp_sec := temp_sec(7 downto 1) & '0';
end loop;
sec_1 <= STD_LOGIC_VECTOR(bcd_sec(3 downto 0));
--sec_2 <= STD_LOGIC_VECTOR(bcd_sec(7 downto 4));
end process;
--decoder--
with sec_1 select
seg <= "1000000" when "0000",--0
"1111001" when "0001",--1
"0100100" when "0010",--2
"0110000" when "0011",--3
"0011001" when "0100",--4
"0010010" when "0101",--5
"0000010" when "0110",--6
"1011000" when "0111",--7
"0000000" when "1000",--8
"0011000" when "1001",--9
"0001110" when "1111",--F
"1111111" when others;--close all
an <= "11111110";--choose the first anode
end Behavioral;
私のコードを変更した後、それはもっと妥当だがまだunconnect.Iのように見えますが、感度リストに "STD_LOGIC_VECTOR"を入れることができますか? 、私は気づくべきですか?。もう一度ありがとうございます。 –
@HankLin:はい、可能です。 'STD_LOGIC_VECTOR'をセンシティブリストに入れると、プロセスはベクトルの各要素のすべての変更に対してコンビナトリアルな方法で反応します(合成時には未使用のものが最適化されます)。 – Sanyok
私はあなたのコードを合成し、警告を再現することができました(実際にはエラーと同じくらい深刻です)。 – Sanyok