Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

PID in vhdl

Altera_Forum
Honored Contributor II
1,436 Views

hai all, 

I am trying to simulate a PID controller in VHDL... I have tried a code but I am getting output only every two clock cycles!!! I have attached the vhdl code and its corresponding test bench.... Can anyone help me regarding this issue. Thanks in advance.... :-)
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
346 Views

Hi, 

 

uh, better respond late than never I guess :cool: the signal "output", which is used also used as an input, is not initialized. If you run this through ModelSim, it will immediately tell you that it will return all X's as a result of an arithmetic operation with that. 

 

Either define your port as "output: buffer std_logic_vector(15 downto 0) := (others => '0')" or introduce a reset signal. 

 

 

Best regards, 

GooGooCluster
0 Kudos
Reply