Xena (hardware)

AmigaOne X1000 platform specific issues.

Xena (hardware)

Postby mechanic » Thu Feb 21, 2013 6:55 pm

How are the Mode pins wired for Xena?
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
mechanic
 
Posts: 510
Joined: Sat Jun 25, 2011 10:22 pm

Re: Xena (hardware)

Postby LyleHaze » Thu Feb 21, 2013 9:27 pm

Mode3 and Mode2 are both at Zero, which sets the boot source to "JTAG".
Of course in addition to the JTAG header, we have a JTAG adapter built in to
the XILINX PLD on board the X1000. so the header is only needed if you
don't have AmigaOS loaded.

Mode1 and Mode0 are used to select which standard crystal frequency
is used as the master clock. They are probably set as 10b or 11b,
but we override them in software, since our clock source is NOT one of
the "standards". This is done by adding the tag "Oscillator=25MHz"
in the correct place in target hardware description file.

[edit] After some thought, Mode 1:0 MUST be at 01b, because Xena
was running at 1/4 Speed before we added the oscillator adjustment
to the toolchain.

More information on oscillator selection may be found in the
XS1-L System Specification pdf on page 21.

Boot source selection is in the same document on page 1.
User avatar
LyleHaze
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 520
Joined: Sat Jun 18, 2011 5:06 pm
Location: North Florida, near the Big Bend

Re: Xena (hardware)

Postby mechanic » Thu Feb 21, 2013 10:17 pm

LyleHaze wrote:[edit] After some thought, Mode 1:0 MUST be at 01b, because Xena
was running at 1/4 Speed before we added the oscillator adjustment
to the toolchain.

More information on oscillator selection may be found in the
XS1-L System Specification pdf on page 21.

Boot source selection is in the same document on page 1.

Thanks Lyle,
I have been playing around with the xn files and 01b is what I was guessing, but could not be sure of. It was just a question that came up, not really necessary knowledge.

Thanks again.
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
mechanic
 
Posts: 510
Joined: Sat Jun 25, 2011 10:22 pm

Re: Xena (hardware)

Postby LyleHaze » Thu Feb 21, 2013 10:42 pm

The oscillator selection turned out to be a pretty big delay for us.
Most of the XCore hardware is supported natively by the XMOS toolchain. When you begin a project, you plug in whatever board you bought, and the XMOS SDK interrogates it, gets the ID number, looks up all the "correct" settings for that board/chip/crystal, and does it all without ANY user intervention.
As a result of this automatic configuration, we hit a few snags:
The Xena chip configuration is not recognized by the XMOS toolchain.
The XMOS toolchain does not run on AmigaOS, so it never had a chance of recognizing Xena anyway.
The AmigaOS tools we use to program the chip are not integrated into the XMOS IDE.
And possibly the biggest "hidden" issue, because practically EVERYONE else in the XMOS community enjoys automatic configuration, nobody ever mentioned the possible need to do it manually. ALL code examples assume a system clock of 100 MHz, and it is just assumed that everything "just works".

One of the non-employee Gurus of the XMOS community is "Segher". He has been VERY helpful in getting our local tools running on AmigaOS, as well as helping to solve the oscillator problem.

Finally, to put a nice finish on it: X1000 owners that want to write code for Xena don't need to worry about ANY of these issues. I have provided a few XML files that can be added to the XMOS SDK. Once those are in, "A-EON X1000 Xena Device" becomes an option on the "Select your platform" requester, and selecting it will take care of all the details, leaving you with a Xena-ready project.
User avatar
LyleHaze
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 520
Joined: Sat Jun 18, 2011 5:06 pm
Location: North Florida, near the Big Bend

Re: Xena (hardware)

Postby mechanic » Thu Feb 21, 2013 10:55 pm

LyleHaze wrote: leaving you with a Xena-ready project.


I see, and do you really believe I'm the kind of guy that could ever leave well enough alone? :lol: :lol:

Thanks for all your work Lyle. :) 8-)
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
mechanic
 
Posts: 510
Joined: Sat Jun 25, 2011 10:22 pm

Re: Xena (hardware)

Postby mechanic » Mon Mar 18, 2013 4:20 pm

Got a Xorro proto board a bit ago. Haven't really planned anything out as of yet
although I'm thinking along the lines of a general purpose I/O something.

The card has 2 LEDs on it connected to a driver chip and controlled by two 1 bit
ports. Port P1K on core 1, and P1A on core 0. They are wired up for the same operation
as the Nemo LEDs, a LOW output equates to LED ON, HI output OFF.

Below is some source code that will flash these LEDs and the two on Nemo at the same
rate and pattern. At least it verifies that part is working. Just run it through the XDE
compiler ( version 12.0.0 or lower) and run it the same as the Wiggle demo for checking
the LEDs on Nemo.

Code: Select all
/*
 *  xenaflash.xc
 */

#include <xs1.h>
#include <platform.h>

#define PERIOD 20000000

on stdcore [1] : port pin_LPC_AD = XS1_PORT_16A;
on stdcore [1] : port in pin_ALE = XS1_PORT_1A;
on stdcore [1] : port in pin_WE = XS1_PORT_1B;
on stdcore [1] : port in pin_OE = XS1_PORT_1C;
on stdcore [1] : port in pin_CS = XS1_PORT_1D;
on stdcore [0] : port out pin_nemo0 = XS1_PORT_1K;
on stdcore [0] : port out pin_xena0 = XS1_PORT_1A;
on stdcore [1] : port out pin_nemo1 = XS1_PORT_1E;
on stdcore [1] : port out pin_xena1 = XS1_PORT_1K;
on stdcore [1] : port in pin_IRQ = XS1_PORT_1F;

void tokenFlash (out port nemo, out port xena, int period) {

  timer tmr;
  unsigned t;

  while (1) {

    nemo <: 1;
    xena <: 1;
    tmr :> t;
    tmr when timerafter (t+ period ) :> void;

    nemo <: 0x0;
    xena <: 0x0;
    tmr :> t;
    tmr when timerafter (t+ period ) :> void;
  }
}

int main (void) {

  par {
    // tile 0 slow flash
     on stdcore [0] : tokenFlash (pin_nemo0, pin_xena0, (PERIOD*30));

   // tile 1 fast flash
     on stdcore [1] : tokenFlash (pin_nemo1, pin_xena1, (PERIOD*5));
  }
  return 0;
}
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
mechanic
 
Posts: 510
Joined: Sat Jun 25, 2011 10:22 pm


Return to Platform: AmigaOne X1000

Who is online

Users browsing this forum: No registered users and 4 guests