Re: [Simh] VAXELN, rtVAX-1000, WTC, time

2018-12-15 Thread Johnny Billquist

Not really. :-)

This gives the technical explanation on how the system works. Bottom 
line is that you have a TOY clock, and it continues working even with 
power off. The battery is just the power source of the TOY when main 
power is off. What is needed to be understood is how the TODR register 
works.


And to clarify things more to the OP, the TOY is then responsible for 
updating the TODR. So TODR should always continue counting even if power 
is off. So if you always see low values, it would seem that it gets 
reset at some point.
The TODR have no further meaning. It is just a free running counter 
incrementing every 10 ms. It's up to the OS to do something clever with 
it. I don't remember exactly how VMS or anything else use it, but it is 
used in combination with some information stored in the file system to 
figure out what the current time is at boot.


  Johnny


On 2018-12-15 22:25, Wilm Boerhout wrote:



The few actual reads of the TODR during ELN's execution are returning low 
values (since nothing actually set the clock yet).

Do you get the same result if you don't attach the CLK device?

If the result is the same, then it would seem that ELN doesn't care to use the 
hardware clock for much of anything.  Maybe there is some setting within ELN 
that could influence more direct use of the clock.

- Mark


This from the rtVAX 1000 System User's Guide (1985)

When the system is off, the battery backup unit (BBU) (internal) provides
power to the time-of-year (TOY) clock chip on the KA620-A. The code for
the user's language is stored in RAM on this chip and is lost if the BBU 
fails.


For more information, see the rtVAX KA620A CPU Module User's Guide

That guide is not to be found on line. So what we're really looking for, 
is a battery. :-)



___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh




--
Johnny Billquist  || "I'm on a bus
  ||  on a psychedelic trip
email: b...@softjar.se ||  Reading murder books
pdp is alive! ||  tryin' to stay hip" - B. Idol
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] VAXELN, rtVAX-1000, WTC, time

2018-12-15 Thread Wilm Boerhout



The few actual reads of the TODR during ELN's execution are returning low 
values (since nothing actually set the clock yet).

Do you get the same result if you don't attach the CLK device?

If the result is the same, then it would seem that ELN doesn't care to use the 
hardware clock for much of anything.  Maybe there is some setting within ELN 
that could influence more direct use of the clock.

- Mark


This from the rtVAX 1000 System User's Guide (1985)

When the system is off, the battery backup unit (BBU) (internal) provides
power to the time-of-year (TOY) clock chip on the KA620-A. The code for
the user's language is stored in RAM on this chip and is lost if the BBU 
fails.


For more information, see the rtVAX KA620A CPU Module User's Guide

That guide is not to be found on line. So what we're really looking for, 
is a battery. :-)


___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] VAXELN, rtVAX-1000, WTC, time

2018-12-15 Thread Wilm Boerhout

Mark Pizzolato schreef op 15-12-2018 om 21:42:

On Saturday, December 15, 2018 at 12:09 PM, Wilm Boerhout wrote:

[...]


DBG(1041144)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B84

This line ^^^ and all above it are done by the MicroVAX 3900 boot
ROM and have nothing to do with ELN.


DBG(7056415)> CLK REG: todr_rd() - TODR=0x132A4
DBG(7056419)> same as above (1 time)
DBG(9598293)> CLK REG: todr_rd() - TODR=0x133F0
DBG(11998428)> CLK REG: todr_rd() - TODR=0x13526
DBG(14398563)> CLK REG: todr_rd() - TODR=0x1365C

Simulation stopped, PC: 800066EE (BEQL 800066EA)
sim> quit
Goodbye
NVR: writing buffer to file
CLK: writing buffer to file
Eth: closed tap0

The few actual reads of the TODR during ELN's execution are returning low 
values (since nothing actually set the clock yet).

Do you get the same result if you don't attach the CLK device?

If the result is the same, then it would seem that ELN doesn't care to use the 
hardware clock for much of anything.  Maybe there is some setting within ELN 
that could influence more direct use of the clock.

- Mark


Thanks Mark for clatifying this.

That might well be the case. That is why I'm interested how a real rtVAX 
preserves its clock. Maybe it didn't, and you had to enter the right 
time on every boot. In which case simh would be right. These systems 
would sometimes run for years. Documentation is scarce, however. I 
havesome leads th real rtVAX-systems, but not very soon.


Anyway, with MV3900 the behaviour doesn't change when I do not attach 
the CLK device. System time starts at VMS Zero.


Let's let it rest. I will go out on this thing called The Internet and 
look better for docs.



*Wilm*

___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] VAXELN, rtVAX-1000, WTC, time

2018-12-15 Thread Wilm Boerhout

Mark Pizzolato schreef op 15-12-2018 om 19:10:

Hi Wilm,

On Saturday, December 15, 2018 at 3:45 AM, Wilm Boerhout wrote:

I'm trying to get my head around VAXELN and system time.

Before I cry "Wolf" and accuse any innocent program(mer) of instruction
obstruction, I want to know how things are supposed to work here (i.e.
as on a real rtVAX with VAXELN)

I have built a VAXELN system image and can download this into the simh
rtVAX. Whatever simh setting I use, the VAXELN system clock always
starts at 0, starting time after boot on 17-NOV-1858. I can set the time
manually, but it is not preserved across boot. Should it be?

simh ini file:

echo rtVAX-1000

set CPU diag=MIN 16M idle=ELN conhalt autoboot
set WTC time=STD

set DZ  disable
set LPT disable
set RL  disable
set TS  disable
set TQ  disable

att -e NVR /opt/ka620.nvr

set RQ0 rd54
att -e RQ0 /vdisk/VAXELN.vdisk

set XQ type=DEQNA mac=08:00:2B:13:01:92
att XQ TAP:tap0

set DEBUG /opt/ka620.debug
set WTC DEBUG

boot

contents of ka620.debug after booting and shutdown (well, no shutdown on
ELN, so ctrl/E)

/opt/rtvax1000.ini-20> set DEBUG /opt/ka620.debug
Debug output to "/opt/ka620.debug"
Debug output to "/opt/ka620.debug" at Sat Dec 15 11:57:42 2018
rtVAX1000 (KA620) simulator V4.0-0 Current    git commit id: c2b45a26
/opt/rtvax1000.ini-23> boot
Loading boot code from internal ka620.bin
DBG(146257)> WTC REG: wtc_rd(pa=0x200B801A [CSRD], data=0x80) VALID1

Simulation stopped, PC: 800066EA (TSTL 8900)
sim> quit
Goodbye
NVR: writing buffer to file
Eth: closed tap0

 From the debug log it is clear that, although the CSRD register was read and
the time it contained was indicated as being VALID, no other references were
made by the running system to anything that contained time data so it isn't
surprising that the time is 0.

Try running ELN with the MicroVAX3900 simulator and see if you get different
behavior.

- Mark


Overall behaviour is the same with the MicroVAX 3900. After booting ELN, 
time is "VMS Zero", even after setting it to today, then quitting and 
restarting simh.


MV3900 ini file:

set CPU 16M idle=ELN conhalt noautoboot
att -e CLK /opt/ka655.toy

set DZ  disable
set LPT disable
set RL  disable
set TS  disable
set TQ  disable

att -e NVR /opt/ka655.nvr

set XQ type=DEQNA mac=08:00:2B:13:01:92
att XQ TAP:tap0

set DEBUG /opt/ka655.debug
set CLK debug

boot



DEBUG output:

root@raspi2-old ~ # cat /opt/ka655.debug
/opt/pi3k9.ini-19> set DEBUG /opt/ka655.debug
Debug output to "/opt/ka655.debug"
Debug output to "/opt/ka655.debug" at Sat Dec 15 21:00:59 2018
MicroVAX 3900 simulator V4.0-0 Current    git commit id: c2b45a26
/opt/pi3k9.ini-22> boot
Loading boot code from internal ka655x.bin
DBG(34)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5A39
DBG(961145)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B6A
DBG(962890)> same as above (436 times)
DBG(962894)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B6B
DBG(966023)> same as above (781 times)
DBG(966027)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B6C
DBG(969151)> same as above (781 times)
DBG(969155)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B6D
DBG(972281)> same as above (781 times)
DBG(972285)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B6E
DBG(975413)> same as above (782 times)
DBG(975417)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B6F
DBG(978541)> same as above (781 times)
DBG(978545)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B70
DBG(981673)> same as above (782 times)
DBG(981677)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B71
DBG(984801)> same as above (781 times)
DBG(984805)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B72
DBG(987933)> same as above (782 times)
DBG(987937)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B73
DBG(991061)> same as above (781 times)
DBG(991065)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B74
DBG(994193)> same as above (782 times)
DBG(994197)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B75
DBG(997321)> same as above (781 times)
DBG(997325)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B76
DBG(1000453)> same as above (782 times)
DBG(1000457)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B77
DBG(1003581)> same as above (775 times)
DBG(1003585)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B78
DBG(1006710)> same as above (780 times)
DBG(1006714)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B79
DBG(1009842)> same as above (782 times)
DBG(1009846)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B7A
DBG(1012972)> same as above (781 times)
DBG(1012976)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B7B
DBG(1016100)> same as above (781 times)
DBG(1016104)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B7C
DBG(1019232)> same as above (782 times)
DBG(1019236)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B7D
DBG(1022360)> same as above (781 times)
DBG(1022364)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B7E
DBG(1025492)> same as above (782 times)
DBG(1025496)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B7F
DBG(1028620)> same as above (781 times)
DBG(1028624)> CLK REG: todr_rd(ROM) - TODR=0xC3AA5B80
DBG(1031752)> same as above (782 times)
DBG(1031756)> CLK REG: 

Re: [Simh] VAXELN, rtVAX-1000, WTC, time

2018-12-15 Thread Mark Pizzolato
Hi Wilm,

On Saturday, December 15, 2018 at 3:45 AM, Wilm Boerhout wrote:
> I'm trying to get my head around VAXELN and system time.
> 
> Before I cry "Wolf" and accuse any innocent program(mer) of instruction
> obstruction, I want to know how things are supposed to work here (i.e.
> as on a real rtVAX with VAXELN)
> 
> I have built a VAXELN system image and can download this into the simh
> rtVAX. Whatever simh setting I use, the VAXELN system clock always
> starts at 0, starting time after boot on 17-NOV-1858. I can set the time
> manually, but it is not preserved across boot. Should it be?
> 
> simh ini file:
> 
> echo rtVAX-1000
> 
> set CPU diag=MIN 16M idle=ELN conhalt autoboot
> set WTC time=STD
> 
> set DZ  disable
> set LPT disable
> set RL  disable
> set TS  disable
> set TQ  disable
> 
> att -e NVR /opt/ka620.nvr
> 
> set RQ0 rd54
> att -e RQ0 /vdisk/VAXELN.vdisk
> 
> set XQ type=DEQNA mac=08:00:2B:13:01:92
> att XQ TAP:tap0
> 
> set DEBUG /opt/ka620.debug
> set WTC DEBUG
> 
> boot
> 
> contents of ka620.debug after booting and shutdown (well, no shutdown on
> ELN, so ctrl/E)
> 
> /opt/rtvax1000.ini-20> set DEBUG /opt/ka620.debug
> Debug output to "/opt/ka620.debug"
> Debug output to "/opt/ka620.debug" at Sat Dec 15 11:57:42 2018
> rtVAX1000 (KA620) simulator V4.0-0 Current    git commit id: c2b45a26
> /opt/rtvax1000.ini-23> boot
> Loading boot code from internal ka620.bin
> DBG(146257)> WTC REG: wtc_rd(pa=0x200B801A [CSRD], data=0x80) VALID1
> 
> Simulation stopped, PC: 800066EA (TSTL 8900)
> sim> quit
> Goodbye
> NVR: writing buffer to file
> Eth: closed tap0

From the debug log it is clear that, although the CSRD register was read and 
the time it contained was indicated as being VALID, no other references were 
made by the running system to anything that contained time data so it isn't 
surprising that the time is 0.

Try running ELN with the MicroVAX3900 simulator and see if you get different 
behavior.

- Mark
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh