function ProgSWGenerator_tb

%% Clear persistent variables.
clear ProgSWGenerator
SimulationTime=400;

%% Basic test 50 clock periods on and 50 clock periods off , 100 cycles on and 50 cycles off , 50 cycles on and
% 100 cycles off
On_time=[ones(1,100),2*ones(1,150),ones(1,150)];
Off_time=[ones(1,100),ones(1,150),2*ones(1,150)];
Programmed_Signal=arrayfun(@(in1,in2) ProgSWGenerator(in1,in2),On_time,Off_time);

%% plot testbench results
plot(1:SimulationTime,Programmed_Signal);
title('Programmable Square-Wave Generator Testbench');
xlabel('Clock Cycles');
ylabel('Programmed Signal');
grid on
axis tight
ylim([-2 2]);
