RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » End year rant: starting a new design, the STUDIO 68 board for "experiments"... (A retro FPGA-centric board (68SEC000, STM32F030R8T6, EP2C8Q208, 16MW SDRAM))
End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #9476] Mon, 13 December 2021 02:40 Go to next message
just4fun is currently offline  just4fun
Messages: 273
Registered: May 2017
Location: Dark side of the Moon
Senior Member
It is something I'm thinking about during the last months and now I've some time to start developing it...

STUDIO 68 is a new ongoing design for a board to make "experiments". It has a 68SEC000 CPU, a STM32F030R8T6 MCU + USB + SD, a 16MWord SDR DRAM and a 208pin FPGA. It will be possible use the same approach to virtual HW using the STM32 MCU as done for the 68k-MBC, or synthesize it inside the FPGA (or a mix of both).

Two main connectors: the GPIO and the EB (External Bus). The (SHARED) GPIO allows to use little add-on boards/adapters as the one to give a VGA/KB output (the VGA/KB core must be implemented inside the FPGA). The EB is a real complete external bus RC2014 compatible. It will allows to add a board for virtually any CPU to make experiments and emulate peripherals HW inside the FPGA (a first application will probably be an "application board" for a soviet PDP11 CPU clone):

/forum/index.php?t=getfile&id=2540&private=0

Here the EB (External Bus) pinout (compared with the BP80/RC2014 enhanced bus it has 4 pins less to fit into a 100 x 100 mm 4-layer board, anyway the pinout should allow optimal compatibility). The various "control buses" (LCBn, ECB) are directly managed inside the FPGA, including the control signals (ECB) of the external bus. This should give a virtually complete HW reconfiguration capability, so it should be possible create virtual HW/peripherals for any legacy CPU. The external bus drivers have the Partial-Power-Down Mode and Back Drive protection, so the "target CPU board" connected to the external bus can have an independent power supply to accommodate power hungry CPUs:

/forum/index.php?t=getfile&id=2539&private=0

So we'll see...
  • Attachment: Ext_Bus.jpg
    (Size: 184.77KB, Downloaded 1991 times)
  • Attachment: Studio 68.jpg
    (Size: 149.33KB, Downloaded 2061 times)

[Updated on: Thu, 03 February 2022 07:12]

Report message to a moderator

Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #9477 is a reply to message #9476] Mon, 13 December 2021 04:21 Go to previous messageGo to next message
gbm is currently offline  gbm
Messages: 34
Registered: January 2018
Member
Why not some STM32 with built-in USB device interface? It opens many possibilities, like multiple terminals on a single USB cable. Even the old good F103 on a Chinese BluePill board will do, and there are many less-outdated choices, like F072, L412 or any other L4/H7. I offer to share some of my STM32 code from SDC68k if you would need it, including the hw monitor and disassembler.
Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #9478 is a reply to message #9477] Mon, 13 December 2021 05:32 Go to previous messageGo to next message
just4fun is currently offline  just4fun
Messages: 273
Registered: May 2017
Location: Dark side of the Moon
Senior Member
Yes you are right, anyway I want keep the MCU part very simple as the main focus is (at least for me) on the FPGA, and I already have some STM32F030R8T6 parts that I bought before the pandemic for about 0.7$ each.

The MCU should do here only very simple tasks, and a PIC18F (as the one used in the 68k-MBC) would have been enough. After all the good thing with the STM32 is that it is possible change the part without so much changes in the layout.

I've already done a first draft of the schematic but there are still some parts that need little changes, so the way is still very long...
Thanks you for your FW offer, I'll think about it when I have something real under my hands... Cool

[Updated on: Mon, 13 December 2021 05:58]

Report message to a moderator

Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #9480 is a reply to message #9478] Mon, 13 December 2021 06:35 Go to previous messageGo to next message
gbm is currently offline  gbm
Messages: 34
Registered: January 2018
Member
F072 layout is the same as F030, so maybe you could provide the USB socket option with PA11 & PA12. BTW, crystal is not necessary.
Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #9481 is a reply to message #9480] Mon, 13 December 2021 07:56 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Once you have 16meg of RAM, there is no reason for more memory so the expansion bus can simplify to 16 addresses, 8 data, controls, power/ground, and clock. 40-pin RC2014-like expansion connector should be enough.
Bill
Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #9488 is a reply to message #9480] Tue, 14 December 2021 02:35 Go to previous messageGo to next message
just4fun is currently offline  just4fun
Messages: 273
Registered: May 2017
Location: Dark side of the Moon
Senior Member
@gbm:

Yes, but currently all the GPIO are used, so some more analysis is required. I'll think about it, but to be honest is not on top of my priorities...

BTW: from the Mouser catalog the F072 costs about twice the F030 (that is one of the cheapest 64pin STM32 with at least 64KB flash), so I think that there are cheaper parts with an USB as may be the STM32F070RBT6 that has 128KB flash.



@plasmo:

The STUDIO 68 can be used with different target CPU too (holding the 68SEC000 Address and Data bus in High Z) using an "application board" on the External Bus (EB). In this case, if the target CPU is something like an 8086 you need a 16 lines data bus and a 20 lines address bus (all the RAM and the various peripherals are hosted inside the STUDIO 68 board that acts as slave).

[Updated on: Tue, 14 December 2021 03:22]

Report message to a moderator

Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #9725 is a reply to message #9488] Thu, 03 February 2022 07:02 Go to previous messageGo to next message
just4fun is currently offline  just4fun
Messages: 273
Registered: May 2017
Location: Dark side of the Moon
Senior Member
I've started the PCB layout.

It is a 4-layer with the following stack:

Layer 1: signals ("high speed" preferred);
Layer 2: GND plane;
Layer 3: Power + some signals ("low speed" preferred and only if really needed);
Layer 4: signals ("low speed" preferred).

Currently just placing the components (no routing yet) and trying to optimize the "ratnest":

/forum/index.php?t=getfile&id=2651&private=0

Here the current rendering of the board:

/forum/index.php?t=getfile&id=2652&private=0

/forum/index.php?t=getfile&id=2653&private=0

Still a long way ahead...
  • Attachment: A100821_6.jpg
    (Size: 100.64KB, Downloaded 1688 times)
  • Attachment: A100821_4.jpg
    (Size: 448.17KB, Downloaded 1576 times)
  • Attachment: A100821_5.jpg
    (Size: 183.95KB, Downloaded 1698 times)
Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #9764 is a reply to message #9725] Tue, 15 February 2022 04:58 Go to previous messageGo to next message
just4fun is currently offline  just4fun
Messages: 273
Registered: May 2017
Location: Dark side of the Moon
Senior Member
The hardest part of the routing is gone and fits into a 100x100mm 4-layer PCB...

/forum/index.php?t=getfile&id=2657&private=0

/forum/index.php?t=getfile&id=2658&private=0

Now I'm more optimistic...

I've attached the current untested draft of the schematic.

[Updated on: Sat, 19 February 2022 02:51]

Report message to a moderator

Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #9769 is a reply to message #9764] Mon, 21 February 2022 15:16 Go to previous messageGo to next message
coredump is currently offline  coredump
Messages: 33
Registered: January 2020
Location: Germany
Member
just4fun wrote on Tue, 15 February 2022 13:58


I've attached the current untested draft of the schematic.
Hi Fabio,

very well done, as usual.
And very interesting. Please keep us up to date :)

But I have a remark may be worth a few lines.

It's about Q5 that, what I understood, should supply eg. an other processor with a clock signal.
Simple saturated switches, especially those switching low currents with rather slow transistors intended
to switch higher currents, can be disappointingly slow.
With,say, a 5MHz...10MHz clock I assume the output might stick all time at a LOW-level enjoying the storage time of the
2n2222-derivative and the small cut-off current involved.

The slow transistor problem can be circumvented with something like mmbt2369A.
The cut-off base current can be improved with a small C || R27.
But the rise time of the output is than determined by R29 and the load capacitance.
With a load around 50pF (transistor, traces, clock-input, 1:10 oscilloscope probe) and an desirable
RC time of 5...10ns R27 would be in the 100...200 Ohm range.

Maybe simpler, faster and less current sucking would be a 74AHCT1G04 supplied from the external 5V.
It is tolerant to input signals without applied supply, translates the 3V3 world to 5V CMOS, is faster and quite hassle free compared to a saturated switch and requires only a bypass C, a pullup/down R on the input (tri-stated port) and maybe a series termination on the output. If I didn't missinterpret the intention behind Q5 it might make things maybe a little bit simpler.

Best Regards
Detlef


[Updated on: Mon, 21 February 2022 15:56]

Report message to a moderator

Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #9777 is a reply to message #9769] Thu, 24 February 2022 02:01 Go to previous messageGo to next message
just4fun is currently offline  just4fun
Messages: 273
Registered: May 2017
Location: Dark side of the Moon
Senior Member
Hi coredump,
the EBE-CLK line is not intended to give the clock to an external board (yes... the name is misleading...) but to give a single setup pulse to the "Studio 68 EB Expander board" (EBE board) to setup its internal logic just after the power on.

Some more explanation is needed here. The EB bus is made to be HW independent, so all the 16 EB control lines (EB19-EB26, EB57-EB64) are managed by the FPGA. But also the direction of each of these 16 lines need to be configurable, so for a given CPU it must be possible to choose the Clock and the other control lines like i.e. RD, WR or WAIT and assign them to any of the 16 control lines of the EB bus. But using a "conventional" driver this means to add a DIR control line for each EB control line, and this adds the need of 16 more pins of the FPGA (yes... a tradeoff could be use 4 groups of 4 drivers, so only 4 more DIR lines are needed, but this "eats" FPGA pins anyway and lowers the flexibility...). To avoid this I've used "smart drivers" (TXB0108PW) that can auto-sense the direction of each control line, so more DIR lines are not needed. Unfortunately these "smart driver" are very sensitive to the length of the line and its capacitance and may auto oscillate if the specifications are not respected. So I've restricted to only two bus connectors on the main board. More, must be careful designing the boards to be plugged on the EB bus to avoid auto oscillations of the TXB0108PW drivers. So for a real RC2014 compatibility I've designed an EB Expander board (EBE board) that adds 16 conventional bidirectional buffers between the EB bus control lines and the hosted (true) RC2014 connectors. But these drivers need to be set to the proper direction before normal operations, and this is done using the 16 data lines together with the EBE-CLK line to set each control line direction as needed. To have a better idea of that, I've added the EBE board schematic draft (see attachment).

Anyway thank you for the suggestions. You are right about Q5, and a single gate IC would be perfect for a clock line. In this case I'll probably use a 2N7002 MOSFET with a 1k pullup. I've used and tested this configuration for asynchronous transmissions up to 1Mbs and I think that it is here a good tradeoff (the EBE-CLK line it is normally at "1", so no power is wasted inside the pullup after the initial single setup pulse at the power on). May be also a better name for EBE-CLK can be a good idea... something like EBE-SETUP.

Fabio.

[Updated on: Thu, 24 February 2022 02:11]

Report message to a moderator

Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #9835 is a reply to message #9777] Wed, 23 March 2022 06:03 Go to previous messageGo to next message
just4fun is currently offline  just4fun
Messages: 273
Registered: May 2017
Location: Dark side of the Moon
Senior Member
The Studio 68 PCB has arrived at last!
I must say that I like the JLCPCB matte "purple" a lot:

/forum/index.php?t=getfile&id=2708&private=0

/forum/index.php?t=getfile&id=2709&private=0

Time to set up the microscope...

[Updated on: Fri, 23 December 2022 06:50]

Report message to a moderator

Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #9870 is a reply to message #9835] Mon, 25 April 2022 10:06 Go to previous messageGo to next message
just4fun is currently offline  just4fun
Messages: 273
Registered: May 2017
Location: Dark side of the Moon
Senior Member
I've assembled about the 80% of the PCB (for this first board I've used a smaller EP2C5Q208 FPGA) and currently testing the DRAM:

/forum/index.php?t=getfile&id=2724&private=0


/forum/index.php?t=getfile&id=2725&private=0


To do quicker testing I'm using an open source VHDL SDRAM controller core taken from here and using the STM32 as "probe".
The STM32 part of the Studio 68 board is compatible with the Discovery ST development board with the same STM32 MCU, so I can use Arduino IDE (with the ST core) as quick development environment selecting the Discovery as target board and using the serial upload mode (the Studio 68 has a custom circuitry to use the STM32 embedded serial bootloader with Arduino IDE to enable "automatic" uploads):

/forum/index.php?t=getfile&id=2726&private=0

Here the result of a first test driving the SDRAM @ 100MHz (using one PLL inside the FPGA to create the 100MHz clock from the ext 50MHz oscillator) and writing and reading a couple of 32-bit values and displaying them using the STM32 (using an onboard switch it is possible select which one value to read):

/forum/index.php?t=getfile&id=2727&private=0

Next step will be to do a complete memory check using the STM32 to write and read the DRAM content with a proper interface and if ok then I'll solder the 68SEC000 CPU...

BTW: During the assembly I've found a very stupid error in the push buttons footprint so I've manually "patched" the PCB as you can see, so stupid that passed my triple check... Embarrassed
Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #10000 is a reply to message #9870] Sun, 03 July 2022 02:30 Go to previous messageGo to next message
just4fun is currently offline  just4fun
Messages: 273
Registered: May 2017
Location: Dark side of the Moon
Senior Member
I'm currently preparing the last things for a first test run of the 68SEC000 CPU:

/forum/index.php?t=getfile&id=2745&private=0

/forum/index.php?t=getfile&id=2746&private=0


I've decided for now to use the internal RAM blocks of the FPGA (M4K blocks) instead of the SDRAM to keep things easier because I need at first to test (on the real HW) the VHDL design of all the I/O logic.
This way I've 13KB RAM, enough to test I/O (serial port + control logic).
The 68SEC000 CPU for now is set to work with an 8 bit data bus (like a 68008).
The STM32 will take care to read all the outgoing data from the I/O output register and send it to the USB, and to do the same with the incoming data from USB, so some FW will be needed, but this one should be simple.
More, using FPGA M4K RAM blocks allows to easily preload the content of the RAM directly from the JTAG stream using a .mif binary image file, so in this phase I don't need to make a bootloader FW for the 68SEC000 CPU on the STM32 side:

/forum/index.php?t=getfile&id=2747&private=0




The VHDL design is eating a lot of time, but this was expected (and playing with VHDL was one of the main motivations to build this board...).

We'll see...

[Updated on: Mon, 04 July 2022 00:13]

Report message to a moderator

Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #10019 is a reply to message #10000] Mon, 18 July 2022 03:01 Go to previous messageGo to next message
just4fun is currently offline  just4fun
Messages: 273
Registered: May 2017
Location: Dark side of the Moon
Senior Member
The 68SEC000 CPU inside the Studio 68 board starts moving... Smile

/forum/index.php?t=getfile&id=2756&private=0

/forum/index.php?t=getfile&id=2757&private=0
Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #10125 is a reply to message #9476] Sat, 03 September 2022 08:03 Go to previous messageGo to next message
just4fun is currently offline  just4fun
Messages: 273
Registered: May 2017
Location: Dark side of the Moon
Senior Member
I've almost completed the board adding all the drivers/level converters for the External Bus (EB), and re-tested the CPU to be sure about any "interference" on the CPU bus while the 68SEC000 is running:

/forum/index.php?t=getfile&id=2803&private=0

To test a real case of an external CPU connected to it I've done an "Application Board" with a KR1801VM2 CPU, a Soviet PDP11 "clone".
I'm currently waiting for another PCB (see my other post) to make some tests with this CPU, so I have to wait to complete these tests before finalizing the KR1801VM2 Application Board (APB).

In the meantime here a first attempt of component placement (without routing) of the KR1801VM2 APB.
In the attachment there is an untested first draft of the schematic.

This board supports both the interrupt signals and vectors and the DMA handling, and has a on-board power supply controlled from the bus:

/forum/index.php?t=getfile&id=2806&private=0

We'll see...

[Updated on: Sat, 03 September 2022 08:12]

Report message to a moderator

Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #10152 is a reply to message #9476] Thu, 20 October 2022 02:13 Go to previous messageGo to next message
just4fun is currently offline  just4fun
Messages: 273
Registered: May 2017
Location: Dark side of the Moon
Senior Member
As my KR1801VM2 CPU seems to be a not working unit (see my other thread), I've done another "Application Board" for the Studio 68 using a T84C00AM (Z80) CPU:

/forum/index.php?t=getfile&id=2818&private=0

It is a self-powered board (4-layer PCB) as Studio 68 doesn't power what is connected to the external bus (EB/EBE).
Now I've to write the VHDL to handle this board and do first tests.

We'll see...
  • Attachment: Z80 APB.jpg
    (Size: 1.66MB, Downloaded 738 times)

[Updated on: Thu, 20 October 2022 02:36]

Report message to a moderator

Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #10163 is a reply to message #10152] Fri, 18 November 2022 04:51 Go to previous messageGo to next message
just4fun is currently offline  just4fun
Messages: 273
Registered: May 2017
Location: Dark side of the Moon
Senior Member
In the meanwhile I've done an handy VGA/KEYB adapter the uses some of the available signals of the shared GPIO port (shared among the FPGA, the STM32 and the GPIO connector):

/forum/index.php?t=getfile&id=2824&private=0

Here the output of a simple test made with the Arduino IDE using the STM32 as processor and a VHDL based on the Grant Searle's video terminal taken from here:

/forum/index.php?t=getfile&id=2825&private=0

[Updated on: Fri, 18 November 2022 04:53]

Report message to a moderator

Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #10172 is a reply to message #10163] Thu, 08 December 2022 06:44 Go to previous messageGo to next message
just4fun is currently offline  just4fun
Messages: 273
Registered: May 2017
Location: Dark side of the Moon
Senior Member
Another almost monthly "chapter" of the story...
Now I have a working KR1801VM2 CPU so I've completed the 4-layer PCB of the KR1801VM2 Application Board (APB) that is currently on the way. Here the final rendering:

/forum/index.php?t=getfile&id=2835&private=0

In the meantime I've completed another board, the Z80 Blinking Leds (BLL):

/forum/index.php?t=getfile&id=2836&private=0

So I've started to play with the VHDL to manage the previous Z80 board (Z80 APB) and with the FW for the STM32 that controls the boot of the whole board at startup.
Here the Studio 68 + Z80 APB + Z80 BLL:


/forum/index.php?t=getfile&id=2837&private=0

The Studio 68 here acts as "slave" with the 68SEC000 CPU held in reset to keep its data and address bus in high Z, exposing the RAM and I/O inside the FPGA on the external Z80 bus.

Here an "Hello world" test to check the I/O implementation inside the FPGA.
At the power on the STM32 has the control of the board. Before enabling the external bus EB/EBE drivers, the STM32 checks if the voltage from the external power supply (in this case on the Z80 APB board) is "good". Then it enables the logic inside the FPGA and let the Z80 run. After that the STM32 acts as a slave I/O processor to exchange data between the VHDL I/O subsystem (inside the FPGA) and the serial I/O connected to the USB adapter:

/forum/index.php?t=getfile&id=2838&private=0


[Updated on: Mon, 19 December 2022 03:41]

Report message to a moderator

Re: End year rant: starting a new design, the STUDIO 68 board for "experiments"... [message #10204 is a reply to message #10172] Fri, 20 January 2023 03:28 Go to previous message
just4fun is currently offline  just4fun
Messages: 273
Registered: May 2017
Location: Dark side of the Moon
Senior Member
I recently completed the assembly of the KR1801VM2 Application Board (APB) and the adaptation of the VHDL previously used for the Z80 board to this CPU.
In particular, I modified the interface towards the CPU (KR1801VM2 in this case) and the RAM (always using the M4K blocks of the FPGA for now), this time organized into 16-bit words, also adding support for the "byte masking" used for the "byte oriented" instructions.
Using the M4K block allows to embed the compiled binary (.mif format) into the FPGA bitstream, so the RAM is automatically filled with the binary ready to run.
I also set up a suitable toolchain to be able to compile the PDP11 assembly language for the first tests (based on the AsmPDP assembler).
Also the firmware on the STM32 is the same used for the Z80 (as the VHDL I/O subsystem is the same used for the 68SEC000 and the Z80), I just changed the name of the CPU.

Here the KR1801VM2 Application Board + Studio 68 in action:

/forum/index.php?t=getfile&id=2839&private=0

and here the usual test:

/forum/index.php?t=getfile&id=2840&private=0

At this point next step will be starting to implement into the VHDL the I/O scheme of a PDP11/03 to try to run some original PDP11 software.

We'll see...

[Updated on: Fri, 20 January 2023 10:55]

Report message to a moderator

Previous Topic: New eZ80 Small Encased System
Next Topic: Microtec XDM68K XRAY Monitor


Current Time: Sat Mar 15 19:39:31 PDT 2025

Total time taken to generate the page: 0.00768 seconds