Altera_Forum
Honored Contributor
8 years agoOnes counter using numeric_std inside process
I had an error while working on ones counter inside the process. I use numeric_std library. Here is the key part of the code. signal one_buf:unsigned(7downto0); signal out_buf:std_logic_vector(7downto0); counter_one:process(out_buf1) variable one_buf1 :unsigned(7downto0):=(others=>'0'); begin for i in 0 to 7 loop one_buf1 := one_buf1 +unsigned(out_buf(i)); endloop; one_buf <= one_buf1; end process counter_one; The error message is Error(10305) cannot convert type "std_ulogic" to type "UNSIGNED". I do not understand what is wrong here. Thanks in advance for the answers.