1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Resolved]Saturn - Channel B Serial Communications

Discussion in 'FPGA Boards' started by connorj, May 31, 2015.

Thread Status:
Not open for further replies.
  1. connorj

    connorj New Member

    Joined:
    May 31, 2015
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Australia
    I need to use the Saturn Channel B to communicate with my serial rx/tx modules.

    In the Saturn .ucf file we have rxf, txe, rd, wr and siwua.

    NET "rxf" LOC = "K18" | IOSTANDARD = LVTTL;
    NET "txe" LOC = "K17" | IOSTANDARD = LVTTL;
    NET "rd" LOC = "J18" | IOSTANDARD = LVTTL | SLEW = FAST | DRIVE = 8 ;
    NET "wr" LOC = "J16" | IOSTANDARD = LVTTL | SLEW = FAST | DRIVE = 8 ;
    NET "siwua" LOC = "H18" | IOSTANDARD = LVTTL | SLEW = FAST | DRIVE = 8 ;

    What does each of these mean? The diagram and schematics do not explain.

    On the MojoV3 FGPA .ucf file we have avr_tx and avr_rx:

    NET "avr_tx" LOC = P55 | IOSTANDARD = LVCMOS33;
    NET "avr_rx" LOC = P59 | IOSTANDARD = LVCMOS33;

    For the MojoV3 I simply pass the avr_tx and avr_rx to the rx and tx verilog modules.

    Code:
            serial_rx #(.CLK_PER_BIT(CLK_PER_BIT)) serial_rx (
                    .clk(clk),
                    .rx(avr_tx),
                    .data(rx_data),
                    .new_data(new_rx_data)
            );
    
            serial_tx #(.CLK_PER_BIT(CLK_PER_BIT)) serial_tx (
                    .clk(clk),
                    .tx(avr_rx),
                    .busy(tx_busy),
                    .data(tx_data),
                    .new_data(new_tx_data)
            );
    
    How do I use the Saturn to communicate to/from the FPGA over Serial/USB (Channel B) in a similar manner?

    Thanks
     
  2. admin

    admin Administrator Staff Member

    Joined:
    Jan 23, 2015
    Messages:
    169
    Likes Received:
    11
    Trophy Points:
    18
    Hello,

    What you are referring to in the Saturn ucf are the signals for parallel communication (Channel B is configured in FIFO mode by default). To make Saturn work with serial communication, simply remove the parallel communication specific definitions in the ucf and add definitions for FT2232 RX and TX . Adding the following to ucf should do the job.

    NET "FT2232_UART_SIN" LOC = "L17" | IOSTANDARD = "LVCMOS33";
    NET "FT2232_UART_SOUT" LOC = "L18" | IOSTANDARD = "LVCMOS33";


    And don't forget to configure channel B appropriately. The following link has some info on that.

    http://numato.cc/content/configuring-ft2232h-usb-serial-converter-saturn-spartan-6-module

    Hope this helps.

    Thanks,
    Tom
     
    Last edited: Jun 1, 2015
  3. connorj

    connorj New Member

    Joined:
    May 31, 2015
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Australia
    This seems to be working in that I receive data in response to my request sent to the device where previously nothing would be received. Since the data is repeating the same byte (15) there is still something wrong however. Do you have any example serial verilog that is known working on this device?

    Thank You
     
    Last edited: Jun 1, 2015
  4. cyrozap

    cyrozap Moderator

    Joined:
    Apr 12, 2015
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    USA
    @connorj:
    This code is for the Mimas V2, but the general concept is the same. All you'll really need to do to get it to work with the Saturn is remove all the parts relating to the 7-segment displays and change the pin names in the UCF file to match the ones posted here.

    Edit: I wound up wanting some example code for myself, so I made the necessary modifications and posted them here.
     
    Last edited: Jun 1, 2015
  5. connorj

    connorj New Member

    Joined:
    May 31, 2015
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Australia
    I have serial communications working ok now. Thanks everybody. :)
     
  6. admin

    admin Administrator Staff Member

    Joined:
    Jan 23, 2015
    Messages:
    169
    Likes Received:
    11
    Trophy Points:
    18
    Thanks connorj for the update. We are happy to hear that serial communication worked.

    I'll mark this thread as resolved.

    Thanks,
    Tom
     
Thread Status:
Not open for further replies.

Share This Page