• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

a2d/H15-Jun-2019-2,3121,655

analog_stim/H15-Jun-2019-495398

assertions/H15-Jun-2019-159124

breakpoints/H15-Jun-2019-176133

ccp/H15-Jun-2019-2,2361,692

ccp_628/H15-Jun-2019-206159

comparator/H15-Jun-2019-3,5163,032

digital_stim/H15-Jun-2019-210145

eeprom_wide/H15-Jun-2019-380300

epwm/H15-Jun-2019-2,2901,918

i2c/H15-Jun-2019-2,1811,796

instructions_12bit/H15-Jun-2019-678512

instructions_14bit/H15-Jun-2019-910706

instructions_16bit/H15-Jun-2019-911715

interrupts_14bit/H15-Jun-2019-676487

interrupts_16bit/H15-Jun-2019-1,059762

logic_test/H15-Jun-2019-374280

macro_test/H15-Jun-2019-13497

node_test/H15-Jun-2019-156111

p10f32x/H15-Jun-2019-805670

p12c509/H15-Jun-2019-911670

p12ce518/H15-Jun-2019-431366

p12f675/H15-Jun-2019-1,7851,492

p16f628/H15-Jun-2019-162104

p16f676/H15-Jun-2019-922740

p16f684/H15-Jun-2019-1,6021,257

p16f690/H15-Jun-2019-2,3461,867

p16f84/H15-Jun-2019-647462

p16f873/H15-Jun-2019-12492

p16f88x/H15-Jun-2019-3,7042,935

p16f91x/H15-Jun-2019-4,1833,346

p18f/H15-Jun-2019-1,3271,027

p18f26k22/H15-Jun-2019-1,4421,211

p18f452_ports/H15-Jun-2019-168118

p1xf18xx/H15-Jun-2019-10,3138,837

port_stim/H15-Jun-2019-229168

psp/H15-Jun-2019-754624

register_stim/H15-Jun-2019-216142

resistor/H15-Jun-2019-221173

spi/H15-Jun-2019-828648

switch_test/H15-Jun-2019-459343

tmr0_16bit/H15-Jun-2019-651494

tmr1_16bit/H15-Jun-2019-934727

tmr3_16bit/H15-Jun-2019-685529

ttl/H15-Jun-2019-449333

txisr_test/H15-Jun-2019-297206

usart_test/H15-Jun-2019-1,4201,074

wavegen/H15-Jun-2019-469323

wdt/H15-Jun-2019-1,6751,215

Makefile.amH A D11-Nov-2018424 118

Makefile.inH A D03-May-202213.1 KiB480412

READMEH A D11-Nov-20183.3 KiB9066

TODOH A D11-Nov-2018142 116

make.regressionH A D11-Nov-2018914 4231

rt.shH A D16-Nov-2018602 3214

run_regression.shH A D09-Jun-20194.3 KiB249152

startup.stcH A D11-Nov-201847 64

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