|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| a2d/ | H | 15-Jun-2019 | - | 2,312 | 1,655 |
| analog_stim/ | H | 15-Jun-2019 | - | 495 | 398 |
| assertions/ | H | 15-Jun-2019 | - | 159 | 124 |
| breakpoints/ | H | 15-Jun-2019 | - | 176 | 133 |
| ccp/ | H | 15-Jun-2019 | - | 2,236 | 1,692 |
| ccp_628/ | H | 15-Jun-2019 | - | 206 | 159 |
| comparator/ | H | 15-Jun-2019 | - | 3,516 | 3,032 |
| digital_stim/ | H | 15-Jun-2019 | - | 210 | 145 |
| eeprom_wide/ | H | 15-Jun-2019 | - | 380 | 300 |
| epwm/ | H | 15-Jun-2019 | - | 2,290 | 1,918 |
| i2c/ | H | 15-Jun-2019 | - | 2,181 | 1,796 |
| instructions_12bit/ | H | 15-Jun-2019 | - | 678 | 512 |
| instructions_14bit/ | H | 15-Jun-2019 | - | 910 | 706 |
| instructions_16bit/ | H | 15-Jun-2019 | - | 911 | 715 |
| interrupts_14bit/ | H | 15-Jun-2019 | - | 676 | 487 |
| interrupts_16bit/ | H | 15-Jun-2019 | - | 1,059 | 762 |
| logic_test/ | H | 15-Jun-2019 | - | 374 | 280 |
| macro_test/ | H | 15-Jun-2019 | - | 134 | 97 |
| node_test/ | H | 15-Jun-2019 | - | 156 | 111 |
| p10f32x/ | H | 15-Jun-2019 | - | 805 | 670 |
| p12c509/ | H | 15-Jun-2019 | - | 911 | 670 |
| p12ce518/ | H | 15-Jun-2019 | - | 431 | 366 |
| p12f675/ | H | 15-Jun-2019 | - | 1,785 | 1,492 |
| p16f628/ | H | 15-Jun-2019 | - | 162 | 104 |
| p16f676/ | H | 15-Jun-2019 | - | 922 | 740 |
| p16f684/ | H | 15-Jun-2019 | - | 1,602 | 1,257 |
| p16f690/ | H | 15-Jun-2019 | - | 2,346 | 1,867 |
| p16f84/ | H | 15-Jun-2019 | - | 647 | 462 |
| p16f873/ | H | 15-Jun-2019 | - | 124 | 92 |
| p16f88x/ | H | 15-Jun-2019 | - | 3,704 | 2,935 |
| p16f91x/ | H | 15-Jun-2019 | - | 4,183 | 3,346 |
| p18f/ | H | 15-Jun-2019 | - | 1,327 | 1,027 |
| p18f26k22/ | H | 15-Jun-2019 | - | 1,442 | 1,211 |
| p18f452_ports/ | H | 15-Jun-2019 | - | 168 | 118 |
| p1xf18xx/ | H | 15-Jun-2019 | - | 10,313 | 8,837 |
| port_stim/ | H | 15-Jun-2019 | - | 229 | 168 |
| psp/ | H | 15-Jun-2019 | - | 754 | 624 |
| register_stim/ | H | 15-Jun-2019 | - | 216 | 142 |
| resistor/ | H | 15-Jun-2019 | - | 221 | 173 |
| spi/ | H | 15-Jun-2019 | - | 828 | 648 |
| switch_test/ | H | 15-Jun-2019 | - | 459 | 343 |
| tmr0_16bit/ | H | 15-Jun-2019 | - | 651 | 494 |
| tmr1_16bit/ | H | 15-Jun-2019 | - | 934 | 727 |
| tmr3_16bit/ | H | 15-Jun-2019 | - | 685 | 529 |
| ttl/ | H | 15-Jun-2019 | - | 449 | 333 |
| txisr_test/ | H | 15-Jun-2019 | - | 297 | 206 |
| usart_test/ | H | 15-Jun-2019 | - | 1,420 | 1,074 |
| wavegen/ | H | 15-Jun-2019 | - | 469 | 323 |
| wdt/ | H | 15-Jun-2019 | - | 1,675 | 1,215 |
| Makefile.am | H A D | 11-Nov-2018 | 424 | 11 | 8 |
| Makefile.in | H A D | 03-May-2022 | 13.1 KiB | 480 | 412 |
| README | H A D | 11-Nov-2018 | 3.3 KiB | 90 | 66 |
| TODO | H A D | 11-Nov-2018 | 142 | 11 | 6 |
| make.regression | H A D | 11-Nov-2018 | 914 | 42 | 31 |
| rt.sh | H A D | 16-Nov-2018 | 602 | 32 | 14 |
| run_regression.sh | H A D | 09-Jun-2019 | 4.3 KiB | 249 | 152 |
| startup.stc | H A D | 11-Nov-2018 | 47 | 6 | 4 |
README
1Regression tests for gpsim
2
3Introduction
4------------
5
6The purpose of the regression tests is to ensure that gpsim works.
7Basic elements like instruction simulation and breakpoints are
8verified. In addition when new bugs are found and fixed, specific
9tests are created to ensure that future versions of gpsim are not
10infected.
11
12Each regression test or a collection of similar regression tests
13occupies a subdirectory that is child of this README's directory.
14The item(s) to be tested are placed into their own .asm file. This
15file is assembled by gpasm and simulated by gpsim and then the results
16are "analyzed" by a script. Once the .asm file is created, the whole
17process becomes automatic. However, the regression files need to
18adhere to a format that is understood by the scripts.
19
20Running
21-------
22
23If you want to perform a regression test with the default set up then
24run:
25
26On *nix:
27 ./run_regression.sh
28
29On WIN32 + Cygwin from the shell:
30 ./run_regression.sh '/cygdrive/c/Program Files/gpsim/bin'
31
32(You may need to change the file to an executable [chmod +x]).
33This should step through each test and print PASS or FAIL results.
34
35The 'run_regression.sh' script consists of a list of regression tests
36that are to be tested. Each of these is a single line that invokes the
37secondary script 'rt.sh'. This script takes two parameters: the
38directory containing the regression test and the name of the Makefile
39target the test should invoke. Typically there is a 'sim' target. So
40an example of rt.sh action would be:
41
42 cd node_test
43 make sim
44
45
46Files needed for a regression test
47----------------------------------
48
49Each test requires a .asm file and a .stc file. The .asm file contains
50the assembly code (of course) and the .stc file contains startup
51commands that allow you to configure your simulation environment for
52your test. For example, if your test involves measuring the width
53of a pulse then you'll want to create an asynchronous stimulus to
54generate the pulse. If there are no special startup conditions, then
55the .stc file can be really simple. For example, 14-bit core
56instruction test .stc file contains only:
57
58 # simple script to load the simulation
59 load s instructions_14bit.cod
60
61It's also possible to embed gpsim scripts directly in the assembly
62source files. See the logic_test/ regression test for an example.
63
64
65Assembly file format
66--------------------
67
68The assembly file must be in the relocatable code format. The reason
69is because gpsim makes use of gpasm directives that are only available
70in this format. The assembly file can contain anything you
71want. However, to simplify the parsing of the results there must be an
72assertion that contains the string "*** PASSED". For example,
73something like this:
74
75 .assert ",\"*** PASSED MidRange core interrupt test\""
76
77This assertion should be placed in the assembly file at an instruction
78that executes only after all of the tests have completed. (Note, this
79type of assertion has no break condition expression - so therefore it
80will always assert and gpsim will halt the simulation when this is
81encountered. The message will be printed to stdout.)
82
83
84Makefiles
85---------
86
87In addition to the Assembly File format, there must also be a Makefile
88in each regression directory. This Makefile can be anything you want,
89but at some point there must be a make target that can invoke gpsim.
90