CHOCHI - an inexpensive FPGA board with 128K SRAM

Topics relating to PALs, CPLDs, FPGAs, and other PLDs used for the support or creation of 65-family processors, both hardware and HDL.
ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

Re: CHOCHI - an inexpensive FPGA board with 128K SRAM

Post 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!
User avatar
enso
Posts: 904
Joined: 29 Sep 2012

Re: CHOCHI - an inexpensive FPGA board with 128K SRAM

Post by enso »

Here is my testing and programming setup for now:
testsetup.resized.jpg
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.
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut
User avatar
enso
Posts: 904
Joined: 29 Sep 2012

Re: CHOCHI - an inexpensive FPGA board with 128K SRAM

Post by enso »

EhBASIC is now running. Check http://apple2.x10.mx/CHOCHI/ for software and updates.
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: CHOCHI - an inexpensive FPGA board with 128K SRAM

Post 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
User avatar
enso
Posts: 904
Joined: 29 Sep 2012

Re: CHOCHI - an inexpensive FPGA board with 128K SRAM

Post 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.
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: CHOCHI - an inexpensive FPGA board with 128K SRAM

Post by 8BIT »

EhBASIC can be easily fixed to allow for IO in Page 2. Let me know if you want some pointers.

Daryl
Please visit my website -> https://sbc.rictor.org/
User avatar
enso
Posts: 904
Joined: 29 Sep 2012

Re: CHOCHI - an inexpensive FPGA board with 128K SRAM

Post 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!
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut
User avatar
enso
Posts: 904
Joined: 29 Sep 2012

Re: CHOCHI - an inexpensive FPGA board with 128K SRAM

Post 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).
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: CHOCHI - an inexpensive FPGA board with 128K SRAM

Post by 8BIT »

enso wrote:
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
Please visit my website -> https://sbc.rictor.org/
User avatar
Arlet
Posts: 2353
Joined: 16 Nov 2010
Location: Gouda, The Netherlands
Contact:

Re: CHOCHI - an inexpensive FPGA board with 128K SRAM

Post by Arlet »

Have you posted your .ucf file somewhere ?
User avatar
enso
Posts: 904
Joined: 29 Sep 2012

Re: CHOCHI - an inexpensive FPGA board with 128K SRAM

Post by enso »

Here is the .ucf file for CHOCHI-B/DILDAR-X1
top.ucf.zip
(757 Bytes) Downloaded 135 times
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut
User avatar
Arlet
Posts: 2353
Joined: 16 Nov 2010
Location: Gouda, The Netherlands
Contact:

Re: CHOCHI - an inexpensive FPGA board with 128K SRAM

Post 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)
User avatar
enso
Posts: 904
Joined: 29 Sep 2012

Re: CHOCHI - an inexpensive FPGA board with 128K SRAM

Post 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):
CHOCHIB.003.src.zip
(33.61 KiB) Downloaded 121 times
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?
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut
User avatar
Arlet
Posts: 2353
Joined: 16 Nov 2010
Location: Gouda, The Netherlands
Contact:

Re: CHOCHI - an inexpensive FPGA board with 128K SRAM

Post by Arlet »

This is what I see on pin 7 (D2) of the SRAM chip.
Attachments
sram1.png
User avatar
Arlet
Posts: 2353
Joined: 16 Nov 2010
Location: Gouda, The Netherlands
Contact:

Re: CHOCHI - an inexpensive FPGA board with 128K SRAM

Post 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.
Post Reply