bitprolix
Junior Member level 2
Hi,
I've recently ( a week back) started VHDL programming and I'm trying to learn by designing simple behavioural programs, but to test those designs, It seems that I've to write the testbench myself as well. It would be very helpful to me if you can give me some ideas on things that one needs to consider while writing simple testbenches, or is there any utility/tool that can generate a testbench for my design ? For example, a behavioural model of simple thermostat design, where the thermostat turns ON and Off, based on the difference between the desired and actual temperature is as follows:
Now to write the testbench and then simulate the design, how should I proceed? At this moment a more explicit direction/help would be extremely helpful to me.
I've recently ( a week back) started VHDL programming and I'm trying to learn by designing simple behavioural programs, but to test those designs, It seems that I've to write the testbench myself as well. It would be very helpful to me if you can give me some ideas on things that one needs to consider while writing simple testbenches, or is there any utility/tool that can generate a testbench for my design ? For example, a behavioural model of simple thermostat design, where the thermostat turns ON and Off, based on the difference between the desired and actual temperature is as follows:
Code:
entity Thermostat is
port ( desired_temp, actual_temp: in integer;
result: out boolean);
end entity Thermostat;
architecture Controller of Thermostat is
begin
myprocess: process (desired_temp, actual_temp) is
begin
if desired_temp < actual_temp - 2 then
result <= true;
elsif desired_temp > actual_temp + 2 then
result <= false;
end if;
end process myprocess;
end architecture Controller;
Now to write the testbench and then simulate the design, how should I proceed? At this moment a more explicit direction/help would be extremely helpful to me.