VERSION 4.0 - RELEASE

QA 2010 NOV 29

Some changes from the 3.x code stream.

1. The IO structure has been completeley regularized. It was ok in 3.6, but as more peripherals were added,
they were somewhat divergent from the regular structure. Cogs now all adhere to the same IO structure, which makes it
very easy to connect IO.

2. The core is now a minimum, almost. PropForthPart1.f and PropForthPart2.f have been replaced with PropForthCore.f.
The forth is a subset. Load in the file PropForth.f and do a saveforth to get a fuller forth.

3. An optional load structure [if   ] has been added for configuration management reasons.

4. A very simple file system for the 64Kx8 eeproms has been added. Thisa allows saving files to the upper part of
eeprom not used by the propeller. Can extend to use mulitiple 64kx8 eeproms, tested up to 3 64kx8 eeproms. fs.f

5. The data area size for each cog has bee shrunk to 224 bytes.

6. Only one forth cog now starts up, COG 6, it then starts everything else. This make initialization much simpler. 
COG 6 now starts up the default serial cog. As a resultit is very easy to add additional serial cogs.
All cogs are started now by the default routine.

7. fl was changed to load the file as it comes in. This takes advantage of the regular IO structure, where a COG
reads the input, and routes it to another cog. A change in behaviour, the cog which compiles the code is not the 
cog the fl command was executed on. Only important when modifying cog specific variables.

8. Free cogs are now deemed to be any with no IO connected.

9. Regular structure established for cog status, any non forth cogs must adhere to this.


PropForth should run on just about any configuration. 


Built a reference 3 prop system for testing:

Propeller Prototype Board, 5 MHz 64kx8 eeprom.
40 Pin Dip prop chip  added to this board.
spinneret board connected to the Prototype board.

NOTE: the 220 ohm resistors are to limit current in the case of SW misgonfiguration, anything from about 100 - 400 ohms
is suitable. Any larger values will slow down the edges, and can cause problems with the serial and com drivers.

This part of the configuration allows for testing of the norom boot, the serial driver, and the com synchronous
communication driver.

Prototype - the master is a propeller protoboard @ 5 MHZ with a 64kx8 rom,
with a FTDI USB->rs232 attached to the header

Add a prop chip, used a 40 pin dip
Run power and ground 2 0.1 uF caps between the power and ground pins, close to the chip

10k pullup resistor on  IO 29 - the pin normally hookup up to sda on the eeprom

Protoboard			Prop Chip	
IO 8 	-> 220 ohm resistor 	-> IO 28 (this pin normally hooks up to scl on the eeprom)
IO 9 	-> 220 ohm resistor 	-> IO 29 (this pin normally hooks up to sda on the eeprom, 10k pullup resistor as well)
IO 10	->			-> RESET
IO 11 ->			-> XI

This is a serial port connection so we can talk to PropForth on the Prop Chip serially if we so choose

IO 0	-> 220 ohm resistor 	-> IO 30
IO 1	-> 220 ohm resistor 	-> IO 31



These connections are made to the header on the Spinneret board.

				Spinneret

IO 12	-> 220 ohm resistor	-> IO 30
IO 13	-> 220 ohm resistor 	-> IO 31
IO 14	->			-> RESET
GND	->			-> GND




PropForth.spin		- spin file, load this into eeprom 
spinmaker.f		- used to generate new spin code, used to build a new core
PropForthCore.f		- the forth code which is necessary to run and rebuild worth

PropForth.f		- the additional forth words 

LogicAnalyzer.f		- a very simple and effective Logic Analyzer, used to look as signals

norom.f			- a set of routines which emulate an eeprom, and allow the booting of a slave chip

com.f			- a high speed synchrounous set of IO channels between 2 props, uses only 2 pins

comnorom.f		- combines norom & com, to boot a chip with no eeprom or XTAL, and then uses the pins
			normally used for the eeprom to provide 8 synchronous channels

asm.f			- an assembler 

snet.f			- configuration to drive the Spinneret board

fs.f			- the file system


README.txt		- this file

spinneret_eth.f		- beginnings of a new ethernet driver for PropForth, will use this as a development example, function first,
			verification, followed by optimization



Standard regression test process:

1. Connect Propclip to the Spinneret Board and load Propforth.spin into eeprom.

2. Connect PropClip to the Prototype Board and laod Propforth.spin into eeprom.

THIS SET OF TESTS ALL RUN ON THE Proto Board

3. start teraterm, 57kB not other setting change necessary

4. hit enter, words <enter> make sure forth is alive

5. paste contents of PropForthCore.f into teraterm

6. paste the contents of spinmaker.f into teraterm

7. run spinmaker

8. compare the output of spinamker to PropForth.spin (where the dictionary starts, I use windiff)
	(should be no differences) this verifies the PropForthCore.f code base is reproducable

9. reboot, load the contents of fs.s into teraterm, do a saveforth, reboot

10. type in fsclear, initializes file system

11. copy the contents of the following files into teraterm:

propforth.f
LogicAnalyzer.f
asm.f
norom.f
com.f
comnorom.f
snet.f

12. fsls - should produce the following:

fsls

008000 002272 propforth.f
00A280 000E77 LogicAnalyzer.f
00B140 0020CE asm.f
00D240 000D0F norom.f
00DF80 001426 com.f
00F3C0 000221 comnorom.f
00F600 000112 snet.f

8C0  bytes free in files system

Prop0 Cog6 ok

13. reboot, fsload LogicAnaLyzer.f

14. c" hex a aae60 setHza b 6ACFC0 setHzb" 5 cogx, starts up 2 clocks on IO pins A & B, then run
sampleNoTrigger
sampleTrigger
sampleFourTrigger
sampleOneNoTrigger

decimal displayTriggerFrequency hex




Prop0 Cog6 ok
c" hex a aae60 setHza b 6ACFC0 setHzb" 5 cogx
Prop0 Cog6 ok

Prop0 Cog6 ok
sampleNoTrigger

0A-_-_-_-__-_-_-_--_-_-_-__-_-_-_--_-_-_-__-_-_-_--_-_-_-__-_-_-_--_-_-_-__-_-_-_--_-_-_-__-_-_-_--_-_-_-__-_-_-_--_-_-_-__-_-_-_--_-_-_-__-_-_-_--_-_-_-__-_-_-_-

0B__-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_-

0C----------------------------------------------------------------------------------------------------------------------------------------------------------------

0D----------------------------------------------------------------------------------------------------------------------------------------------------------------

0E----------------------------------------------------------------------------------------------------------------------------------------------------------------

0F________________________________________________________________________________________________________________________________________________________________

10________________________________________________________________________________________________________________________________________________________________

11________________________________________________________________________________________________________________________________________________________________
Prop0 Cog6 ok
sampleTrigger

0A-_--_-_-_-__-_-_-_--_-_-_-__-_-_-_--_-_-_-__-_-_-_--_-_-_-__-_-_-_--_-_-_-__-_-_-_--_-_-_-__-_-_-_--_-_-_-__-_-_-_--_-_-_-__-_-_-_--_-_-_-__-_-_-_--_-_-_-__-_-_

0B_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-_--_-__-

0C----------------------------------------------------------------------------------------------------------------------------------------------------------------

0D----------------------------------------------------------------------------------------------------------------------------------------------------------------

0E----------------------------------------------------------------------------------------------------------------------------------------------------------------

0F________________________________________________________________________________________________________________________________________________________________

10________________________________________________________________________________________________________________________________________________________________

11________________________________________________________________________________________________________________________________________________________________
Prop0 Cog6 ok
sampleFourTrigger

0A_____________--------------_______________--------------______________---------------______________--------------______________---------------__________________

0B__-__-__-_--_--_--_-__-__-__-_--_--_--_-__-__-__-_--_--_--_-__-__-__-_--_--_--_-__-__-__-_--_--_--_-__-__-__-_--_--_--_-__-__-__-_--_--_--_-__-__-__-_--_-______

0C----------------------------------------------------------------------------------------------------------------------------------------------------------______

0D----------------------------------------------------------------------------------------------------------------------------------------------------------______

0E----------------------------------------------------------------------------------------------------------------------------------------------------------______

0F________________________________________________________________________________________________________________________________________________________________

10________________________________________________________________________________________________________________________________________________________________

11________________________________________________________________________________________________________________________________________________________________
Prop0 Cog6 ok
sampleOneNoTrigger

0A----------------------------------_________________________________________________________---------------------------------------------------------____________

0B----______------_____------______-----______------______-----______------_____------______------_____------______-----______------______-----______------_____--

0C----------------------------------------------------------------------------------------------------------------------------------------------------------------

0D----------------------------------------------------------------------------------------------------------------------------------------------------------------

0E----------------------------------------------------------------------------------------------------------------------------------------------------------------

0F________________________________________________________________________________________________________________________________________________________________

10________________________________________________________________________________________________________________________________________________________________

11________________________________________________________________________________________________________________________________________________________________
Prop0 Cog6 ok
decimal displayTriggerFrequency hex
701754.385
Prop0 Cog6 ok


15. reboot, fsload com.f, Define the 2 following routines


fl
: cominit
	c" 14 15 FF 3 commaster" 4 cogx
	c" 14 15 FF 3 comslave" 5 cogx
	100 delms
	0 0 5 0 (ioconn)
	1 0 5 1 (ioconn)
	2 0 5 2 (ioconn) ;

: comstat 4 cogio dup comcnt L@ . comerr L@ . 5 cogio dup comcnt L@ . comerr L@ . cr ;



16. type: ( this starts a terminal, and connect to cog0  via the com interfaces, CTL-F exits
cominit comstat
4 0 term 



Prop0 Cog6 ok
fl
: cominit
 c" 14 15 FF 3 commaster" 4 cogx
 c" 14 15 FF 3 comslave" 5 cogx
 100 delms
 0 0 5 0 (ioconn)
 1 0 5 1 (ioconn)
 2 0 5 2 (ioconn) ;
Prop0 Cog0 ok

Prop0 Cog0 ok
: comstat 4 cogio dup comcnt L@ . comerr L@ . 5 cogio dup comcnt L@ . comerr L@ . cr ;
Prop0 Cog0 ok

Prop0 Cog0 ok

Prop0 Cog6 ok
cominit comstat
CE 0 EC 0
Prop0 Cog6 ok
4 0 term
Hit CTL-F to exit term

Prop0 Cog0 ok

Prop0 Cog0 ok

Prop0 Cog0 ok
1 2 3 . . .
3 2 1 Prop0 Cog0 ok
Prop0 Cog6 ok



THIS SET OF TESTS ALL RUN ON THE Proto Board + the 40 pin Propeller Chip

17. reboot, fsload norom.f

18. Define to following words, run demo, CTL-F to exit

fl
: bootslave 8 9 A B rambootnx ;
: demo bootslave 1 0 e100 4 startserialcog 10 delms 4 0 term ;

\ 4 0 term - will connect again after demo is run


Prop0 Cog6 ok
fl
: bootslave 8 9 A B rambootnx ;
Prop0 Cog0 ok
: demo bootslave 1 0 e100 4 startserialcog 10 delms 4 0 term ;
Prop0 Cog0 ok

Prop0 Cog6 ok
demo
Hit CTL-F to exit term

 SLAVEProp8 Cog6 ok

 SLAVEProp8 Cog6 ok
1 2 3 . . .
3 2 1  SLAVEProp8 Cog6 ok
Prop0 Cog6 ok


19. reboot, fsload comnorom.f

20. run: CTL-F to exit
0 onboot
5 0 term


Prop0 Cog6 ok
0 onboot
MASTERProp0 Cog6 ok
5 0 term
Hit CTL-F to exit term

 SLAVEProp8 Cog0 ok
1 2 3 . . .
3 2 1  SLAVEProp8 Cog0 ok
MASTERProp0 Cog6 ok


THIS SET OF TESTS ALL RUN ON THE Proto Board + Spinneret Board

21. reboot, load snet.f, run snet, CTL-F to exit

22. define the following words, do a saveforth, reboot
: _ob onboot ;
: onboot _ob c" SNETProp" prop W! ;


Prop0 Cog6 ok
: _ob onboot ;
Prop0 Cog6 ok
: onboot _ob c" SNETProp" prop W! ;
Prop0 Cog6 ok
saveforth
..........................................................................................................................................................
Prop0 Cog6 ok
reboot
RESET SNETProp0 Cog6 ok

SNETProp0 Cog6 ok
1 2 3 . . .
3 2 1 SNETProp0 Cog6 ok

SNETProp0 Cog6 ok
Prop0 Cog6 ok






