



minsoc: spartan6 synthesis problem with second clock domain
by flozn on Nov 21, 2013 |
flozn
Posts: 16 Joined: Jun 10, 2013 Last seen: Sep 22, 2020 |
||
Hello everyone!
The last weeks I added a second clock domain to my minsoc system. The necessary synthesizer hardware is included and tested. A valid flag based on levels is passed to the second clk domain. Until the flag is not reported to the source clk domain, a busy signal is active. The first tries were based on single TIG constraints for the syncronizer inputs. After adding some more crossing signals, the bitfile changed alot and did not run after each synthesis (self test fails: cpu, sram or crc error). As a first bugfix changing the xst and map flags torwards to standard, without global optimization helped. There are versions of my system where the minsoc system (25mhz) with second clock domain (50mhz) works fine! But after adding more crossing signals, the same problem occured again: either the sram selftest failed or the cpu stalls in the middle of the cpu selftest. I thought the xst and map flags can't be the real cause - the just do some arbitrary changes which lead to success or not :/ ... After studying some xilinx pdfs and forums I looked at the floorplanning with PlanAhead (analysis stage). The the openrisc cpu and the ethmac change their position after small changes of the clk domain crossing signals. So I used the TIME GROUP constraint of the two clk source signals and specified TIG in both directions. This caused PAR not to show some hold score above 0 but the SoC was not able to be accessed via Advanced Debug Bridge (CRC error). Adding a AREA GROUP constraint based on the new clk domain TIME GROUP and placing this group in a slice range near to the according output pads does not do some improvement :( . My question now: how is possible the cpu/wishbone behaves *this* diffent when adding some signals which are marked to be TIG? There are no new warnings during the synthesis at map/par (only 3 ethernet signals, which occur out of the box with minsoc/dev). Maybe it is just my understanding but if there are NO setup/hold violations and the wishbone clk is constrained (25mhz due to 100mhz/4) WHY the system fails? Details to my system: Digilent Atlys, Spartan6, about 65% slice utilisation. ethmac, i2c, uart and own wb-slave Thanks alot for every helping word!! Cheers Flo |
RE: minsoc: spartan6 synthesis problem with second clock domain
by flozn on Nov 21, 2013 |
flozn
Posts: 16 Joined: Jun 10, 2013 Last seen: Sep 22, 2020 |
||
... after a small irc session I got some (for me) new facts:
- Advanced Debug Bridge HW is not syncron to wishbone --> check CDC behaviour/add constraints - Advanced Debug Bridge SW sometimes throw CRC errors at correctly synthesized openrisc systems - OpenOCD can be build to run with Advanced Debug Bridge hardware --> replace Advanced Debug Bridge software. This shall be a good way to improve CRC errors ... see http://www.elec4fun.fr/2011-03-30-10-16-30/2012-08-22-20-50-31/or1k-on-de1-openocd for howto - openrisc is running sucessfully at 50mhz with ethmac on Digilent Atlys without timing violations. But as i understood without Advanced Debug Bridge (mohor debug system instead) Now I have some new things to try. Cheers Flo |
RE: minsoc: spartan6 synthesis problem with second clock domain
by flozn on Nov 28, 2013 |
flozn
Posts: 16 Joined: Jun 10, 2013 Last seen: Sep 22, 2020 |
||
Hey guys! Now I good some good news. I got openOCD for Advanced Debug System at the Atlys Board working. I was able to reproduce the CRC error described in the IRC chat session. *One single* bitfile throws an error at Adv. Debug System like this:
My newly built openOCD with FT2232 ("enable-ftdi" configure option) outputs the following:
(as I remember there is some output "cpu halted" ... but this paste origins from a wrong configured run)Very strange but necessary is the IRLEN of 8 instead of 6 as described in "ise_14.6/14.6/ISE_DS/ISE/spartan6/data/xc6slx45_csg324.bds" boundary scan description file:
For connecting to minsoc I use the internal jtag TAP (FPGA_TAP). At first I didn't set the right IRLEN attribute and thought openOCD just supports Altera VJTAG and the generic TAP of openCores (tap_top). But the actual version does support xilinx BSCAN_SPARTAN6 TAP (2013-11-27).The openOCD program now works from 16k to 3MHz adapter speed. An example of gdb:
Gdb supports set $pc, continue, jump and stepi. I didn't test further.Now back to the *general* bitfiles which do not work - neither with adv.dbg.sys nor openOCD. Beside the single case described above there are a lot of minsoc bitfiles at which the CPU stalls after load and continue at 0x100. There are no timing violations in all bitfiles. In most of the cases the pc values are: 0x000, 0x004, 0x200 _vec_start, 0x140 _reset_vector, 0x704 _except_700 The last file I synthesized now works. (In the past some small change of code let to working/non-working bitfile (cpu stall/not) ...) Hopefully this is a lasting solution ... The main changes are:
The wb_clk constraint I saw at orpsocv2 Atlys constraint file.Maybe someone as another idea what was the problem of the stalling cpu. I do not believe in a lasting solution yet ... Otherwise this post may be a candidate for minsoc/advdbgsys wiki (openOCD alternative). Cheers Flo |



