Commit 45518da1 authored by CI's avatar CI

Simple cleanup and README added

parent 0d8edb53
Pipeline #3600 passed with stage
in 28 minutes and 51 seconds
This is a testbench to verify the gc_multichannel_frequency_meter core. It uses GHDL simulator and OSVVM as verification methodology. All input signals in the testbench are random, with random seed also.
The generics of the core are:
- g_with_internal_timebase : Specifies from where the period is defined
- g_clk_sys_freq : Frequency of system clock
- g_channels : Number of the channels
- g_counter_bits : Bit length of the counter
And the test cases that are created, depending on the values of these generics are:
- Two bigger category, if g_with_internal_timebase is either true or false, where there are the following:
- Different values of system clock frequency (up to 10000Hz)
- Different values of Channels (from 2 to 5)
Counter bits remain to 32 bits.
There are the following assertions, to give to the testbench a more self-checking approach:
- Check for data mismatch between the testbench's output and RTL output
- Check if the number of the channels are bigger than 1
Note: It is better to give lower values to CLK_SYS_FREQ in order for the simulation to not take loong time to finish
......@@ -6,32 +6,43 @@ TB=tb_gc_multichannel_frequency_meter
echo "Running simulation for $TB"
echo "When g_WITH_INTERNAL_TIMEBASE = TRUE"
echo "clk_sys_freq = 500, channels = 2, counter_bits=32"
ghdl -r --std=08 -frelaxed-rules $TB -gg_WITH_INTERNAL_TIMEBASE=TRUE -gg_CLK_SYS_FREQ=500 -gg_CHANNELS=2 -gg_COUNTER_BITS=32
echo "***********************************************************************************"
echo "clk_sys_freq = 1000, channels = 3, counter_bits=32"
ghdl -r --std=08 -frelaxed-rules $TB -gg_WITH_INTERNAL_TIMEBASE=TRUE -gg_CLK_SYS_FREQ=1000 -gg_CHANNELS=3 -gg_COUNTER_BITS=32
echo "***********************************************************************************"
echo "clk_sys_freq = 5000, channels = 4, counter_bits=32"
ghdl -r --std=08 -frelaxed-rules $TB -gg_WITH_INTERNAL_TIMEBASE=TRUE -gg_CLK_SYS_FREQ=5000 -gg_CHANNELS=4 -gg_COUNTER_BITS=32
echo "***********************************************************************************"
echo "clk_sys_freq = 10000, channels = 5, counter_bits=32"
ghdl -r --std=08 -frelaxed-rules $TB -gg_WITH_INTERNAL_TIMEBASE=TRUE -gg_CLK_SYS_FREQ=10000 -gg_CHANNELS=5 -gg_COUNTER_BITS=32
echo "***********************************************************************************"
echo "When g_WITH_INTERNAL_TIMEBASE = FALSE"
echo "clk_sys_freq = 500, channels = 2, counter_bits=32"
ghdl -r --std=08 -frelaxed-rules $TB -gg_WITH_INTERNAL_TIMEBASE=FALSE -gg_CLK_SYS_FREQ=500 -gg_CHANNELS=2 -gg_COUNTER_BITS=32
echo "***********************************************************************************"
echo "clk_sys_freq = 1000, channels = 3, counter_bits=32"
ghdl -r --std=08 -frelaxed-rules $TB -gg_WITH_INTERNAL_TIMEBASE=FALSE -gg_CLK_SYS_FREQ=1000 -gg_CHANNELS=3 -gg_COUNTER_BITS=32
echo "***********************************************************************************"
echo "clk_sys_freq = 5000, channels = 4, counter_bits=32"
ghdl -r --std=08 -frelaxed-rules $TB -gg_WITH_INTERNAL_TIMEBASE=FALSE -gg_CLK_SYS_FREQ=5000 -gg_CHANNELS=4 -gg_COUNTER_BITS=32
echo "***********************************************************************************"
echo "clk_sys_freq = 10000, channels = 5, counter_bits=32"
ghdl -r --std=08 -frelaxed-rules $TB -gg_WITH_INTERNAL_TIMEBASE=FALSE -gg_CLK_SYS_FREQ=10000 -gg_CHANNELS=5 -gg_COUNTER_BITS=32
echo "======================================"
echo "*When g_WITH_INTERNAL_TIMEBASE = TRUE*"
echo "======================================"
echo "clk_sys_freq = 500, sync_out = TRUE, counter_bits=32"
ghdl -r --std=08 -frelaxed-rules $TB -gg_seed=$RANDOM -gg_WITH_INTERNAL_TIMEBASE=TRUE -gg_CLK_SYS_FREQ=500 -gg_CHANNELS=2 -gg_COUNTER_BITS=32
echo "******************************************************************************"
echo "clk_sys_freq = 1000, sync_out = FALSE, counter_bits=32"
ghdl -r --std=08 -frelaxed-rules $TB -gg_seed=$RANDOM -gg_WITH_INTERNAL_TIMEBASE=TRUE -gg_CLK_SYS_FREQ=1000 -gg_CHANNELS=3 -gg_COUNTER_BITS=32
echo "******************************************************************************"
echo "clk_sys_freq = 5000, sync_out = TRUE, counter_bits=64"
ghdl -r --std=08 -frelaxed-rules $TB -gg_seed=$RANDOM -gg_WITH_INTERNAL_TIMEBASE=TRUE -gg_CLK_SYS_FREQ=5000 -gg_CHANNELS=4 -gg_COUNTER_BITS=32
echo "******************************************************************************"
echo "clk_sys_freq = 10000, sync_out = FALSE, counter_bits=8"
ghdl -r --std=08 -frelaxed-rules $TB -gg_seed=$RANDOM -gg_WITH_INTERNAL_TIMEBASE=TRUE -gg_CLK_SYS_FREQ=10000 -gg_CHANNELS=5 -gg_COUNTER_BITS=32
echo "******************************************************************************"
echo "======================================="
echo "*When g_WITH_INTERNAL_TIMEBASE = FALSE*"
echo "======================================="
echo "clk_sys_freq = 500, sync_out = TRUE, counter_bits=32"
ghdl -r --std=08 -frelaxed-rules $TB -gg_seed=$RANDOM -gg_WITH_INTERNAL_TIMEBASE=FALSE -gg_CLK_SYS_FREQ=500 -gg_CHANNELS=2 -gg_COUNTER_BITS=32
echo "******************************************************************************"
echo "clk_sys_freq = 1000, sync_out = FALSE, counter_bits=32"
ghdl -r --std=08 -frelaxed-rules $TB -gg_seed=$RANDOM -gg_WITH_INTERNAL_TIMEBASE=FALSE -gg_CLK_SYS_FREQ=1000 -gg_CHANNELS=3 -gg_COUNTER_BITS=32
echo "******************************************************************************"
echo "clk_sys_freq = 5000, sync_out = TRUE, counter_bits=64"
ghdl -r --std=08 -frelaxed-rules $TB -gg_seed=$RANDOM -gg_WITH_INTERNAL_TIMEBASE=FALSE -gg_CLK_SYS_FREQ=5000 -gg_CHANNELS=4 -gg_COUNTER_BITS=32
echo "******************************************************************************"
echo "clk_sys_freq = 10000, sync_out = FALSE, counter_bits=8"
ghdl -r --std=08 -frelaxed-rules $TB -gg_seed=$RANDOM -gg_WITH_INTERNAL_TIMEBASE=FALSE -gg_CLK_SYS_FREQ=10000 -gg_CHANNELS=5 -gg_COUNTER_BITS=32
echo "******************************************************************************"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment