Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: 16550 UART to Avalon

  1. #1
    Join Date
    Oct 2010
    Posts
    76
    Rep Power
    1

    Default 16550 UART to Avalon

    Hi,

    I am woring on a student project and need following information:
    How to connect 16550 UART to Avalon interface when adding component to SOPC builder.

    I would be proud of your response.

    Regards

  2. #2
    Join Date
    Jun 2010
    Location
    Spain
    Posts
    1,467
    Rep Power
    1

    Default Re: 16550 UART to Avalon

    Do you want to connect a 16550 UART chip extern to fpga or do you want to add an uart module to the sopc system?

  3. #3
    Join Date
    Oct 2010
    Posts
    76
    Rep Power
    1

    Default Re: 16550 UART to Avalon

    I want to connect a 16550 UART chip extern to fpga. What do you suggest me?

  4. #4
    Join Date
    Jun 2010
    Location
    Spain
    Posts
    1,467
    Rep Power
    1

    Default Re: 16550 UART to Avalon

    Include in sopc builder a tristate bus and connect it to a fake component (i.e. a flash device).
    Then you will have the standard asynchronous bus interface outside of sopc module. Simply route the bus signals (data, addr, cs, wr, rd) to the pins connected to same signals of the uart device.

    Regards

  5. #5
    Join Date
    Oct 2010
    Posts
    76
    Rep Power
    1

    Default Re: 16550 UART to Avalon

    Hi ,

    Please I am rigth now on the first stage :adding the opencore UART 16550 vhdl code in SOPC as a module in order to instantiate it.
    Please can you give me some advice to achieve it.......

    Regargs,

  6. #6
    Join Date
    Jun 2010
    Location
    Spain
    Posts
    1,467
    Rep Power
    1

    Default Re: 16550 UART to Avalon

    First of all you need an Avalon bus interface, because opencore modules usually interface to Wishbone bus, not Avalon.
    Anyway the Wishbone/Avalon glue logic is fairly straightforward. You can refer to this thread and the links you'll find in it:
    http://www.alteraforum.com/forum/showthread.php?t=2238

    The next step is building the sopc component.
    First of all read the guide http://www.altera.com/literature/hb/...s_qii54004.pdf
    Then, I'd suggest you take a tcl file from another component as a template and write your own, changing what you need. IMHO this is more convenient than creating the new component from scratch in sopc builder, but you can do either.
    Remember that the tcl file must be *_hw.tcl, otherwise sopc builder won't find it when you'll refresh the component list.

  7. #7
    Join Date
    Oct 2010
    Posts
    76
    Rep Power
    1

    Default Re: 16550 UART to Avalon

    Thank you for your advices.It really help me to understand details relating to Wishbone_Avalon Interface:

    Here is my avalon_Top_file but please can you give me some advices to test it and make sure it works?

    I would appreciate any support

    Regards,
    Attached Files Attached Files

  8. #8
    Join Date
    Jun 2010
    Location
    Spain
    Posts
    1,467
    Rep Power
    1

    Thumbs up Re: 16550 UART to Avalon

    I made this way in a past project:
    Code:
      
        assign avs_s1_readdata[31:8] = 24'hz;
        (...)
        .wb_rst_i (avc_c1_reset),
        .wb_adr_i({2'b0, avs_s1_address[9:2]}),
        .wb_dat_i(avs_s1_writedata[7:0]),
        .wb_dat_o(avs_s1_readdata[7:0]),
        .wb_we_i (avs_s1_write & ~avs_s1_read),
        .wb_stb_i (avs_s1_chipselect & (avs_s1_write | avs_s1_read)),
        .wb_cyc_i (avs_s1_chipselect),
        .wb_ack_o (avs_s1_waitrequest_n),
    If I remember correctly I used the address remapping trick and a fake 32bit width because of a Avalon bus bug. Infact Avalon always makes 32bit accesses, even if you use 8 or 16bit macros. For example IORD_8DIRECT would actually make 4 8bit reads in order to complete a 32bit bus word.
    This can corrupt your data if you have a peripheral with FIFOs (like UART usually have) which pop a data byte for every read access to the rx register.

    Cris

  9. #9
    Join Date
    Oct 2010
    Posts
    76
    Rep Power
    1

    Default Re: 16550 UART to Avalon

    Ok thank for your advices,

    Do you have any suggestions for a suitable testbench to make sure it works as expected?

    Regards,

  10. #10
    Join Date
    Jun 2010
    Location
    Spain
    Posts
    1,467
    Rep Power
    1

    Default Re: 16550 UART to Avalon

    First of all test the bus interface.
    I dont' know that uart core, but if it is 16550 compliant it should have a scratch register. Try to write some data into it and verify you can read it back,

Similar Threads

  1. FIFOed Avalon Uart
    By longshot in forum General Discussion Forum
    Replies: 58
    Last Post: February 20th, 2014, 11:15 AM
  2. Avalon UART not detecting BREAK
    By JDcpi in forum General Discussion Forum
    Replies: 1
    Last Post: August 30th, 2010, 06:59 AM
  3. Replies: 2
    Last Post: May 30th, 2008, 12:03 AM
  4. drivers for opencores 16550 Uart
    By mountain8848 in forum Linux Forum
    Replies: 0
    Last Post: December 20th, 2005, 02:13 AM
  5. UART 16550 from OpenCores
    By VLorenzo in forum General Discussion Forum
    Replies: 1
    Last Post: November 14th, 2005, 11:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •