【发布时间】:2017-03-23 04:20:56
【问题描述】:
我正在尝试创建一个 10 位移位寄存器。但是我不断收到错误
[DRC 23-20] 违反规则 (NSTD-1) 未指定 I/O 标准 - 15 个逻辑端口中有 2 个使用 I/O 标准 (IOSTANDARD) 值“DEFAULT”,而不是用户分配的特定值。这可能会导致 I/O 争用或与电路板电源或连接不兼容,从而影响性能、信号完整性,或者在极端情况下会损坏设备或其连接的组件。要更正此违规,请指定所有 I/O 标准。除非所有逻辑端口都定义了用户指定的 I/O 标准值,否则此设计将无法生成比特流。要允许使用未指定的 I/O 标准值(不推荐)创建比特流,请使用以下命令:set_property SEVERITY {Warning} [get_drc_checks NSTD-1]。注意:使用 Vivado Runs 基础架构(例如,launch_runs Tcl 命令)时,将此命令添加到 .tcl 文件中,并将该文件添加为实现运行的 write_bitstream 步骤的预挂钩。问题端口:Clk、btnu。
每次我要写比特流。有人可以帮我指出正确的方向,并指出我所犯的任何其他错误,这些错误将导致我的移位寄存器无法正常工作。
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
entity question2 is
Port (
led: out std_logic_vector (9 downto 0);
Clk: in std_logic;
btnu: in std_logic;
btnL: in std_logic;
btnR: in std_logic ;
btnD: in std_logic;
btnC: in std_logic
);
end question2;
architecture Behavioral of question2 is
constant active: std_logic :='1';
constant inactive: std_logic :='0';
constant step_zero: std_logic_vector(9 downto 0) :="0000000000";
constant step_one: std_logic_vector(9 downto 0) :="0000000001";
constant step_two: std_logic_vector(9 downto 0) :="0000000010";
constant step_three: std_logic_vector(9 downto 0) :="0000000100";
constant step_four: std_logic_vector(9 downto 0) :="0000001000";
constant step_five: std_logic_vector(9 downto 0) :="0000010000";
constant step_six: std_logic_vector(9 downto 0) :="0000100000";
constant step_seven: std_logic_vector(9 downto 0) :="0001000000";
constant step_eight: std_logic_vector(9 downto 0) :="0010000000";
constant step_nine: std_logic_vector(9 downto 0) :="0100000000";
constant step_ten: std_logic_vector(9 downto 0) :="0100000000";
signal DataIn: std_logic_vector (9 downto 0):= "0000000001";
signal Load: std_logic := btnD;
signal Reset: std_logic;
signal Left: std_logic:= btnL;
signal Right: std_logic:= btnR;
signal DataOut: std_logic_vector (9 downto 0);
signal Clear: std_logic:= btnU;
signal speed_enable: std_logic;
begin
SpeedControl: process (clk)
variable counter: integer range 0 to 10000000;
begin
speed_enable<=not active;
if Reset = Active then
counter:= 0;
elsif (rising_edge (clk)) then
counter := counter + 1;
if (counter=10000000) then
speed_enable<= Active;
counter:=0;
end if;
end if;
end process;
shiftregister: process(speed_enable, clear, DataIn)
begin
if speed_enable=active then
if clear=active then
DataOut (9 downto 0) <= "0000000000"; --(others=>'0');
elsif load = Active then
DataOut (9 downto 0) <= DataIn ;
elsif Left = Active then
DataOut (9 downto 0) <= DataOut(7 downto 0) & "11" ;
elsif Right = Active then
DataOut (9 downto 0) <= DataOut (9 downto 2) & "11" ;
end if;
end if;
end process;
LEDSTEP: process(DataOut)
begin
if DataOut = "0000000000" then
led <= step_zero;
elsif DataOut = "0000000001" then
led <= step_one;
elsif DataOut = "0000000010" then
led <= step_two;
elsif DataOut = "0000000100" then
led <= step_three;
elsif DataOut = "000001000" then
led <= step_four;
elsif DataOut = "0000010000" then
led <= step_five;
elsif DataOut = "0000100000" then
led <= step_six;
elsif DataOut = "0001000000" then
led <= step_seven;
elsif DataOut = "0010000000" then
led <= step_eight;
elsif DataOut = "0100000000" then
led <= step_nine;
elsif DataOut = "1000000000" then
led <= step_ten;
end if;
end process;
end Behavioral;
【问题讨论】:
-
该错误与您的移位寄存器无关,它与您的设计约束有关。见 Xilinx 回答here
-
你能添加你的约束文件吗?