Page 4 of 7
Re: CHOCHI - an inexpensive FPGA board with 128K SRAM
Posted: Sat Sep 07, 2013 11:19 pm
by ElEctric_EyE
I had an 'OR's module in my project....
Now I see how to use the 'wor' on the 'top-level' for the cpu data in bus.
Another Thanks!
Re: CHOCHI - an inexpensive FPGA board with 128K SRAM
Posted: Mon Sep 09, 2013 7:07 pm
by enso
Here is my testing and programming setup for now:
Power reg board (I am only using the 3.3V output) is on the left; above right is the USB-serial board. Note that the CHOCHI board has no connectors soldered - the board is fitted over a pin header on the plugboard. I find that I can fit the CHOCHI over the pin header and tilt it a little to make solid (but temporary) connections, long enough to program the flash and test the board.
Re: CHOCHI - an inexpensive FPGA board with 128K SRAM
Posted: Thu Sep 19, 2013 12:24 am
by enso
EhBASIC is now running. Check
http://apple2.x10.mx/CHOCHI/ for software and updates.
Re: CHOCHI - an inexpensive FPGA board with 128K SRAM
Posted: Thu Sep 19, 2013 5:41 am
by BigEd
Great. This link shows all the sections in a reasonable order:
http://apple2.x10.mx/CHOCHI/#Summary%20 ... Bitstreams
I don't see any status reg for the serial ports: is there any indication when it has an input byte ready, or when it is OK to write another output byte?
(I'd certainly buy one or two if it ran from a 5V supply, such as I can extract from USB. Doesn't have to be a micro USB connector, although that's quite handy in EU where almost all phone chargers use it. The Raspberry Pi has a micro USB socket purely for power. Hmm, maybe I could use a Pi as a source of power as well as being the serial port master...)
I do like the idea of putting the loader down into the first two pages.
Did you keep the I/O at C000 or did you succeed in moving it down to 0200? I quite like the idea of putting it well out of the way. Putting it up in FF00 or even FFF0 is also appealling, for the same reasons.
Cheers
Ed
Re: CHOCHI - an inexpensive FPGA board with 128K SRAM
Posted: Thu Sep 19, 2013 6:47 pm
by enso
The serial port registers are documented here:
http://apple2.x10.mx/CHOCHI/#SerialPort. I will add links to make it more obvious.
The
next revision (boards are being fabbed) has a mini-USB connector and a 3.3V regulator for power. I left a prototyping area nearby and connected the USB signal pins in case anyone wants to mess with it.
I haven't moved the IO area yet. I like it in page 2 but it conflicts with EhBASIC. And keeping it high up creates a problem with ROM-like code that spans from the vectors down (Daryl's monitor being one)... It's a subject of much annoyance for me.
Re: CHOCHI - an inexpensive FPGA board with 128K SRAM
Posted: Thu Sep 19, 2013 7:25 pm
by 8BIT
EhBASIC can be easily fixed to allow for IO in Page 2. Let me know if you want some pointers.
Daryl
Re: CHOCHI - an inexpensive FPGA board with 128K SRAM
Posted: Thu Sep 19, 2013 8:25 pm
by enso
I do indeed want pointers. It appears that EhBASIC actually uses page 2, so I didn't bother messing with it. Thank you!
Re: CHOCHI - an inexpensive FPGA board with 128K SRAM
Posted: Thu Sep 19, 2013 9:32 pm
by enso
New bitstream release - see
http://apple2.x10.mx/CHOCHI/#Bitstreams
Loader now in page 0. IO still in C0xx. Cleaned up decoding - BRAMS at page 0,1,$FE and $FF (no mirroring anymore).
Please update your CHOCHI boards. Some software
http://apple2.x10.mx/CHOCHI/#Software will not load without the update (old bitstreams could not load software into pages above $F8 cleanly).
Re: CHOCHI - an inexpensive FPGA board with 128K SRAM
Posted: Thu Sep 19, 2013 10:14 pm
by 8BIT
I do indeed want pointers. It appears that EhBASIC actually uses page 2, so I didn't bother messing with it. Thank you!
I cut this from the v2.22 source:
Code: Select all
ccflag = $0200 ; BASIC CTRL-C flag, 00 = enabled, 01 = dis
ccbyte = ccflag+1 ; BASIC CTRL-C byte
ccnull = ccbyte+1 ; BASIC CTRL-C byte timeout
VEC_CC = ccnull+1 ; ctrl c check vector
VEC_IN = VEC_CC+2 ; input vector
VEC_OUT = VEC_IN+2 ; output vector
VEC_LD = VEC_OUT+2 ; load vector
VEC_SV = VEC_LD+2 ; save vector
; Ibuffs can now be anywhere in RAM, ensure that the max length is < $80
Ibuffs = VEC_SV+2 ; ***changed for SBC-2
; start of input buffer after IRQ/NMI code
Ibuffe = Ibuffs+$47; end of input buffer
Ram_base = $0400 ; start of user RAM (set as needed, should be page aligned)
Ram_top = $8000 ; end of user RAM+1 (set as needed, should be page aligned)
; This start can be changed to suit your system
*= $BC00
; BASIC cold start entry point
On my system, $02xx was the EhBASIC buffer, $03xx was the SBC2OS buffer, and $04xx was the start of user RAM.
Change ccflag to $0300
Make sure Ram_base is set to $0400,or $0500 if you want/need some extra buffer space at $04xx.
Make sure Ram_top is correct for your sytem
This will free up Page 2.
Hope that helps!
Daryl
Re: CHOCHI - an inexpensive FPGA board with 128K SRAM
Posted: Fri Sep 20, 2013 8:29 am
by Arlet
Have you posted your .ucf file somewhere ?
Re: CHOCHI - an inexpensive FPGA board with 128K SRAM
Posted: Fri Sep 20, 2013 3:45 pm
by enso
Here is the .ucf file for CHOCHI-B/DILDAR-X1
Re: CHOCHI - an inexpensive FPGA board with 128K SRAM
Posted: Fri Sep 27, 2013 7:52 am
by Arlet
Looking at some SRAM pins with the scope, I noticed intermediate voltage levels. Looks like colliding bus drivers. Any idea ?
(I didn't update the bitstream, so it's still with the default that you programmed it with)
Re: CHOCHI - an inexpensive FPGA board with 128K SRAM
Posted: Sat Sep 28, 2013 12:31 am
by enso
Hmm. That should not be the case (My apologies - I thought I'd tested your board)... The new bitstream should not be different as far as the SRAM goes, so the first thing I would do is update it and try FIG-FORTH and EhBASIC - most SRAM issues will make them not work right away.
Here is the verilog for the hardware of the new bitstream (003):
I will post a RAM test that checks all address lines tomorrow. I should really include it into the bootcode...
What pins showed weird voltages?
Re: CHOCHI - an inexpensive FPGA board with 128K SRAM
Posted: Sat Sep 28, 2013 6:35 am
by Arlet
This is what I see on pin 7 (D2) of the SRAM chip.
Re: CHOCHI - an inexpensive FPGA board with 128K SRAM
Posted: Sat Sep 28, 2013 7:07 am
by Arlet
Weird. When I touch the data pins with my finger while measuring the signal,I get strange distortions in the waveform. Doesn't look like bus collisions, but rather some high impedance signal from the FPGA, so there's a good chance the effect is benign.