Projects

Developing design: moving average filter. Part 7 (last) – testbench.

This is the last part about creating almost automatic testbench for Moving Average Filter. In the previous post I presented blocks for reading and writing. Now it is time to connect all blocks to each other in the main testbench. Testbench contains three blocks:

  • block which reads data from external file,
  • filter,
  • block which writes output data to external file.

Testbench additionally contains clock generation and other processes which drive control and testbench signals.

Read More »Developing design: moving average filter. Part 7 (last) – testbench.

Developing design: moving average filter. Part 6 – reading and writing to the files.

I had a break in developing filter (last part is here), but before doing next steps, I had to make a short introduction to working with files in VHDL. You can read about it herehere and here. Now I am going to use that knowledge and move on with the filter. In the last part I implemented the filter in Octave, generated test vectors, sent them through the filter and wrote all data to files.

Now it is time to start building testbench, where the filter could be easily and automatically verified with different test vectors. To achieve it, testbench has to read data from a file and pass it to the filter and then, write output values from the filter to another file.

Read More »Developing design: moving average filter. Part 6 – reading and writing to the files.

Developing design: moving average filter. Part 5 – model of the filter.

Next step in extending test automation is to create model of the filter and run some tests on it. Perfect applications which will do that job are environments for technical and mathematical computations like Matlab or Octave, which very easily allow to express even complex algorithms.

Read More »Developing design: moving average filter. Part 5 – model of the filter.

Developing design: moving average filter. Part 4 – automatization of tests – idea.

At this moment I have a very simple testbench to test the filter. I created a short test vector which checks calculations in the filter, but in very narrow range and only for 10 input samples. It really does not check much at all.

Below is depicted an actual method of testing:

AutmaticTesting1
Fig. 1

It contains only an UUT,  a short input vector, and output data which must be checked manually. Not much. Can I be sure that UUT will be tested in all corners? No.

Read More »Developing design: moving average filter. Part 4 – automatization of tests – idea.

Developing design: moving average filter. Part 1 – introduction.

I wanted to briefly describe main steps which should be taken to correctly implement designs in VHDL (but of course it works for any other languages). As an example I chose simple moving average filter. The purpose is not to build something difficult, but to show how to build working, well-tested designs.

What are these steps?

Read More »Developing design: moving average filter. Part 1 – introduction.