Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

What is a Qsys BFM?

Altera_Forum
Honored Contributor II
2,149 Views

Qsys creates BFMs to be used in simulation, what purpose do they serve? is a simulation model and BFM the same?

0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
708 Views

I think this document was written for you: http://www.altera.com/literature/ug/ug_avalon_verification_ip.pdf  

Bus functional model is a model how a bus works. You write System Verilog code, it drives your BFM and it creates transactions on the bus.
0 Kudos
Altera_Forum
Honored Contributor II
709 Views

I still have some confusion regarding the concept of BFMs. We have so very many different type of components in Qsys that all use Avalon-MM or Avalon-ST e.t.c How can a single Avalon-MM BFM provide stimulus to all these different type of components to verify them? How does the BFM know what stimulus to provide to a component? I mean, whenever we create a design and write a testbench, we all write the stimulus for those blocks. The stimulus is going to be different for different blocks and it is going to depend on the nature of the block itself. 

So how can a BFM replace all that work, that also a single Avanlon-MM BFM for all Avalon-MM components? It does not make sense.
0 Kudos
Altera_Forum
Honored Contributor II
709 Views

An Example:- 

 

Maybe your FPGA is being Driven by an external Microprocessor. 

or 

Maybe part of your FPGA is being Driven by a Nios Microprocessor. 

 

You don't want to write a model of the whole processor. 

 

So you use a model of the Bus Functions, Eg. Read & Write & it pretends to be the processor. 

 

EG: In your simulation, you can give the BFM an Adr & some Data & it will write that data to the Adr you gave it using the same sequences of events on the bus signals that the real processor would. 

 

A BFM is much smaller than a whole processor so it is much faster to simulate.
0 Kudos
Altera_Forum
Honored Contributor II
709 Views

That point is clear, I understand that. The question is, when I create a Qsys system and then choose options to create BFM and a testbench with the simulation models and open modelsim and run msim_setup.tcl, in all this how does the BFM know what value it is supposed to put onto the component? Or do I have to add the BFM manually in the Qsys itself and otherwise they will not be added into the simulation model? How do I tell the BFM what it is supposed to do? I thought that the BFM just does things on its own. It has been created and it just works when we choose the BFM option in Qsys before we generate the system.

0 Kudos
Altera_Forum
Honored Contributor II
709 Views

Do 3rd part IP vendors need to produce BFM for thier IP as well, even if it shall integrate with a Analon-MM or any other known interface and not just be a conduit?

0 Kudos
Altera_Forum
Honored Contributor II
709 Views

 

--- Quote Start ---  

That point is clear, I understand that. The question is, when I create a Qsys system and then choose options to create BFM and a testbench with the simulation models and open modelsim and run msim_setup.tcl, in all this how does the BFM know what value it is supposed to put onto the component? Or do I have to add the BFM manually in the Qsys itself and otherwise they will not be added into the simulation model? How do I tell the BFM what it is supposed to do? I thought that the BFM just does things on its own. It has been created and it just works when we choose the BFM option in Qsys before we generate the system. 

--- Quote End ---  

 

 

Aside from some default initial processing, the BFM does not do anything. It is up to you to write a testbench which instructs the BFM to perform various tasks for you. Qsys simply instantiates the BFM entities with proper parameters and connects them to the design so they are ready to be useful to you. 

 

This is explained in the previously linked ug_avalon_verification_ip.pdf but you might also enjoy the wikipedia definition of BFM and the linked articles from there: http://en.wikipedia.org/wiki/bus_functional_model 

 

 

--- Quote Start ---  

Do 3rd part IP vendors need to produce BFM for thier IP as well, even if it shall integrate with a Analon-MM or any other known interface and not just be a conduit? 

--- Quote End ---  

 

 

A 3rd party IP vendor might use the BFM's in the construction of their own testbenches for verifying their IP components. Or they might use their own methods to accomplish the same goals.
0 Kudos
Altera_Forum
Honored Contributor II
709 Views

 

--- Quote Start ---  

The question is, when I create a Qsys system and then choose options to create BFM and a testbench with the simulation models and open modelsim and run msim_setup.tcl, in all this how does the BFM know what value it is supposed to put onto the component? Or do I have to add the BFM manually in the Qsys itself and otherwise they will not be added into the simulation model? How do I tell the BFM what it is supposed to do? I thought that the BFM just does things on its own. It has been created and it just works when we choose the BFM option in Qsys before we generate the system. 

--- Quote End ---  

 

 

Take a look at this tutorial, it uses the Qsys BFM 

 

http://www.alterawiki.com/wiki/using_the_usb-blaster_as_an_sopc/qsys_avalon-mm_master_tutorial 

 

The automated script that I wrote no longer works, as Altera have changed the format of their msim_setup.tcl script. However, the manual procedure described in the tutorial should still work. If it doesn't work, tell me which version of Quartus you are using, and I'll go through the sequence to see what it should be. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
709 Views

thank you for your answers

0 Kudos
Reply