Forum Discussion
Altera_Forum
Honored Contributor
9 years agoRepresenting only a set of bits in a binary number
Hello, I need a clarification regarding this topic. I have a binary number, say "00000011111111100......" and I need to write a VHDL code such that it calculates the number of 0s and 1s for a...
Altera_Forum
Honored Contributor
9 years ago@tricky,
sorry I don't have the design under test. I just need to write a testbench for a module, for instance if the input is, say "000001111111000.....", then it should take only one sequence i.e "000001111111" in my case and should calculate the number of zeroes of out this, here 5(which in my case: fall time) and number of ones, here 7(in my case rise-fall time) and then should calculate the rise time out of this (i.e rise-fall time +fall time). Also the checking condition should stop after the last one of my sequence (in my case, it should stop after the 7th 1). Can you help me to solve the issue with this information.