element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet & Tria Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
MicroZed Hardware Design MicroZed PS + PL with vivado 2013.4 and Linux command
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 5 replies
  • Subscribers 341 subscribers
  • Views 701 views
  • Users 0 members are here
Related

MicroZed PS + PL with vivado 2013.4 and Linux command

Former Member
Former Member over 11 years ago

Hi everybody.

I'm novice with ZYNQ SoC design. I bought a MicroZed board and I ran  01_MicroZed_Zynq_Intro_2013_2_01.pdf and Micro_zed_getting_started_v1.1.pdf tutorials. Everything was good (clear and simple).

Now I would like to generate a bitstream with PS + PL under Vivado
The idea is to implement a simple R/W register (32 bits) into PL. I would like to perform read/write on this register thanks to Linux command. Thus. I will be sure that PL is well configured.


Could you help me to do that ?
Which tools do I have to use ?
How to implement the register into PL into the Vivado project
How to connect PS to this register ?
Do I need any Linux driver to accees to the register via TeraTerm?


I know I have to convert bitstream.bit into bitstream.bit.bin as explained into xilinx AR# 46913 but I don't manage to do it.


I find this tuto MicroZed_Open_Source_Linux_In_System_QSPI_Programming_14_5_01-Tutorial but It seems to me that it needs ISE whereas I use Vivado 2013.4.

thanks very much.

best regards

Guillaume

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 11 years ago

    I am not familiar with the tutorials you are referring to. I think perhaps you are mixing the ZedBoard and the MicroZed board. Could you clarify which board you want to work with and post links to the tutorials you have used.

     

    -Gary

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    Hi Gary.

    The board with which I work is MicroZed http://www.zedboard.org/product/microzed (without carrier board)

    I downloaded microzed tutorials at
    http://www.zedboard.org/documentation/1519.

    The first tutorial (tuto 1) is MicroZed_GettingStarted_v1.1.pdf (procedure to run a simple Linux design to show a Linux application running on the ARMu00AE dual-core Cortexu2122-A9 MPCoreu2122 Processing System (PS))

    The second tuto (tuto 2) I used is 01_MicroZed_Zynq_Intro_2013_2_01 at http://zedboard.org/content/vivado-20132-version-0

    Everything was all right but now I would like to implement a R/W register in PL, create a bitstream.bit, download the bitstream on ZYNQ and then used Linux as I did with tuto 1 to access to this register.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago

    Here's a brief description of the process.  It took me a while to get through this and get it working.  You'll have to figure out the steps inbetween, but here's the main steps as well as I was able to figure it out.  Somebody else might have a better way of doing this.

    1) Under Vivado use the /Tools/Create and Package IP option to build an AXI4-Lite peripheral.  Add it to your block design where the processing system is. and make sure to set the address range.  You'll also likely need to add axi_interconnect and axi_protocol_converter (if routing the interface outside the block diagram).  The protocol converter is usuful if you want to route the AXI signal outside your block diagram and connect the AXI-lite bus to your IP in a regular VHDL file that has an AXI-Lite interface. 
    I ended up extracting the axi4-lite exmaples vhdl file which holds the registers and then added then put my own logic into that file.  That file added to the sources and then connected in the toplevel VHDL file where the processor block diagram was also instantiated, but for simple r/w registers you can keep it all in the IP core you created.  Only downside is you have to switch to the IP core and close your project. Edit the IP core, and then reopen your project again.

    2) Export the design into XSDK.  You should see the new peripheral there with its address range shown.

    3) For Linux you'll need to add the new peripheral to the device tree source file and recompile it into a binary blob.

    The entry will look something like this and go under the axi_interconnect: AMBA@0 section.  Your addresses and names (M00_AXI_DAQ) will be different.  So might your address width depending on how you built the core.  Again, this goes in the .dts file which you then use dtc to compile into a .dtb file and you put that on your flash. 
    tt
    M00_AXI_DAQ: M00_AXI_DAQ@43c10000 {
    tttcompatible = "xlnx,M00_AXI_DAQ-1.0";
    tttreg = <0x43c10000 0x1000>;
    tttxlnx,s00-axi-addr-width = <0xC>;
    tttxlnx,s00-axi-data-width = <0x20>;
    tt} ;

    4) You can then use mmap to map the peripheral I/O addresses into user space memory.  mmap will give you a ptr to which you can r/w data to.  You'll have to run your application as root.
    I was able to get about 20 MB/s reading and writng to 32 bit registers.  Not great perormance, but it worked.

    You can find more info. on the memory mapped I/O here:
    http://fpgacpu.wordpress.com/2013/05/28/how-to-design-and-access-a-memory-mapped-device-part-one/

    Easietst way to program the FPGA part of the zynq you is to take your myfpga.bit and convert it to a bin as explained in Xilinx AR#46913 using promgen. Promgen doesn't seem to come with the Vivado installation for some reason so you'll have to grab it from ISE 14.7 or older.

    Once you have the myfpga.bin file ftp or scp it onto Linux running on the Zynq.  Once there to program all you have to do is:
    cat myfpga.bin >/dev/xdevcfg
    as the root user.

    If you want it to load automatically you can put it on the microsd card in the first fat32 partion as system.bit.bin.  You can also package it into the FSBL using a Xilinx tool in the XSDK.

    I really wish they had a good tutorial on how to do this.  I burned up a lot of time figuring it out.  Most of the tutorials use the older ISE tool flow Planahead, XPS.  I am waiting for some better tutorials on how to use Vivado with your own HDL files and the Zynq processor, but they haven't come out yet.

    Best of Luck,

    J

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    @ jbattles.
    Many thanks !!! As I see, i'm not alone with difficulties to implement a simple PL architecture into ZYNQ vith vivado.

    I knew Prompgen command is unavailable under Vivado (obvious).

    I'm following your procedure step by step.
    First, is it possible to use axi_bram_ctrl configurate AXI4-lite  ?

    here's tcl console message
    set_property -dict [list CONFIG.PROTOCOL {AXI4LITE}] [get_bd_cells axi_bram_ctrl_0]
    INFO: [xilinx.com:ip:axi_bram_ctrl:3.0-99] design_1_axi_bram_ctrl_0_0: value of PARAM_VALUE.PROTOCOL = AXI4LITE
    INFO: [xilinx.com:ip:axi_bram_ctrl:3.0-99] design_1_axi_bram_ctrl_0_0: value of PARAM_VALUE.SUPPORTS_NARROW_BURST = 0
    INFO: [xilinx.com:ip:axi_bram_ctrl:3.0-565] design_1_axi_bram_ctrl_0_0: Protocol value = AXI4LITE
    INFO: [xilinx.com:ip:axi_bram_ctrl:3.0-99] design_1_axi_bram_ctrl_0_0: value of PARAM_VALUE.DATA_WIDTH = 32
    INFO: [xilinx.com:ip:axi_bram_ctrl:3.0-99] design_1_axi_bram_ctrl_0_0: value of PARAM_VALUE.MEM_DEPTH = 1024
    INFO: [xilinx.com:ip:axi_bram_ctrl:3.0-99] design_1_axi_bram_ctrl_0_0: value of PARAM_VALUE.USE_ECC = 0
    INFO: [xilinx.com:ip:axi_bram_ctrl:3.0-99] design_1_axi_bram_ctrl_0_0: value of PARAM_VALUE.ECC_ONOFF_RESET_VALUE = 0
    INFO: [xilinx.com:ip:axi_bram_ctrl:3.0-99] design_1_axi_bram_ctrl_0_0: value of PARAM_VALUE.FAULT_INJECT = 0
    INFO: [xilinx.com:ip:axi_bram_ctrl:3.0-99] design_1_axi_bram_ctrl_0_0: value of PARAM_VALUE.ECC_TYPE = 0

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago

    Looking through the PG078 guide for it looks like AXI-4 lite mode should work as long as you make it 32 bits wide.  You should be able to read and write it the same way as any other perhiperals registers using mmap() technique.  Just be aware the AXI4-Lite r/w speed is quite slow compared to regular AXI4.  In a C program I was seeing about 20 MB/s.  In python is was much slower.

    Here's an article that's a bit more complicated and using the older tools, but you should be able to glean some insight from it.
    http://www.wiki.xilinx.com/Zynq-7000+AP+SoC+PL+BRAM+Integration+with+PS

    J

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube