sidharth.bolar89
Newbie level 5
- Joined
- Jul 10, 2012
- Messages
- 9
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,356
The simulation results give the output as undefined.
I am not able to understand where I am going with the procedure.
please help
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity p_i is
Port ( clk : in STD_LOGIC;
rst : in STD_LOGIC;
fb : in STD_LOGIC_VECTOR (15 downto 0);
pid_o : out STD_LOGIC_VECTOR (31 downto 0));
end p_i;
architecture Behavioral of p_i is
signal temp1,temp2,temp3:std_logic_vector(31 downto 0);
signal p,i,d:std_logic_vector(31 downto 0);
signal set,er,prev: std_logic_vector(15 downto 0);
begin
process (clk, rst)
begin
set<= "0000000000001010";
if rst='0' then pid_o <= "00000000000000000000000000000000";
elsif clk' event and clk = '1' then
er <= set - fb;
p <= "0000000000000011" * er;
i <= i + ("0000000000000010" * er);
--d <= "0000000000000001" * (er - prev);
--prev <= er;
pid_o <= p + i;
end if;
I am not able to understand where I am going with the procedure.
please help
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity p_i is
Port ( clk : in STD_LOGIC;
rst : in STD_LOGIC;
fb : in STD_LOGIC_VECTOR (15 downto 0);
pid_o : out STD_LOGIC_VECTOR (31 downto 0));
end p_i;
architecture Behavioral of p_i is
signal temp1,temp2,temp3:std_logic_vector(31 downto 0);
signal p,i,d:std_logic_vector(31 downto 0);
signal set,er,prev: std_logic_vector(15 downto 0);
begin
process (clk, rst)
begin
set<= "0000000000001010";
if rst='0' then pid_o <= "00000000000000000000000000000000";
elsif clk' event and clk = '1' then
er <= set - fb;
p <= "0000000000000011" * er;
i <= i + ("0000000000000010" * er);
--d <= "0000000000000001" * (er - prev);
--prev <= er;
pid_o <= p + i;
end if;