https://casper.berkeley.edu/svn/trunk/projects/pocketcorrelator/poco-0.1.1/docs/poco_user_guide
This is the Griffin guide : 2: PowerPC Code ------------------------------------------------------------------------------- The embedded PowerPC C code which interacts with LWIP needs to be modified for a specific design in order to automate the transmission of the shared BRAM. In the src/ directory are a number of main_iX_cY.c files which are example of such file. A main_iX_cY.c file is setup for a particular model with X inputs and Y channels. The main differences between the main.c files are the predefined constants: /* Globals for the udp dump server */ /* ------------------------------- */ #define NCHAN_PER_BRAM 64 #define PKTS_PER_BRAM 1 #define BRAMS_PER_PKT 4 #define NBRAMS 32 #define DESIGN_NAME I_POCO8_32CH_V002 #define DESIGN_NAME_STR "I_POCO8_32CH_V002" #define COMPILED_ON "06-Aug-2009 17:57:04" Once you have updated your main.c file for your specific design, insert the new code as main.c in the Software/ directory of the model and rerun XPS on the system.xmp file > xps -nw system.xmp > run init_bram What do you think? 2014-07-04 9:09 GMT-06:00 G Jones <[email protected]>: > I think that's the wrong place. You want something in the implementation > directory if i recall correctly. > Glenn > On Jul 4, 2014 11:05 AM, "Rolando Paz" <[email protected]> wrote: > >> When the design is compiled, several folders are created. >> The XPS_IBOB_base folder is one of them, and inside this folder is >> created the Software folder, and inside this folder is created the main.c >> file. >> I remove this main.c file created by the compilation, and I copy the new >> main.c in the same directory. >> >> C:/i_poco4_1024ch_v007/XPS_iBOB_base/Software/main.c >> >> Thanks Glenn, I will do the test you suggested me. >> >> Rolando Paz >> >> >> >> >> 2014-07-04 8:39 GMT-06:00 G Jones <[email protected]>: >> >>> Yeah, somehow it looks like the new main.c you are trying to use is not >>> getting included. Where are you putting the main.c? One thing you can try >>> is instead of putting your new main.c in there, try just deleting the >>> main.c that is there and try the run init_bram. If it does not fail, then >>> that means the main.c you are replacing is not the one it is using... >>> >>> >>> On Fri, Jul 4, 2014 at 10:31 AM, Rolando Paz <[email protected]> wrote: >>> >>>> Hi Glenn >>>> >>>> Yes, I communicate with the IBOB over ethernet. >>>> >>>> I found what you see in the attached images. >>>> >>>> After running the following commands, with the Aaron bit file programed >>>> inside the IBOB, the bram transmission was initialized. >>>> >>>> regwrite ctrl_sw 0x03ff >>>> regwrite sync_gen/period 149504000 >>>> startudpdump >>>> >>>> When I run the same commands with my bit file inside the IBOB, I found >>>> that the command startudpdump is not there! >>>> >>>> That's why I think I'm doing something wrong, so the main.c does not >>>> modify the PowerPC code, and hence is not programmed startudpdum. >>>> >>>> >>>> >>>> >>>> >>>> 2014-07-04 8:04 GMT-06:00 G Jones <[email protected]>: >>>> >>>> Hi Rolando, >>>>> I think you mentioned that you are able to communicate with the IBOB >>>>> over ethernet. Is that correct? Can you read and set registers using the >>>>> UDP interface? If so, then the communication is working and the problem is >>>>> not the communication itself. >>>>> >>>>> Glenn >>>>> >>>>> >>>>> On Fri, Jul 4, 2014 at 9:59 AM, Rolando Paz <[email protected]> wrote: >>>>> >>>>>> Hi again everyone! >>>>>> >>>>>> I do not know if some one still remember this ... :-) but I will do >>>>>> the question: >>>>>> >>>>>> I'm trying to modify the PowerPC code which interacts with LWIP in >>>>>> order to automate the transmission of the shared BRAM from my correlator, >>>>>> but I was unable accomplish it. >>>>>> >>>>>> I'm using CMD (WINXP) to do this: >>>>>> >>>>>> The new main.c file is located in the following directory: >>>>>> >>>>>> C:/i_poco4_1024ch_v007/XPS_iBOB_base/Software/main.c >>>>>> >>>>>> Then I run the following commands, inside the following directory: >>>>>> >>>>>> Directory: >>>>>> >>>>>> C:/i_poco4_1024ch_v007/XPS_iBOB_base/ >>>>>> >>>>>> Commands: >>>>>> >>>>>> > xps -nw system.xmp >>>>>> > run init_bram >>>>>> >>>>>> >>>>>> This is the output of "run init_bram": >>>>>> >>>>>> XPS% run init_bram >>>>>> powerpc-eabi-gcc -Os >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/Software/main >>>>>> .c /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/Software/tinysh.c >>>>>> /cygdrive/c/i >>>>>> _poco4_1024ch_v007/XPS_iBOB_base/drivers/core_util.c >>>>>> /cygdrive/c/i_poco4_1024ch_ >>>>>> v007/XPS_iBOB_base/drivers/xps_xsg/clk.c >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBO >>>>>> B_base/drivers/xps_xsg/devices.c >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/d >>>>>> rivers/xps_xsg/memory.c >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/drivers/xp >>>>>> s_sw_reg/reg.c >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/drivers/xps_lwip/fi >>>>>> fo.c >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/drivers/xps_lwip/lwipinit.c >>>>>> / >>>>>> cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/drivers/xps_lwip/lwiputil.c >>>>>> /cygdri >>>>>> ve/c/i_poco4_1024ch_v007/XPS_iBOB_base/drivers/xps_bram/bram.c >>>>>> /cygdrive/c/i_poc >>>>>> o4_1024ch_v007/XPS_iBOB_base/drivers/core_info.c -o >>>>>> Software/executable.elf \ >>>>>> -Wl,-T >>>>>> -Wl,/cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/Software/LinkerScr >>>>>> ipt.lwip -I./ppc405_1/include/ -ISoftware/ -Idrivers/ >>>>>> -Idrivers/xps_xsg/ -I >>>>>> drivers/xps_sw_reg/ -Idrivers/xps_lwip/ -Idrivers/xps_bram/ >>>>>> -L./ppc405_1/lib/ >>>>>> \ >>>>>> -DLWIP_ENABLE -llwip4 >>>>>> In file included from ./ppc405_1/include/netif/etharp.h:43, >>>>>> from ./ppc405_1/include/netif/xemacliteif.h:42, >>>>>> from >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/Software/mai >>>>>> n.c:24: >>>>>> ./ppc405_1/include/lwip/ip.h:125: warning: 'packed' attribute ignored >>>>>> for field >>>>>> of type 'struct ip_addr' >>>>>> ./ppc405_1/include/lwip/ip.h:126: warning: 'packed' attribute ignored >>>>>> for field >>>>>> of type 'struct ip_addr' >>>>>> In file included from ./ppc405_1/include/netif/xemacliteif.h:42, >>>>>> from >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/Software/mai >>>>>> n.c:24: >>>>>> ./ppc405_1/include/netif/etharp.h:50: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'u8_t[5u]' >>>>>> ./ppc405_1/include/netif/etharp.h:56: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct eth_addr' >>>>>> ./ppc405_1/include/netif/etharp.h:57: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct eth_addr' >>>>>> ./ppc405_1/include/netif/etharp.h:65: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct eth_hdr' >>>>>> ./ppc405_1/include/netif/etharp.h:70: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct eth_addr' >>>>>> ./ppc405_1/include/netif/etharp.h:71: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct ip_addr' >>>>>> ./ppc405_1/include/netif/etharp.h:72: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct eth_addr' >>>>>> ./ppc405_1/include/netif/etharp.h:73: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct ip_addr' >>>>>> ./ppc405_1/include/netif/etharp.h:79: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct eth_hdr' >>>>>> ./ppc405_1/include/netif/etharp.h:80: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct ip_hdr' >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/Software/main.c: In >>>>>> function 'star >>>>>> tudpdump_cmd': >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/Software/main.c:184: >>>>>> warning: assi >>>>>> gnment makes pointer from integer without a cast >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/Software/main.c: In >>>>>> function 'main >>>>>> ': >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/Software/main.c:416: >>>>>> warning: inco >>>>>> mpatible implicit declaration of built-in function 'memcpy' >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/Software/main.c:437: >>>>>> warning: inco >>>>>> mpatible implicit declaration of built-in function 'memcpy' >>>>>> In file included from ./ppc405_1/include/netif/etharp.h:43, >>>>>> from ./ppc405_1/include/netif/xemacliteif.h:42, >>>>>> from >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/drivers/xps_ >>>>>> lwip/lwipinit.c:10: >>>>>> ./ppc405_1/include/lwip/ip.h:125: warning: 'packed' attribute ignored >>>>>> for field >>>>>> of type 'struct ip_addr' >>>>>> ./ppc405_1/include/lwip/ip.h:126: warning: 'packed' attribute ignored >>>>>> for field >>>>>> of type 'struct ip_addr' >>>>>> In file included from ./ppc405_1/include/netif/xemacliteif.h:42, >>>>>> from >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/drivers/xps_ >>>>>> lwip/lwipinit.c:10: >>>>>> ./ppc405_1/include/netif/etharp.h:50: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'u8_t[5u]' >>>>>> ./ppc405_1/include/netif/etharp.h:56: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct eth_addr' >>>>>> ./ppc405_1/include/netif/etharp.h:57: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct eth_addr' >>>>>> ./ppc405_1/include/netif/etharp.h:65: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct eth_hdr' >>>>>> ./ppc405_1/include/netif/etharp.h:70: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct eth_addr' >>>>>> ./ppc405_1/include/netif/etharp.h:71: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct ip_addr' >>>>>> ./ppc405_1/include/netif/etharp.h:72: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct eth_addr' >>>>>> ./ppc405_1/include/netif/etharp.h:73: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct ip_addr' >>>>>> ./ppc405_1/include/netif/etharp.h:79: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct eth_hdr' >>>>>> ./ppc405_1/include/netif/etharp.h:80: warning: 'packed' attribute >>>>>> ignored for fi >>>>>> eld of type 'struct ip_hdr' >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/drivers/xps_lwip/lwipinit.c: >>>>>> In fu >>>>>> nction 'lwipinit': >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/drivers/xps_lwip/lwipinit.c:243: >>>>>> w >>>>>> arning: incompatible implicit declaration of built-in function >>>>>> 'memcpy' >>>>>> In file included from ./ppc405_1/include/lwip/tcp.h:44, >>>>>> from >>>>>> /cygdrive/c/i_poco4_1024ch_v007/XPS_iBOB_base/drivers/xps_ >>>>>> lwip/lwiputil.c:12: >>>>>> ./ppc405_1/include/lwip/ip.h:125: warning: 'packed' attribute ignored >>>>>> for field >>>>>> of type 'struct ip_addr' >>>>>> ./ppc405_1/include/lwip/ip.h:126: warning: 'packed' attribute ignored >>>>>> for field >>>>>> of type 'struct ip_addr' >>>>>> powerpc-eabi-size Software/executable.elf >>>>>> text data bss dec hex filename >>>>>> 57400 1528 1857072 1916000 1d3c60 Software/executable.elf >>>>>> >>>>>> ********************************************* >>>>>> Initializing BRAM contents of the bitstream >>>>>> ********************************************* >>>>>> bitinit system.mhs -pe ppc405_1 Software/executable.elf \ >>>>>> -bt implementation/system.bit -o implementation/download.bit >>>>>> >>>>>> bitinit version Xilinx EDK 10.1.03 Build EDK_K_SP3.6 >>>>>> Copyright (c) Xilinx Inc. 2002. >>>>>> >>>>>> Parsing MHS File system.mhs... >>>>>> >>>>>> Overriding IP level properties ... >>>>>> >>>>>> Performing IP level DRCs on properties... >>>>>> >>>>>> Running DRC Tcl procedures for OPTION IPLEVEL_DRC_PROC... >>>>>> Address Map for Processor ppc405_1 >>>>>> (0b0000010000-0b0000010011) ppc405_1 >>>>>> (0b0000100000-0b0000100011) ppc405_1 >>>>>> (0000000000-0x001fffff) plb_sram_0 plb >>>>>> (0xd0000000-0xd00000ff) >>>>>> i_poco4_1024ch_v007_acc_len plb->plb2opb_bridge_0->opb0 >>>>>> (0xd0000100-0xd00001ff) >>>>>> i_poco4_1024ch_v007_acc_num plb->plb2opb_bridge_0->opb0 >>>>>> (0xd0000200-0xd00002ff) >>>>>> i_poco4_1024ch_v007_adc_sum_sq plb->plb2opb_bridge_0->opb0 >>>>>> (0xd0000300-0xd00003ff) >>>>>> i_poco4_1024ch_v007_ctrl_sw plb->plb2opb_bridge_0->opb0 >>>>>> (0xd0000400-0xd00004ff) >>>>>> i_poco4_1024ch_v007_eq_coeff plb->plb2opb_bridge_0->opb0 >>>>>> (0xd0002000-0xd0003fff) >>>>>> i_poco4_1024ch_v007_ibob_lwip_ethlite plb->plb2opb_bridge_0->opb0 >>>>>> (0xd0004000-0xd00040ff) >>>>>> i_poco4_1024ch_v007_ibob_lwip_macbits plb->plb2opb_bridge_0->opb0 >>>>>> (0xd0004100-0xd00041ff) >>>>>> i_poco4_1024ch_v007_sync_gen1_period plb->plb2opb_bridge_0->opb0 >>>>>> (0xd0006000-0xd0007fff) >>>>>> i_poco4_1024ch_v007_xengine4_aa_real plb->plb2opb_bridge_0->opb0 >>>>>> (0xd0008000-0xd0009fff) >>>>>> i_poco4_1024ch_v007_xengine4_ab_imag plb->plb2opb_bridge_0->opb0 >>>>>> (0xd000a000-0xd000bfff) >>>>>> i_poco4_1024ch_v007_xengine4_ab_real plb->plb2opb_bridge_0->opb0 >>>>>> (0xd000c000-0xd000dfff) >>>>>> i_poco4_1024ch_v007_xengine4_ac_imag plb->plb2opb_bridge_0->opb0 >>>>>> (0xd000e000-0xd000ffff) >>>>>> i_poco4_1024ch_v007_xengine4_ac_real plb->plb2opb_bridge_0->opb0 >>>>>> (0xd0ffdd00-0xd0ffddff) opb_clockcontroller_0 >>>>>> plb->plb2opb_bridge_0->opb0 >>>>>> (0xd0ffdf00-0xd0ffdfff) RS232_UART_1 plb->plb2opb_bridge_0->opb0 >>>>>> (0xd1000000-0xd1001fff) >>>>>> i_poco4_1024ch_v007_xengine4_ad_imag plb->plb2opb_bridge_opb1->opb1 >>>>>> (0xd1002000-0xd1003fff) >>>>>> i_poco4_1024ch_v007_xengine4_ad_real plb->plb2opb_bridge_opb1->opb1 >>>>>> (0xd1004000-0xd1005fff) >>>>>> i_poco4_1024ch_v007_xengine4_bb_real plb->plb2opb_bridge_opb1->opb1 >>>>>> (0xd1006000-0xd1007fff) >>>>>> i_poco4_1024ch_v007_xengine4_bc_imag plb->plb2opb_bridge_opb1->opb1 >>>>>> (0xd1008000-0xd1009fff) >>>>>> i_poco4_1024ch_v007_xengine4_bc_real plb->plb2opb_bridge_opb1->opb1 >>>>>> (0xd100a000-0xd100bfff) >>>>>> i_poco4_1024ch_v007_xengine4_bd_imag plb->plb2opb_bridge_opb1->opb1 >>>>>> (0xd100c000-0xd100dfff) >>>>>> i_poco4_1024ch_v007_xengine4_bd_real plb->plb2opb_bridge_opb1->opb1 >>>>>> (0xd100e000-0xd100ffff) >>>>>> i_poco4_1024ch_v007_xengine4_cc_real plb->plb2opb_bridge_opb1->opb1 >>>>>> (0xd1010000-0xd1011fff) >>>>>> i_poco4_1024ch_v007_xengine4_cd_imag plb->plb2opb_bridge_opb1->opb1 >>>>>> (0xd1012000-0xd1013fff) >>>>>> i_poco4_1024ch_v007_xengine4_cd_real plb->plb2opb_bridge_opb1->opb1 >>>>>> (0xd1014000-0xd1015fff) >>>>>> i_poco4_1024ch_v007_xengine4_dd_real plb->plb2opb_bridge_opb1->opb1 >>>>>> (0xffff0000-0xffffffff) plb_bram_if_cntlr_1 plb >>>>>> Address Map for Processor ppc405_0 >>>>>> (0b0000010000-0b0000010011) ppc405_0 >>>>>> (0b0000100000-0b0000100011) ppc405_0 >>>>>> >>>>>> Initializing Memory... >>>>>> Checking ELFs associated with PPC405 instance ppc405_1 for overlap... >>>>>> >>>>>> >>>>>> Analyzing file Software/executable.elf... >>>>>> Running Data2Mem with the following command: >>>>>> data2mem -bm "implementation/system_bd" -bt >>>>>> "implementation/system.bit" -bd >>>>>> "Software/executable.elf" tag ppc405_1 -o b >>>>>> implementation/download.bit >>>>>> Memory Initialization completed successfully. >>>>>> >>>>>> 0 >>>>>> XPS% >>>>>> >>>>>> >>>>>> If anyone has any suggestions I would appreciate it very much! :-) >>>>>> >>>>>> Best Regards >>>>>> >>>>>> Rolando Paz >>>>>> >>>>>> >>>>> >>>> >>> >>

