Is this deliberate, or just a side-effect of the code changes?
- Fully generalized the mechanism for generating obj/*.lst, bin/*.pt, and boot/*.script from examples/*.pal. You can now drop any PAL assembly language program into the examples directory and type make to build these various output forms automatically using the shipped version of palbart.
On Tuesday, January 24, 2017 at 4:30:45 AM UTC, Warren Young wrote:
- Fully generalized the mechanism for generating obj/*.lst, bin/*.pt, and boot/*.script from examples/*.pal. You can now drop any PAL assembly language program into the examples directory and type make to build these various output forms automatically using the shipped version of palbart.
I'm not getting this to work. The example I'm using (cylon.pal) has previously been verified as a valid .pal file with no errors.Sample output below, with various input options.pi@raspberrypi:~/src/pidp8i/trunk/examples $ make
It is not sure, but certainly a real PDP8 when in a tight loop
I've checked in a fix for this, so anyone who wants to try this before I get around to cutting another release can update from Fossil and give it a try.
If for example 6000 emulation cycles occurred and one LED was on for 983 of them, we want 983/6000 brightness.
Can you make it more efficient by incrementing a count in the Part One calculation for each LED state ...
The brtval needs to be moved to the emulation thread side so that nothing is missed.
I found some example code on using a mutex as well that allow good synchronizing between the threads.
I plan on replacing led_status with a led_values[columns][rows] that can hold a 32 bit integer each for a count. When the set leds function is called, as it will change the led_values array, it will entirely be wrapped in a mutex.
The threads shouldn't fight too much as the copy/clear only happens once every 10ms.
I don't see a way around this. At minimum, a count of how many times it was on during a period vs how many counts in the period is necessary because of the much slower display thread.
...decent performance on older pi's
does the ARM support RMW in a single instruction
Do you really think a mutex once every 10ms is going to be a big performance penalty?
I'm happy to do it, but it will have to wait until next Wednesday.
It only needs one count, not one for each LED.
Each time the set led's function is called, the total count gets bumped.
Could be the final element of an array sized COLS*ROWS+1 or its own variable.
My concern with read-modify-write is that with both threads running, it would read a large value in order to increment it, and while modifying it the other thread would change the pointer, and it would write the large value to the fresh empty array. If somewhat remember reading that ARM had a way to deal with this in one instruction so it wasn't an issue.
create a ringbuffer of the cpu registers and state needed to recreate the display the way that set led's does. The cpu thread could feed these states into the buffer with its own pointer and the display thread could read/process them using its own.
I've just tagged the biggest release of the PiDP-8/I software yet:
- When any program that talks to the PiDP–8/I front panel starts up, it now prints out a banner modeled on the Erlang configuration line. Real-world examples:
PiDP-8/I trunk:i49cd065c [pi3b] [ils] [serpcb] [gpio]
PiDP-8/I release:v20170123 [cake] [nls] [nopcb] [rt]- The ILS feature can now be disabled at configure time via the new --no-lamp-simulator flag. This option is automatically set when building on a single-core Raspberry Pi. (The flag is there only to allow someone building the software on a multi-core host machine to disable the ILS. There is currently no easy way to force the use of the ILS on a single-core Pi, on purpose.)
- Tweaked the ILS decay constants to be asymmetric, better mimicking the way real incandescent lamps work: they heat up to full brightness faster than they fade to perceptively “off.”
- The LED values used by the GPIO thread were being recalculated way too often. They're now updated only about 100 times a second, with the rate continually adjusted based on the simulator's current execution speed.
- In prior versions, the ILS was only updating at its intended rate when the PDP–8 simulator was running flat-out on a current multi-core Raspberry Pi. If you throttled the SIMH simulator to a slower execution rate, the display quality would start to degrade noticeably below about 1 MIPS.
- With the prior fix, we now ship 5.script (i.e. the handler for starting the simulator with IF=5, or restarting it with IF=5 + SING_STEP) set to a throttle value of 30 kIPS, which allows the human to see each AC/MQ modification. The built-in delay loops are still there, else we’d have to drop this to well under 1 kIPS.
- The SING_INST switch now immediately puts the processor into single instruction mode, not requiring a separate press of the STOP key, as in prior versions. This is the correct behavior according to the 1967–1968 edition of DEC’s Small Computer Handbook for the PDP–8/I.
- Greatly simplified the way single-instruction mode, processor stoppage, and the CONT key work. The prior implementation was error-prone and difficult to understand. This fixes a particularly bad interaction between the way HLT instructions and CONT key presses were handled, causing the processor to not resume correctly from HLT state.
- Consolidated and cleaned up the bulk of the PiDP–8/I switch handling code so that it is not so intimately tied into the guts of the PDP–8 CPU emulator. This will greatly increase the chance that future updates to the upstream SIMH PDP-8 CPU code will apply cleanly to our version.
- Fixed a bug in examples/bit-rotate.pal which caused it to skip the actual bit rotation step. We were trying to microcode two instructions into one that the PDP–8 won’t accept together, and we didn’t catch it until now because the HLT bug masked it, and the palbart assembler we ship isn’t smart enough to notice the bug.
- Fully generalized the mechanism for generating obj/*.lst, bin/*.pt, and boot/*.script from examples/*.pal. You can now drop any PAL assembly language program into the examples directory and type make to build these various output forms automatically using the shipped version of palbart. This effectively turns this PiDP–8/I software distribution into a PDP–8 assembly language development environment: rapidly build, test, and debug your PAL programs on your PC before you deploy them to real hardware. Or, write PAL programs to debug the hardware or simulator, as we did with examples/bit-rotate.pal.
- Fixed a sorting bug in the tool that generates boot/*.script from obj/*.lst, resulting in dep instructions that weren’t sorted by core address. This didn’t cause any real problem, but it made tracing the execution of a PAL assembly program difficult if you were trying to refer to the boot/*.script file to check that the PiDP–8/I’s front panel is showing the correct register values.
- Updated SIMH to the latest upstream version and shipping a subset of the SIMH docs as unversioned files from tangentsoft.com.
- The configure script now aborts the build if it sees that you’re trying to build the software as root, since that means it generates the init script and the pidp8i script expecting to run the installed software as root, not as your normal user. The most common way this happens is that you have a configured source tree, then change one of the *.in files and say sudo make install, thinking to build and install the change in one step. This fixes that.
- Several improvements to the build system.
"I'd never seen ARM assembly until today, and boy, what I shock I got.
Your example isn't necessarily a real-world situation, though.
I ran into a bug on an ARM-based project several months ago...
After all of the screen lines for it to be built, I do an enter and I get the base directory../bin, etc,..
It does not ask for a Login nor for a Password
What I would like to do is to be able to run Pidp8i-test
I have tried many of Your Sudo commands and mostly it tells me there is a problem or I need to set up the Login and Password..
Or when I do a .configure it says that the Log file is Read only.. Etc..
Or do I need to go to an Older SD file to make it work.. This is with a Raspberry pi A+ unit..
I used -- pidp8i-2017.01.16-nls-jessie-lite ..
>I don't see your logic. Each LED must have a separate brightness, because each LED has a different history.
If the set led's function is called at the end of each instruction and it is responsible for taking the processor state and setting the led status based on it, then aren't all led's in the same boat at this instant? They are on or off all together, right? In this case you just need a single counter for the number of calls to set led's.
On Friday, January 27, 2017 at 6:44:17 PM UTC-5, Warren Young wrote:Do you have any thoughts on which memory model suits the design better? Do I really need the full sequential consistency model, or can I get by with one of the less restrictive ones, since the code will be structured in a simple producer-and-consumer pattern?I don't tend to think in terms of CS theory generally so maybe I'm over-simplifying here, but as long as the consumer (display) side can keep up with what's being produced, I'd just start out with double buffering the data if at all possible
how critical is it if some of the data (I'm not sure what a realistic value for "some" is) is off by an instruction cycle or so?
I'm dealing w/a kidney stone right now
Have You had time to fix the problem for the Single Pi Version, so I can use it ??
That way I can figure out what I need to do, to Test my PiDP8..
On the third session there were some issues. With no throttle set in the script and using CNTL-E to escape to SIMH the throttle was set to 30k. In this case the registers remained blank. They stayed blank when the throttle was changed to 1k and returned to proper functioning when set to no throttle, and worked properly for trottle 30k after that. It would help to have someone also also test for this anomaly.
It would be ideal at some point i f the time constants were faster on boot so the lamps were on a bit earlier. It would also be quite helpful of the screen froze with the correct register display when SIMH is escaped with CNTL-E.
Thanks for all these improvements!
Brandon
On the third session there were some issues. With no throttle set in the script and using CNTL-E to escape to SIMH the throttle was set to 30k. In this case the registers remained blank.
It would help to have someone also also test for this anomaly.
It would be ideal at some point i f the time constants were faster on boot so the lamps were on a bit earlier.
It would also be quite helpful of the screen froze with the correct register display when SIMH is escaped with CNTL-E.
I Don't know Where nor How to get V20161218, to put on my SD Card..
it complained it was too short and rejected it..
If it was me I would have a CR for a Password, I mean it's only a Pidp8..
Did You Ever work for either DEC or Data General ??
You're asking me to help you set it up naked on your network, maybe even with a wifi radio, so it's even easier to get into undetected?
It would also be quite helpful of the screen froze with the correct register display when SIMH is escaped with CNTL-E.
Sorry to say that I seem to have found a bug.
"" This is highly flexible open source software. Changing the password policies, disabling the login, and more is all possible, if you're wiling to learn how. It's all a Google search away. ""I am still trying to Understand PDP8 code, not to say anything about something as complicated Linux programming..
When you "cont" to resume the registers goes black for an extraordinarily long time at throttle 30k
Presumably this is the same delay as at startup.
There could be a future fix that presets the running LED state with the LED state during the halt.
Sorry to say that I seem to have found a bug.I updated via fossil, all went smoothly, but now I'm unable to enter any code via the panel switches.
On Wednesday, February 1, 2017 at 11:41:10 AM UTC-7, Brian R wrote:
On Wednesday, February 1, 2017 at 2:22:42 PM UTC, Brian R wrote:EDIT. I have just reverted to an earlier release (pidp8i-6888919960.tar.gz) and now I can enter code from the panel again.However, I'm now unable to directly launch OS/8 by typing 'pidp8i'.So what does happen when you say that?
I just built and installed that version here, and it does start with the systemctl command, and the pidp8i command does attach to the simulator's screen(1) session.
Your IF switches aren't set to anything when you (re)start the simulator, are they?
PiDP-8/I led-counters:id[e2113929] [pi3b] [ils] [stdpcb] [gpio] [rt]
PDP-8 simulator V4.0-0 Beta git commit id: 370cb0ed
The LEDs look great at throttle 30k when started in the script. The issue arises only when the throttle is set at the SIMH prompt. When you go from no throttle to throttle 30k the register LEDs are blank and stay blank for at least 15 minutes perhaps forever (Fetch and Execute are about 50% bright), regardless of the throttle in the script. This is very reproducible for me here.
Brandon
The LEDs look great at throttle 30k when started in the script. The issue arises only when the throttle is set at the SIMH prompt.
On Wednesday, February 1, 2017 at 6:16:18 PM UTC-7, Brandon Himoff wrote:The LEDs look great at throttle 30k when started in the script. The issue arises only when the throttle is set at the SIMH prompt.
If I get it fixed tonight, it will be announced.
Actually I knew you hadn't gotten there yet, but I thought my original bug report was slightly flawed and incomplete. It looks like it is all fixed now. I hope you are getting enough sleep! I'll see if I can find anything else, but nothing broke yet.
Thanks,
Brandon
It looks like it is all fixed now.
I hope you are getting enough sleep!
I'll see if I can find anything else, but nothing broke yet.
I've found one thing, running pidp8i-test gives no display at all, but does respond to SR changes.
I see that in the pidp8i-test, the column and row LED test is much faster. An improvement I think.
Arguable, I'm sure. The new speed is what I want, but if you're trying to debug things, maybe not what you want.The window for comments is open. :)
On Friday, February 3, 2017 at 7:32:18 AM UTC-5, Warren Young wrote:Arguable, I'm sure. The new speed is what I want, but if you're trying to debug things, maybe not what you want.The window for comments is open. :)
I'm not sure the automatic stepping is all that useful.
So how about this for a U/I:
This behavior could be selected with a command line switch
There's a fairly elaborate plan for giving pidp8i-test command options. We can certainly toss a few more carrots into the stew.
(Arrow keys: +1!)