6502.org http://forum.6502.org/ |
|
XC3S50 with Michael's core (need assistance) http://forum.6502.org/viewtopic.php?f=10&t=2530 |
Page 1 of 1 |
Author: | enso [ Fri Jun 07, 2013 12:51 am ] |
Post subject: | XC3S50 with Michael's core (need assistance) |
I noticed that Michael's MAM65C02 core has a revision designed specifically to run on a Xilinx XC3S50 chip. After cloning the github repo I was confused as to how to go about it. Has anyone done it? Michael, perhaps you (or anyone else) can give me a hand. A clean verilog design for this chip would also make a nice showcase for the core - it seems to be clean enough to be a drop-in replacement for a 65c02. I happen to have a spare XC3S50 breakout board ready to go: This breakout board exposes all the pins from an XC3S50-VQ100-5. I think I will wire-wrap the next one as the breadboards give me endless problems. |
Author: | MichaelM [ Fri Jun 07, 2013 2:19 am ] |
Post subject: | Re: XC3S50 with Michael's core (need assistance) |
Enso: Would be glad to answer specific questions regarding the expected use and performance. I have gone so far as to have a board built for the last posted update. However, I have been tied up on work, so I've not had the time to bring up the design on the board. The parts are burning a hole in the carpet in my office. Let me clear up a few of things first regarding the M65C02 implementation: (1) it is not intended as a replacement or emulation of the WDC 65C02S. It is an example of how to take the core, M65C02_Core, and add the external components needed to construct a 65C02-compatible processor. In another thread, I think that you defined four or five categories of cores. I generally agree with your categories. I would place the M65C02_Core in your category of cores which are capable of executing 65C02 instructions generated by a standard 65C02 assembler. It has never been my intention that the core be anything other than that; I am not particularly interested in playing 6502 games or other retro-computing activities. On the other hand, I am interested in creating a processor core that can be used to power specialized application-specific, FPGA-based products, and I'd like to be able to make use of freely available tools and such. (2) the M65C02 processor implementation attempts to implement an external memory interface similar to that of a 6502 To provide a bus interface similar to that of a real 6502 mechanism, I decided to use a four clock cycle microcycle. This fixed microcycle length can be extended by an external device, and each additional "wait" state is a multiple of four clock cycles. Thus, the 50% duty cycle relationship of Phi1 and Phi2 is maintained. (3) I generally adhere to the policy of using synchronous I/O. I've found over the years that it is difficult to control the differential path delays for asynchronous signal paths. This is particularly true for signals that may drive multiple I/O pins. The M65C02 processor was implemented in a manner that places registers in most (if not all) I/O pins. There is a performance penalty for this design approach, but I was willing to accept the results. In the process, I've found that I have some asynchronous logic paths in the implementation of my basic core that limit the maximum clock rate at which I can operate the core with synchronous I/O. I've worked out an improvement to the implementation that greatly reduces these delays. However, in the process, the internal architecture has changed so much that it will require a new control structure, i.e. a different microprogram control word, and I've not completed that change. (4) I wanted to target a low-cost FPGA packaged in a TQFP package. Although I am comfortable designing with FPGAs packaged in BGAs. On a commercial basis, I can afford to have someone place and attach these components to my designs. Doing FPGA designs for myself, I don't want that expense, and I don't have the patience to develop a reflow plate (like you were looking at doing) for soldering BGAs to my boards. Thus, the Spartan-3 XC3S50A-1VQx100I FPGA is my target. I have several reasons for choosing that FPGA and package. One of them is that the XC3S200A-1VQG100I is a drop-in upgrade. Another is that I wanted to see how much stuff I could fit into the XC3S50A part. (5) I designed the clock circuitry to use a standard baud rate oscillator. In the -1 speed grade, the current core will not work at a bus clock rate greater than 16 MHz. A 14.7456 MHz oscillator is the nearest baud rate frequency. With a -2 speed grade, (not available in industrial temp from Digi-Key when I ordered my parts) an 18.432 MHz oscillator will work just fine. The internal frequency of operation is always 4x that provided. Phi1 and Phi2 are essentially the same as the supplied reference clock. There may a phase shift, so I recommend using Phi1 as the reference for any external UARTs that you may decide to attach to the M65C02. (6) I have not attempted to implement the nSO pin or function. This may be of use in some applications, but I believe that the nNMI and nIRQ pins and functions, along with the BRK instruction, should suffice for most applications. I believe that I have implemented the WAI instruction correctly, and also the nVP pin and function. Altogether, the M65C02 should be capable of emulating the external interface of a 6502-compatible processor in a sufficiently accurate manner that you should be able execute most existing code. (7) The memory interface supports asynchronous SRAMs and EPROMs. Separate read enable and write strobes are provided. I believe that the basic memory cycle that I've built into the M65C02 will let you easily use low-cost 10-12ns asynchronous SRAMs (0 wait state), and low-cost 70 ns asynchronous Flash EPROMs (1 wait state). I've also used all three of the Block RAMs that are available in the XC3S50A part. Two are used for the microprogram, and 1 is used as a 2kx8 Boot ROM. An external input pin can be used to write protect the vector area. An on-chip PU enables writes to the 2kx8 Boot ROM so both the ROM and the vectors can be changed by software/firmware. If these restrictions/limitations are acceptable, then I would be glad for you to use the M65C02 processor implementation that I posted. I will provide as much help as I can given my current schedule and time commitments. If it would help, I would be happy to send you (via PM) a ZIP of the ISE 10.1i project that I used to develop the M65C02. I am confident that the behavioral simulation I have performed has fully tested the design, and it should be fairly simple to bring it up on your prototype HW. |
Author: | ElEctric_EyE [ Fri Jun 07, 2013 2:22 am ] |
Post subject: | Re: XC3S50 with Michael's core (need assistance) |
In addition to what Michael stated, since I see he posted while I was typing in a response regarding your hardware plans: I see 3 Voltage Regulators on the left of your pic. Where is the FPGA PROM? Does ISE Impact see the PFGA & PROM correctly? In the short run bread board is quick and dirty, easy to see where the wires go, etc. Wire wrap is much more reliable, good to speeds close to 100MHz, reportedly. Crays ran to 80MHz with wire wrap. Although, you will have to train yourself for the mirrored pins when wiring from your schematics. |
Author: | enso [ Fri Jun 07, 2013 2:42 am ] |
Post subject: | Re: XC3S50 with Michael's core (need assistance) |
Michael, thank you. I would love to get started - please send me the design files. I will try to convert them to ISE 13.3 as that's my current setup. Your limitations pose no problem. I think it would be great to have a good 6502 core on the minimal Xilinx setup. I like the solderability andof the TQFP package. The 64 IO pins should to be good enough for many projects. Oh, I will be wiring in a 128K SRAM (K6R1008V1C-JC10) - I have a bunch of these in stock. I think your core can co-exist with that SRAM without any problems. Thanks a bunch. Looking forward to getting this to work. |
Author: | enso [ Fri Jun 07, 2013 2:53 am ] |
Post subject: | Re: XC3S50 with Michael's core (need assistance) |
ElEctric_EyE wrote: I see 3 Voltage Regulators on the left of your pic. Where is the FPGA PROM? Does ISE Impact see the PFGA & PROM correctly? This breakout board does not have any PROM. I have an XCF01 breakout board, but haven't got to it yet. Impact sees and programs this board without any problems. I have a 60MHz crystal in the upper left, hard to see, on a separate board with the green wire. After hard-to-debug configuration issues (actually, my wiring errors) with the first iteration of the 6502 playground board I am paranoid, so I made separate breakout boards for everything. This way I can put together a system and verify all connections. The final board will have, in the same form factor (hopefully), -XC3S50 -XCF01 -2.5V and 1.2V regulators (3.3V expected from outside) -128KB SRAM -60MHz crystal |
Author: | MichaelM [ Fri Jun 07, 2013 3:23 am ] |
Post subject: | Re: XC3S50 with Michael's core (need assistance) |
Enso: Sent you the design files by PM. I will be tied up tomorrow until the evening. Send me a PM or post any questions that you may have. I will try to answer them as quickly as I can. Keep me posted on your results. |
Author: | MichaelM [ Fri Jun 07, 2013 3:40 am ] |
Post subject: | Re: XC3S50 with Michael's core (need assistance) |
Enso: Also yields similar synthesis performance and PAR results using ISE 14.4i. You should have no issues with ISE 13.3 |
Author: | MichaelM [ Fri Jun 07, 2013 12:56 pm ] |
Post subject: | Re: XC3S50 with Michael's core (need assistance) |
I haven't added the following timing diagram to my GitHUB wiki on the M65C02. It may help in understanding the basic memory cycle of the most recently released implementation. Attachment:
|
Author: | BigEd [ Sat Jun 08, 2013 2:45 pm ] |
Post subject: | Re: XC3S50 with Michael's core (need assistance) |
Thanks for posting the diagram! |
Author: | enso [ Tue Jun 11, 2013 6:29 pm ] |
Post subject: | Re: XC3S50 with Michael's core (need assistance) |
Fit the core to the '50. Interestingly enough, the XC3S50A has only 3 BRAMs while the old XC3S50 has 4! The pinout is completely different too. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |