Forum Discussion
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- As far as I understand it, the BFM is used for simulation purpose and it is an acronym for Bus Functional Model. What I do not understand is that, why should we need one of these. Can't we just do simulation with the synthesized circuit or using the behavioral model as represented by the HDL code? --- Quote End --- A BFM is often used where the stimulus to your device-under-test is 'external', so there is no way to do the simulation with the synthesized circuit. BFMs are also used when developing components. For example, lets say I have an Avalon-MM slave component that can implement the full suite of Avalon-MM transactions, i.e., single-read, single-write, burst-read, burst-write, etc. How can I generate traffic to that slave that exercises every transaction type? How can I insert arbitrary delays between transactions? How can I stack transactions back-to-back? These traffic patterns are hard to generate in software, eg., how would you do it with a NIOS processor, how about a DMA controller, perhaps a custom traffic generator? BFMs are also useful for code coverage, i.e., you can generate traffic patterns that cause every line of your code to be exercised. You can also setup your build system to run a suite of tests on every component in a simulator. This ensures that components that "used to work" still work when you make changes to common code. Cheers, Dave