What does 'genbin' and 'addbins' in OSVVM mean?

Joined
Feb 20, 2022
Messages
5
Reaction score
0
Brand new to OSVVM. Familiar with SystemVerilog functional coverage language.

Here’s a sample code. Question follows the code.

library OSVVM;
use OSVVM.CoveragePkg.all;

architecture
signal op_code : std_logic_vector(2 downto 0);
signal mode : std_logic_vector(1 downto 0);

shared variable cp_opcode: CovPType;
shared variable cp_mode : CovPType;
begin

process
begin
cp_opcode.AddBins(“op_code”, GenBin(0,7));
cp_mode.AddBins(“mode”, GenBin(0,3));

wait;
end process;

QUESTION: What does the following mean?

cp_opcode.AddBins(“op_code”, GenBin(0,7));

Does it mean that 8 bins will be created. Each of the 8 bins will be considered covered when “op_code” hits the values from 0 to 7? In other words, if “op_code” = 0, the bin[0] will be considered covered?

What’s the relation between “shared variable cp_opcode” and “signal op_code : std_logic_vector(2 downto 0);”?

Unfortunately the OSVVM UG did not make it clear.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top