S
sagar g
Greetings,
I'm using data_line as inout pin to implement SDI-12 protocol,
but it works fine until pre-synthesis simulation and shows 'X' value in post-synthesis simulation(through out the simulation),
I've used a tri-state buffer to change the state of inout pin from in to out and vice-versa.
while pre-synthesis simulation when data is driven on inout pin (i.e., when used as out) it shows 'X' for '0' and works fine for '1'.
help needed,
just check the top module code
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity top_module is
Port ( clk : in STD_LOGIC;
reset : in STD_LOGIC;
data_line : inout STD_LOGIC;
sensor_data : in STD_LOGIC_VECTOR (13 downto 0));
end top_module;
architecture Behavioral of top_module is
COMPONENT test
PORT(
clk : IN std_logic;
reset : IN std_logic;
data_line1 : IN std_logic;
data_line2 : OUT std_logic;
oe : OUT std_logic;
sensor_out : IN std_logic_vector(13 downto 0)
);
END COMPONENT;
signal data_in,data_out,oe : std_logic;
begin
u1: test port map (clk,reset,data_in,data_out,oe,sensor_data);
data_line<=data_out when oe='1' else 'Z';
data_in<=data_line;
end Behavioral;
I'm using data_line as inout pin to implement SDI-12 protocol,
but it works fine until pre-synthesis simulation and shows 'X' value in post-synthesis simulation(through out the simulation),
I've used a tri-state buffer to change the state of inout pin from in to out and vice-versa.
while pre-synthesis simulation when data is driven on inout pin (i.e., when used as out) it shows 'X' for '0' and works fine for '1'.
help needed,
just check the top module code
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity top_module is
Port ( clk : in STD_LOGIC;
reset : in STD_LOGIC;
data_line : inout STD_LOGIC;
sensor_data : in STD_LOGIC_VECTOR (13 downto 0));
end top_module;
architecture Behavioral of top_module is
COMPONENT test
PORT(
clk : IN std_logic;
reset : IN std_logic;
data_line1 : IN std_logic;
data_line2 : OUT std_logic;
oe : OUT std_logic;
sensor_out : IN std_logic_vector(13 downto 0)
);
END COMPONENT;
signal data_in,data_out,oe : std_logic;
begin
u1: test port map (clk,reset,data_in,data_out,oe,sensor_data);
data_line<=data_out when oe='1' else 'Z';
data_in<=data_line;
end Behavioral;