我想使用芯片示波器探测三态信号。
根据这个回答记录,是做不到的,所以这是我开始的(只包括相关代码):
-- Tristate signals
FPGA_SMB0_SDA <= sysmon_iic_data;
FPGA_SMB0_SCL <= sysmon_iic_clk;
-- Output signals
DEBUG_LED0 <= '0';
DEBUG_LED1 <= '0';
哪个构建良好,没有错误。
尝试1:
这是我第一次尝试生成用于探测的调试信号,这只是一个输出:
-- Tristate signals
FPGA_SMB0_SDA <= sysmon_iic_data;
FPGA_SMB0_SCL <= sysmon_iic_clk;
-- Generating new output signals using tristate (tristate signals are either '0' or 'X' for IIC)
sysmon_iic_data_debug <= '0' when (sysmon_iic_data = '0') else '1';
sysmon_iic_clk_debug <= '0' when (sysmon_iic_clk = '0') else '1';
-- connecting debug outs to debug leds (so that the debug signals aren't optimized out)
DEBUG_LED0 <= sysmon_iic_data_debug;
DEBUG_LED1 <= sysmon_iic_clk_debug;
上面的代码通过了综合,但是 NGDbuild 给出了以下错误:
ERROR:ConstraintSystem:59 - Constraint <IOSTANDARD = LVCMOS25 ;>
[frm121401u1r1.ucf(333)]: NET "FPGA_SMB0_SDA"
not found. Please verify that:
1. The specified design element actually exists in the original design.
2. The specified object is spelled correctly in the constraint source file.
以上重复8次,每网两次。
尝试2:
我尝试的第二件事是使用一个过程:
FPGA_SMB0_SDA <= sysmon_iic_data;
FPGA_SMB0_SCL <= sysmon_iic_clk;
gen_sysmon_debug : process(refclk_10m,refclk_10m_rst)
begin
if (refclk_10m_rst = '1') then
sysmon_iic_data_debug <= '0';
sysmon_iic_clk_debug <= '0';
elsif (rising_edge(refclk_10m)) then
if (sysmon_iic_clk = '0') then
sysmon_iic_clk_debug <= '0';
else
sysmon_iic_clk_debug <= '1';
end if;
if (sysmon_iic_data = '0') then
sysmon_iic_data_debug <= '0';
else
sysmon_iic_data_debug <= '1';
end if;
end if;
end process;
DEBUG_LED0 <= sysmon_iic_data_debug;
DEBUG_LED1 <= sysmon_iic_clk_debug;
这给了我这个 NGDbuild 错误:
ERROR:NgdBuild:924 - bidirect pad net 'FPGA_SMB0_SDA' is driving non-buffer primitives:
pin D on block sysmon_iic_data with type FDC,
其中两个,一个用于 SDA,一个用于 SCL
更多信息:
这是我的 UCF 中的内容:
NET "DEBUG_LED0" LOC = "AK33" | IOSTANDARD = LVCMOS25 ;
NET "DEBUG_LED1" LOC = "AK34" | IOSTANDARD = LVCMOS25 ;
...
NET "FPGA_SMB0_SCL" LOC = "G13" | IOSTANDARD = LVCMOS25 ;
NET "FPGA_SMB0_SDA" LOC = "H13" | IOSTANDARD = LVCMOS25 ;
和顶级 vhdl 网络定义:
DEBUG_LED0 : out std_logic;
DEBUG_LED1 : out std_logic;
FPGA_SMB0_SCL : inout std_logic;
FPGA_SMB0_SDA : inout std_logic;
在 uBlaze .mhs 中:
PORT xps_iic_1_Sda_pin = xps_iic_1_Sda, DIR = IO, BUFFER_TYPE = NONE
PORT xps_iic_1_Scl_pin = xps_iic_1_Scl, DIR = IO, BUFFER_TYPE = NONE
我完全不知道为什么我会收到这些 NGDbuild 错误,有人有什么想法吗?