Skip to content

Commit

Permalink
test: add tests for PWM generator
Browse files Browse the repository at this point in the history
Also all reqs were linked to corresponding models
  • Loading branch information
andrewrays committed Jan 11, 2023
1 parent 85a8da0 commit 671d2dd
Show file tree
Hide file tree
Showing 36 changed files with 39 additions and 3 deletions.
Binary file added data/dictionaries/datacounterDictionary~sldd.slmx
Binary file not shown.
Binary file added data/dictionaries/pwmgenDictionary~sldd.slmx
Binary file not shown.
Binary file added documents/requirements/button_filter~mdl.slmx
Binary file not shown.
Binary file not shown.
Binary file modified documents/requirements/pwmProjectReqs.slreqx
Binary file not shown.
Binary file added documents/requirements/pwmProjectReqs~slreqx.slmx
Binary file not shown.
Binary file added documents/requirements/pwm_generator~mdl.slmx
Binary file not shown.
Binary file added documents/requirements/rollover_handler~mdl.slmx
Binary file not shown.
Binary file modified models/button_filter.slx
Binary file not shown.
Binary file modified models/control_pulses_generator.slx
Binary file not shown.
Binary file modified models/data_counter.slx
Binary file not shown.
Binary file modified models/frequency_divider.slx
Binary file not shown.
Binary file modified models/main_model.slx
Binary file not shown.
Binary file modified models/pwm_generator.slx
Binary file not shown.
Binary file modified models/rollover_handler.slx
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="pwmgenDictionary~sldd.slmx" type="File"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="datacounterDictionary~sldd.slmx" type="File"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="rollover_handler~mdl.slmx" type="File"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="button_filter.slmx" type="File"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="pwmProjectReqs~slreqx.slmx" type="File"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="pwm_generator~mdl.slmx" type="File"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="button_filter~mdl.slmx" type="File"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="control_pulses_generator~mdl.slmx" type="File"/>
4 changes: 4 additions & 0 deletions scripts/calculatePrescalers.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
switch bdroot
case 'pwm_generator_harness'
Data.TYPE = get_param('pwm_generator_harness/DUT/counters/PWM_TYPE', 'Value');
case 'main_model_harness'
Data.TYPE = get_param('main_model_harness/DUT/pwm_generator/counters/PWM_TYPE', 'Value');
otherwise
Data.TYPE = 'TYPE.CENTERED';
end

if strcmp(Data.TYPE,'TYPE.CENTERED'), K = 2;
Expand Down
2 changes: 1 addition & 1 deletion scripts/checksubsystemcompatibility.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

sltest.harness.load(ModelName, HarnessName);

if ~exist(Directory, 'dir')
if ~exist(['..\pwm-mbd-demo\work\' Directory], 'dir')
mkdir('..\pwm-mbd-demo\work\', Directory);
end

Expand Down
4 changes: 2 additions & 2 deletions tests/checkHDLCompatibility.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
compatibilityResult.frequencyDivider = checksubsystemcompatibility('frequency_divider', 'hdl_frq_div');
compatibilityResult.filter = checksubsystemcompatibility('button_filter', 'hdl_filter');
compatibilityResult.planner = checksubsystemcompatibility('buttons_planner', 'hdl_planner');
compatibilityResult.rolloverHandler = checksubsystemcompatibility('rollover_handler', 'hdl_planner');
compatibilityResult.pulseGenerator = checksubsystemcompatibility('control_pulses_generator', 'hdl_cpg');
compatibilityResult.dataCounter = checksubsystemcompatibility('data_counter', 'hdl_data_counter');
compatibilityResult.pwmGenerator = checksubsystemcompatibility('pwm_generator', 'hdl_pwm_gen');
compatibilityResult.pwmGenerator = checksubsystemcompatibility('main_model', 'hdl_main');
compatibilityResult.mainModel = checksubsystemcompatibility('main_model', 'hdl_main');
Binary file modified tests/projectTests.mldatx
Binary file not shown.
Binary file modified tests/projectTests.slmx
Binary file not shown.

0 comments on commit 671d2dd

Please sign in to comment.