Forum Discussion
Altera_Forum
Honored Contributor
20 years ago --- Quote Start --- originally posted by baycool@Jan 10 2006, 03:57 AM i am able to step through messages being sent in debug mode, but not in run mode. not sure what is causing this yet.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=12079)
--- quote end ---
--- Quote End --- That's quite strange... I don't think it is related to the fact that the system is a multiprocessor, because the JTAG Uart does not rely on the fact you are using a multiprocessor... but just hooks on the JTAG chain... I never had a problem like that... --- Quote Start --- originally posted by baycool@Jan 10 2006, 03:57 AM however, the tutorial has the potential for a bug.
when you build the system you are building the comm for cpu 1. the comm code in the multi.c is for cpuid =1. now , i think this is normally the case as sopc will assign cpuid = 0( you later add "1" in code). however, in the tutorial my cpu 1 is assigned a cpuid = 0x2. i looked back over the tutorial, and this value is assigned by system. i am not sure how system makes this assignement but it is not based, i believe on the names of the cpu in sopc. this is where the potential for the bug lies.if you follow the tutorial you connect your jtag uart to cpu1 assuming that the system will assign cpu1= 0x0. if the system assigns another value to this register then you have a problem
now normally if the system assigns values the expected way:
cpu1 = 0x0
cpu2 = 0x1
cpu3= 0x2
there is no problem.
as a test of my theory i went back and reconnected my cpu2 to jtag uart and as expected i was able to in debug mode pass thorugh the code that sends messages. i am still unable to do this in run mode, not quite sure.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=12079)
--- quote end ---
--- Quote End --- I think the problem you are pointing out is strictly related to the way SOPCBuilder assigns the CPUID to Nios II processors. We found that problem a few months ago (at that time it caused me a few headaches... look at values this post on the cpuid values here (http://forum.niosforum.com/forum/index.php?showtopic=1060&hl=)) while implementing the Multiprocessor Startup Barrier for ERIKA Enterprise. Until Nios II 5.1 there was not an official position on the ways CPUIDs are assigned. The workaround we found is just to... look at the PTF and try :-) ... Basically there are a few things to look at...a description of them can be found on the ERIKA Enterprise Manual, page 111 (available for free at the erika enterprise literature page (http://www.evidence.eu.com/nios2/literature.asp)). The best thing IMHO would have been either to be able to assign the CPUID values directly, or to have a combo box in the Mutex component. In any case, the problems seems to be solved in Nios II 5.1 where it is clearly stated in a subnote of the Mutex Component (open SOPCBuilder, insert a mutex component, giva a value != 0, and the note appears :-) ) that CPUIDs are assigned from 0 upwards following the CPU order in the SOPCBuilder list. bye Paolo