Altera_Forum
Honored Contributor
10 years agoSubprograms for bus functional model
Hi,
I have a problem that is driving me crazy! I hope someone can help me. I am trying to make a bus functional model for simulation and using VHDL 2008 is fine. The subprogram interface should look something like: bfm_read(address,read_data) or read_data=bfm_read(address) bfm_write(address,write_data) These subprograms will be used in a testbench so somehow these subprograms must manipulate the bus signals for the entities instantiated in the testbench. I should add I have done it by making an entity bfm and defining a procedure in the stimulus process in the testbench. But I would like to somehow move the subprograms to the bfm to make the it more modular. I have looked into protected classes but I can't see how to connect the bfm bus signals using that approach. Thanks!