[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [partial-reconfig] Integrating Microblaze with EDK and Planahead
Hi,
It is very useful to add the hardware dubug module when you build the
Micorblaze core with EDK. After downloading bitstream, you can just use
"XMD" to write/read the register in your peripherals connected to the OPB
bus. For partial systems, when this happens, a little bit placement
modification can make it work.
B.R.
luyi
> Hi,
>
> Thank you for your input. When I tried to include synthesis/system_bd.bmm
> and mb0_default/executable.elf using iMPACT, I received the following
> warning: *"IMPACT:1819 - unexpected processor type 2".* In iMPACT where
> I
> added my executable.elf file, it specifies "Power PC software files", but
> I
> am using a Microblaze for my application. Would this be the source of
> error??
>
> The following steps are what I have done to generate the full and bit
> stream. Hopefully they provide the starting steps for others that want to
> incorporate a Microblaze into their partial reconfiguration design and
> point
> out what I have done wrong.
> The top.vhd, static.vhd, reconfig.vhd and top.ucf files are attached.
>
>
> Demo Description:
> The Microblaze is connected to the GPIO (1 bit) which is connected to a
> reconfigurable module that takes this input and simply turns LED1 on
> (straight thru) and LED2 (invert input signal). The blinking rate is
> determined by software through the Microblaze. For now, the Microblaze is
> in a while(1) loop that sends the signal to reconfig via GPIO at a
> pre-determined rate. The second reconfiguration module (to be
> implemented)
> will blink the two LEDs together instead of alternating.
>
>
> 1. Build the system in BSB
> - add the reconfig module peripheral
> - connect input of reconfig_module to GPIO (1 bit)
> - remove DCM (for simplicity only... to be added later)
> - verify that demois fully functional.
>
> 2. Rename hdl/system_stub.vhd to top.vhd
> - replace occurences of "system_stub" with "top"
> - replace occurences of "system" with "static"
> - remove "reconfig_0_reco_module_led1_pin" and
> "reconfig_0_reco_module_led2_pin"
> from static component
> - add "opb_gpio_0_GPIO_IO_O" to static component (connected as input
> of
> reconfig_module)
> - add busmacros (busmacro_xc2vp_r2l_sync_narrow and
> busmacro_xc2vp_l2r_sync_narrow)
> - add "reconfig_module" component
> - connect the signals together
> - run synthesis - XST
>
> 3. Rename hdl/system.vhd to static.vhd
> - replace occurences of "system" with "static"
> - remove "reconfig_0_reco_module_led1_pin" and
> "reconfig_0_reco_module_led2_pin"
> from static component
> - add "opb_gpio_0_GPIO_IO_O" to "static" entity (connected as input of
> reconfig_module)
> - remove reconfig component and its port maps (reconfig no longer
> exists
> in static.vhd)
> - de-select "Add I/O buffer" from Synthesis properties
> - run Synthesis - XST
>
> 4. Synthesis reconfig.vhd
> - de-select "Add I/O buffer" from Synthesis properties - run
> Synthesis
> - XST
>
> 5. Create PlanAhead Project
> - use top.ngc as top module
> - include static.ngc and reconfig.ngc
> - include implementation/*.ngc for all wrappers
> - include .ucf file
> - run DRC check (should pass with no violations)
> - make sure *.nmc files are at same location as top.ngc
>
> 6. Export Floorplan
> - select "partial-config" option
>
> 7. Run Partial Configration
>
> 7a) Initial budget
> - Run with default options
>
> 7b) Static Implementation
> - Run with default options
> - Option to include .BMM file (include it here???? Or use
> iMPACT??)
>
> 7c) PR Block Implementation
> - Run with default options except at "Setup Map Options", select
> "none" for "Flip-flops may be packed into...."
>
> 7d) Assemble
> - Run with default options
>
> 8. Download bitstream
>
> By now I have a "static_full.bit" and
> "ag_reconfig_module_cv_routed_partial.bit" in the merge directory. Use
> iMPACT and assign static_full.bit as configuration file. Also include
> implmentation/system_bd.bmm and mb0_default/executable.elf. When trying
> to
> download, gives the following error:
>
> Boundary-scan chain validated successfully.
> Getting bit image from data2bram...
> INFO:iMPACT:1818 - Elf file 0
> INFO:iMPACT - C:/Partial_Reconfig/XPS_GPIO/mb0_default/executable.elf
> INFO:iMPACT:1542 - Deleting BMM Mapping object.
> INFO:iMPACT:2369 - Deleting D2B Parameter Set object.
> INFO:iMPACT:2370 - Creating D2B Parameter Set object...
> INFO:iMPACT:1543 - Creating BMM Mapping object...
> INFO:iMPACT:1535 - Creating D2B Translate Object...
> NOTE: Applying the contents of the elf file required iMPACT
> to modify the bitstream in memory only. This modified
> bitstream has not been written to a file and the
> original bitstream file remain unchanged.
> Data2Bram conversion succeeded.
> '3':Programming device...
> done.
> '3': Reading status register contents...
> CRC error : 0
> Decryptor security set : 0
> DCM locked : 1
> DCI matched : 1
> legacy input error : 0
> status of GTS_CFG_B : 1
> status of GWE : 1
> status of GHIGH : 1
> value of MODE pin M0 : 1
> value of MODE pin M1 : 0
> value of MODE pin M2 : 1
> value of CFG_RDY (INIT_B) : 1
> DONEIN input from DONE pin : 1
> IDCODE not validated while trying to write FDRI : 0
> write FDRI issued before or after decrypt operation: 0
> Decryptor keys not used in proper sequence : 0
> INFO:iMPACT:2219 - Status register values:
> INFO:iMPACT - 0011 0111 1011 1000 0000 0000 0000 0000
> INFO:iMPACT:579 - '3': Completed downloading bit file to device.
> Getting bit image from data2bram...
> INFO:iMPACT:1818 - Elf file 0
> INFO:iMPACT - C:/Partial_Reconfig/XPS_GPIO/mb0_default/executable.elf
> NOTE: Applying the contents of the elf file required iMPACT
> to modify the bitstream in memory only. This modified
> bitstream has not been written to a file and the
> original bitstream file remain unchanged.
> Data2Bram conversion succeeded.
> WARNING:iMPACT:1819 - Unexpected processor type 2.
>
>
> After download, I have no reponses from the Microblaze (suppose to output
> messages through UART) and both LED1 and LED2 and constantly "ON". Could
> somebody plz advise me on what I did wrong??
>
> Thank you
>
> Edward Chen
> School of Engineering Science
> Simon Fraser University
>
>
>
> On 8/6/07, Andreas Hofmann <ahofmann@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
> wrote:
>>
>> Edward Chen schrieb:
>>
>> Hi,
>>
>> > However, the processor does not seem to do anything (perhaps no
>> software
>> > is "loaded")??? Again to keep things simple, I avoided using DCM for
>> now.
>>
>> You have to initialize the instruction memory of your MicroBlaze. You
>> can use the EDK to generate an ELF file of your program. The ELF file
>> must then be merged with the bitstream. You can use data2mem for this
>> purpose.
>>
>> If you use iMPACT to configure your FPGA it will take care of the
>> necessary steps, if you add an BMM file and your ELF file when assigning
>> a bitstream to your device.
>>
>> The BMM file is created by PlanAhead when you implemement your design.
>> Usually it's named system_bd.bmm. This file maps the BRAM instances of
>> your system to the BRAM blocks of your FPGA.
>>
>> Caveat:
>> There's also an system.bmm that is used as a basis for the generation of
>> the system_bd.bmm. This system.bmm does not include the actual placement
>> of the BRAMs.
>> Both files are in a human readable text format and reside in the
>> implementation sub-directory of an EDK project if the bitstream has been
>> generated.
>>
>> Best regards
>> Andreas
>>
>> --
>> Dipl.-Informatiker Andreas Hofmann
>>
>> Johann Wolfgang Goethe-University Frankfurt am Main
>>
>> Faculty of Computer Science and Mathematics
>> Department of Computer Science
>> Computer Engineering Chair
>>
>> Robert-Mayer-Straße 11-15
>> D-60325 Frankfurt am Main
>>
>> Tel.: +49 69 798-28252
>> Fax : +49 69 798-22351
>> ___________________________
>> partial-reconfig mailing list
>> partial-reconfig@xxxxxxxxxxxxxx
>> Mailing List Archive :
>> http://www.itee.uq.edu.au/~listarch/partial-reconfig/
>>
>
___________________________
partial-reconfig mailing list
partial-reconfig@xxxxxxxxxxxxxx
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/partial-reconfig/