Forum Discussion
Altera_Forum
Honored Contributor
16 years agoThe original Verilog code is an example of bad coding style, involving word_clk designed as a ripple clock, but it's basically working.
You have confused the code by an adder, that hasn't been there before and apparently act's as a kind of random number generator in your simulation. if mdata1='1' then
ip_data1 <= ip_data1 + '1';
else
ip_data1 <= ip_data1 - '1'; The purpose of this combinational code is to assign 0/+1 respectively -1/+1 to ip_data1, not to sum up anything.