Picon

LEON3 MP



Hello

Can anyone please help me getting started with a custom compiled MP kernel.

When I run a program on the GR712RC board with the precompiled MP kerne from gaisler
( in sparc-rtems-4.10-gcc-4.4.6-1.2.16b-linux.tar located at: rtems-4.10/sparc-rtems/leon3mp/)

the program writes output to both consoles one console per cpu using printk..everything is fine :)

Then I compile my own MP kernel and the program print output only in the first console?

To check if printk is called I set breakpoints in grmon 2

bp address_of_printk cpu 0
bp printk cpu 1

For some reason changing cpu do not change the address of the symbol printk, so I had to dig up the address manually for cpu 0.

And I see both CPUs are calling printk.
 
My own compilation turns off allmost everything and does not use the driver manager.

configure\
 --prefix=$(RTEMS_INSTALL)\
 --target=sparc-rtems\
 --disable-networking\
 --disable-cxx\
 --disable-itron\
 --disable-tests\
 --disable-docs \
 --enable-multiprocessing\
 --disable-drvmgr\
 --disable-posix\
 --enable-rtemsbsp="leon3"

Ive tried to enable everything again and no change...




__._,_.___
Posted by: Rune Kromy <duplexor-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>



__,_._,___
Picon

Configuration of DCM_ADV in ML509 Design



I have been trying to configure DCM_ADV IP core of ML509 to use its dynamic reconfiguration feature but unable to do so. Following have been done to ensure its working


1. Replaced the instantiation and component of DCM with DCM_ADV

2. Added dynamic reconfigurable ports such as DCLK, DI, DO, DEN, DWE, etc in the port list of DCM_ADV component

3. Removed the redundant ports such as DSSEN and STATUS[7:0]


Problem:

After successful generation of bit file when tries to run on its development board Virtex-5 with hello.exe, the system gets stuck


Regards

Zohaib 



__._,_.___
Posted by: zohaibnajam-ur4TIblo6goN+BqQ9rBEUg@public.gmane.org



__,_._,___
Picon

How to add new VHD file in lib folder in LEON3 code



Hi

I am trying to add a new VHD file in lib folder in LEON3 code.
I had added the path of my new VHD file in version_stx_beh.prj n>file (/designs/leon3mp), but system is not able to recognize my new file. My file path entry from version_stx_beh.prj file got deleted automatically when i run MAKE scripts.

Can you please let m e know if any other step or modification also requided.

Your support on this is really appreciable.

Thanks & Regards
Neetu Jindal


 


__._,_.___
Posted by: Neetu Jindal <jindal.neetu28-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>



__,_._,___
Picon

menuconfig for grlib [1 Attachment]



Anyone interested in it as a replacement for old xconfig? I've made some simple adaptation for grlib, so if anyone is interested, I can upload it to, say, github.



__._,_.___ View attachments on the web
Posted by: dmitrodem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org



__,_._,___
Picon

Pnp Interrupt controller leon3



Dear all,


  I was reading the pnp memory area are a Leon3 board  at address ( 0xfff00000) and i couldn't find the pnp information about the Multiprocessor Interrupt Controller. When accessing the board with Grmon i can see the Multiprocessor Interrupt Controller but i couldn't read its information from pnp area. Where can i locate the Multiprocessor Interrupt Controller pnp information ,since i want to automate the detection process using amba_scan().


Best Regards


 



__._,_.___
Posted by: tadeget-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org



__,_._,___
Picon

Leon3 multiprocessing [1 Attachment]



Hi,

I try to run RTEMS Multiprocessor example intended for 2 LEON3 CPUs (rtems-mp.c), but I've got this output(ATTACHED). What should I check is wrong if I got trap 0x00? If anybody has already faced such an issue, please help. Thanx


 



__._,_.___ View attachments on the web
Posted by: sevkud-/E1597aS9LQAvxtiuMwx3w@public.gmane.org



__,_._,___
Picon

fopen and spar-elf-gcc



Hi,


I added a hardware to APB bus and now i am trying to write a C code in order to use this hardware. But, i have to read datas from txt file and write results to another txt file. However, i think sparc-elf-gcc does not support fopen command. What is the best method to achieve this goal? Is the only way using operating system or is there another way?


Thanks for answers.



__._,_.___
Posted by: acbagbaba-/E1597aS9LQAvxtiuMwx3w@public.gmane.org



__,_._,___
Picon

Uart used with RTEMS and Leon 3



Hi,


I'm new with RTEMS and Leon3. I'm trying to write a simple program that send leters via RS232. When i write the program, y try to open /dev/apbuart2 (y test with 1, 2 and 3) but the file descriptor is always 0. ¿can you help me? I need to know what's the name of the uart port.


Thanks in advance


Daniel ANtokoletz

 



__._,_.___
Posted by: dantokoletz <at> gmail.com



__,_._,___
Picon

RE: non-leaf function bug in gcc



Hi,

I had a bit of time to dig deeper on what's going through the compiler. So, according to the newlib library, this is the expected behaviour of printf in case we encounter "l":


Reading the identifier and and set appropriate flags
                case 'l':
                        if (*fmt == 'l') {
                                fmt++;
                                flags |= QUADINT;
                        } else {
                                flags |= LONGINT;
                        }
                        goto rflag;

As it is obvious, we check if the next character is "l", we set our flag as QUADINT ... Else, we set it as LONGINT. Now, let's see the difference in the trace executed in our program:

#        77335 ns : cpu0: 0x4001091c    sra  %l5, 0x0018, %l5  [0x0000006c]                   //loading 0x6c, which is l
#        77385 ns : cpu0: 0x40010920    add  %i2, 0x0001, %i2  [0x40019853]
#        77415 ns : cpu0: 0x40010924    add  %l5, -0x0020, %g1  [0x0000004c]
#        77425 ns : cpu0: 0x40010928    subcc  %g1, 0x0058, %g0
#        77435 ns : cpu0: 0x4001092c    bleu,a  0x40010c10
#        77455 ns : cpu0: 0x40010930    sll  %g1, 0x0002, %g1  [0x00000130]
#        77465 ns : cpu0: 0x40010c10    sethi  %hi(0x40010400), %g2  [0x40010400]
#        77495 ns : cpu0: 0x40010c14    or   %g2, 0x0224, %g2  [0x40010624]
#        77645 ns : cpu0: 0x40010c18    ld  [%g2 + %g1], %g1  [0x400116e4]                   //Jump to case 'l' in the switch statement
#        77685 ns : cpu0: 0x40010c1c    jmp  %g1
#        77695 ns : cpu0: 0x40010c20    nop
#        77775 ns : cpu0: 0x400116e4    ldub  [%i2], %l5  [0x0000006c]                       //Check if the next character is ALSO an 'l'
#        77795 ns : cpu0: 0x400116e8    sll  %l5, 0x0018, %l5  [0x6c000000]
#        77825 ns : cpu0: 0x400116ec    sra  %l5, 0x0018, %g1  [0x0000006c]
#        77835 ns : cpu0: 0x400116f0    subcc  %g1, 0x006c, %g0
#        77845 ns : cpu0: 0x400116f4    be,a  0x40011f68
#        77885 ns : cpu0: 0x400116f8    add  %i2, 0x0001, %i2  [0x40019854]                  //If so, set flag to QUADINT
#        77895 ns : cpu0: 0x40011f68    ldub  [%i2], %l5  [0x00000075]
#        77905 ns : cpu0: 0x40011f6c    or   %l4, 0x0010, %l4  [0x00000010]                  //ORing the flag with 0x10
#        77915 ns : cpu0: 0x40011f70    ba  0x4001091c
#        77925 ns : cpu0: 0x40011f74    sll  %l5, 0x0018, %l5  [0x75000000]

As you can see, when printf parse two l's in a row, we set OR the flag with 0x10 ... Let's check our QUADINT definition

#define LONGINT         0x010           /* long integer */
#ifndef _NO_LONGLONG
#define QUADINT         0x020           /* quad integer */
#else /* ifdef _NO_LONGLONG, make QUADINT equivalent to LONGINT, so
         that %lld behaves the same as %ld, not as %d, as expected if:
         sizeof (long long) = sizeof long > sizeof int  */
#define QUADINT         LONGINT
#endif

We can see that if we parse two l's, we actually set the flag as if we set only one 'l' ... Now, according to the definition in the comment, this case is true ONLY if sizeof (long long) = sizeof long > sizeof int; sadly, both long and int are defined as 4 bytes of size. Therefore, for some reason, we have set LONG LONG to be off. This will effect our UARG()/SARG()

#ifndef _NO_LONGLONG
#define SARG() \
        (flags&QUADINT ? GET_ARG (N, ap, quad_t) : \
            flags&LONGINT ? GET_ARG (N, ap, long) : \
            flags&SHORTINT ? (long)(short)GET_ARG (N, ap, int) : \
            (long)GET_ARG (N, ap, int))
#define UARG() \
        (flags&QUADINT ? GET_ARG (N, ap, u_quad_t) : \
            flags&LONGINT ? GET_ARG (N, ap, u_long) : \
            flags&SHORTINT ? (u_long)(u_short)GET_ARG (N, ap, int) : \
            (u_long)GET_ARG (N, ap, u_int))
#else
#define SARG() \                                                      //-----vvvvvvvvvv------ This is the part that will be considered
        (flags&LONGINT ? GET_ARG (N, ap, long) : \
            flags&SHORTINT ? (long)(short)GET_ARG (N, ap, int) : \
            (long)GET_ARG (N, ap, int))
#define UARG() \
        (flags&LONGINT ? GET_ARG (N, ap, u_long) : \
            flags&SHORTINT ? (u_long)(u_short)GET_ARG (N, ap, int) : \
            (u_long)GET_ARG (N, ap, u_int))
#endif
Which means, we will always fetch long variables instead of long long. The UARG is used while starting printing the number:

                case 'u':
                        _uquad = UARG ();
                        base = DEC;
                        goto nosign;

And this "_quad" number will be used actually print the number through division and modulus

                                case DEC:
                                        /* many numbers are 1 digit */
                                        while (_uquad >= 10) {
                                                *--cp = to_char (_uquad % 10);
                                                _uquad /= 10;
                                        }
                                        *--cp = to_char (_uquad);
                                        break;

This is reflected on the behavior of the program ...

#        78365 ns : cpu0: 0x40010c38    ld  [%i3], %g1  [0xaabbccdd]                     //Fetch one word only (Most significant word, which is 0xaabbccdd)
#        78385 ns : cpu0: 0x40010ce0    subcc  %g1, %g0
#        78425 ns : cpu0: 0x40010ce4    add  %i3, 0x0004, %i3  [0x400ffeec]
#        78435 ns : cpu0: 0x40010ce8    addx  0x0000, %g3  [0x00000001]
#        78465 ns : cpu0: 0x40010cec    ba  0x40010c5c
#        78475 ns : cpu0: 0x40010cf0    mov  0x0001, %g2  [0x00000001]
#        78545 ns : cpu0: 0x40010c5c    clrb  [%fp-0x0001]
#        78565 ns : cpu0: 0x40010c60    subcc  %l6, %g0
#        78575 ns : cpu0: 0x40010c64    bge,a  0x40010c70
#        78635 ns : cpu0: 0x40010c6c    subcc  %l6, %g0
#        78645 ns : cpu0: 0x40010c70    bne  0x40010c84
#        78695 ns : cpu0: 0x40010c74    add  %fp, -0x018c, %o5  [0x400ff524]
#        78725 ns : cpu0: 0x40010c84    and  %g2, 0x00ff, %g2  [0x00000001]
#        78735 ns : cpu0: 0x40010c88    subcc  %g2, 0x0001, %g0
#        78805 ns : cpu0: 0x40010c8c    be  0x40011980
#        78835 ns : cpu0: 0x40010c90    subcc  %g2, 0x0002, %g0
#        78895 ns : cpu0: 0x40011980    subcc  %g1, 0x0009, %g0
#        78905 ns : cpu0: 0x40011984    bleu  0x400119c8
#        78915 ns : cpu0: 0x40011988    mov  %o5, %g3  [0x400ff524]
#        78945 ns : cpu0: 0x4001198c    mov  0x0000, %y
#        78955 ns : cpu0: 0x40011990    nop
#        78965 ns : cpu0: 0x40011994    nop
#        78975 ns : cpu0: 0x40011998    nop
#        78985 ns : cpu0: 0x4001199c    udiv  %g1, 0x000a, %g2                           //Start division and finding reminder to convert to BCD
#        79435 ns : cpu0: 0x400119a0    sll  %g2, 0x0001, %o4  [0x22258f5e]
#        79445 ns : cpu0: 0x400119a4    sll  %g2, 0x0003, %g4  [0x88963d78]
#        79455 ns : cpu0: 0x400119a8    add  %o4, %g4, %g4  [0xaabbccd6]
#        79465 ns : cpu0: 0x400119ac    add  %g3, -0x0001, %g3  [0x400ff523]
#        79495 ns : cpu0: 0x400119b0    sub  %g1, %g4, %g1  [0x00000007]
#        79575 ns : cpu0: 0x400119b4    add  %g1, 0x0030, %g4  [0x00000037]
#        79585 ns : cpu0: 0x400119b8    subcc  %g2, 0x0009, %g0
#        79595 ns : cpu0: 0x400119bc    mov  %g2, %g1  [0x1112c7af]
#        79605 ns : cpu0: 0x400119c0    bgu  0x4001198c
#        79615 ns : cpu0: 0x400119c4    stb  %g4, [%g3]
#        79635 ns : cpu0: 0x4001198c    mov  0x0000, %y
#        79645 ns : cpu0: 0x40011990    nop
#        79655 ns : cpu0: 0x40011994    nop
                               .
                               .
                               .
                              etc

So, I guess the long long int case is impossible to be printed with the provided BCC compiler, unless it is recompiled with the appropriate flags. However, I am not sure why the multiple argument case doesn't work. Note that if I actually turn off the optimization, it would work just fine.


Thanks,
Khalid




__._,_.___
Posted by: alhawaj <alhawaj-fWAZDB8bsKe+fmr0zi+kZQ@public.gmane.org>



__,_._,___
Picon

Digilent Nexys3 Memory Controller



I have a question about the configuration for the Digilent Nexys 3.  I was looking at the leon3mp.vhd file which creates an outpad for the FlashRp on line 338.  It is port mapped to memo.writen, which should enable the Flash to be write enabled, but then if you look at Digilent Reference Manual for the Nexys 3 (page 10), the FlashRp signal is connected to the P30-RST, which actually resets the chip and inhibits writing.  Am I reading this wrong?  Is this why I haven't been able to write to the flash?  The writen (write enable) signal for the Cellular RAM and Parallel PCM share a common write enable (WE) signal. 



__._,_.___
Posted by: jbronston1-/E1597aS9LQAvxtiuMwx3w@public.gmane.org



__,_._,___
Picon

RE: Re: Issues building the MIG using ISE 13 Version



Can you post the output of ISE14.6? I want to see if it is the same issue with the naming as before or something else.

I am using both Windows (cygwin x64) and Linux CentOS.

Also, try editing ALL files with a decent editors, such as vim from cygwin OR Notepad++ to preserve text format.

-Khalid


__._,_.___
Posted by: alhawaj <alhawaj-fWAZDB8bsKe+fmr0zi+kZQ@public.gmane.org>



__,_._,___

Gmane