Hi, I'm trying to implement a testbench for a relatively complex module and I need multiple test cases to cover all the functionnality. I'd like to find an elegant way to perform multiple testcases without using text files for the stimulus because Ifind that text files are not really flexible. Here's my options so far
1 - Use one testbench file per test case. I don't really like this approach as I need to duplicate a lot of code amongst the testbench files even if I put procedure in a package.
2 - Use a generic to specify the testcase, then use a If generate clause to wrap the stimulus and validation process for each test case.
3 - Put all test cases in a the same process and simply reset the module between each test case.
I hesitate between option 2 and 3. Is there another option ?
Regards
Hi, I'm trying to implement a testbench for a relatively complex module and I need multiple test cases to cover all the functionnality. I'd like to find an elegant way to perform multiple testcases without using text files for the stimulus because Ifind that text files are not really flexible. Here's my options so far
1 - Use one testbench file per test case. I don't really like this approach as I need to duplicate a lot of code amongst the testbench files even if I put procedure in a package.I use a variation on #2. However, instead of a generic I use a boolean array to specify which tests to run. The main test code then simply loops through the array and calls the test case code if the boolean is true. I define an enumeration list of the
2 - Use a generic to specify the testcase, then use a If generate clause to wrap the stimulus and validation process for each test case.
3 - Put all test cases in a the same process and simply reset the module between each test case.
I hesitate between option 2 and 3. Is there another option ?
Regards
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 78:44:25 |
Calls: | 6,658 |
Calls today: | 4 |
Files: | 12,203 |
Messages: | 5,332,979 |
Posted today: | 1 |