All:
I have posted a new release of the M16C5x soft-microcomputer to
Github.
I was never satisfied with the my prior results. It seemed to me that having the core operate well beyond its period constraints indicated that there was some stylistic coding errors, or something like that. I got some help in setting up a significantly more detailed user constraints file. Multi-cycle path constraints were established to account for those paths where the two cycle clock enable signal was routed. False path constraints between independent clock domains were also added.
The effort required to establish these additional constraints was considerable. Furthermore, the additional constraints did improve the base performance levels of the core in the -4 speed grade part that I use as a reference, but not enough to satisfy me that the effort required was worth the effort and frustration required to develop the additional constraints.
I had stated that the core itself was a single cycle core, so after I determined a path forward on the M65C02 to using a single cycle implementation, I decided that I could apply the same approach to the M16C5x project. The result is the new release of M16C5x on Github. It operates in a single cycle mode. Map/PAR easily closes timing with a simple period constraint on each of the three clock domains in the project. The system clock domain is constrained for 60 MHz, and that is easily satisfied by the Mapper and PAR tools. The SPI clock domain is set for 66.666 MHz and the UART clock domain is set for 100 MHz. Both of these constraints are also easily satisfied, with the best achievable period for the UART clock domain being reported at approximately 8.8 ns.
As a result of this effort, I am now satisfied that the period constraints defined in the M16C5x UCF file are accurate. When the resulting bit file is loaded onto my XC3S50A-4VQ100I FPGA board, I can send large text files through the project without error at baud rates of 921.6 kbps. The UART can support higher data rates, but my Keyspan USB Mutli-port Serial Interface only supports that rate as its maximum on Windows.
With this new release of the M16C5x, disregard previous results published in this thread in relation to operation beyond the reported results. This latest core easily operates in a single cycle mode at
58.9824 MHz (which is 4x the 14.7456 MHz reference oscillator on my FPGA development board). This is equivalent to the 2 cycle frequency of
117.9648 MHz I've reported in previous posts.
If the combinatorial path delays in the timing reports are examined, it is clear that pushing the latest core much beyond the 60 MHz constrained is not worth the effort. However, moving to a higher speed grade part, or even to a Spartan 6, yields performance improvements that are consistent with the speed grade and architectural improvements.
(NOTE: I've used PuTTY successfully in the past with these Keyspan units, but I've never tried to use it at these rates. In performing these tests, PuTTY was a disappointment. I downloaded and used Tera Term. It worked beautifully.)