xena developer download?

AmigaOne X1000 platform specific issues.
ggw
Posts: 106
Joined: Wed May 02, 2012 4:19 am
Location: Austin, TX
Contact:

xena developer download?

Post by ggw »

Am unable to locate it. Where is it?
George Wyche
User avatar
LyleHaze
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 525
Joined: Sat Jun 18, 2011 4:06 pm
Location: North Florida, near the Big Bend

Re: xena developer download?

Post by LyleHaze »

It was pre-installed on the last ISO release.
Was not released as a separate download.

X1000-First-Contact-Update2.lha
also info at
http://wiki.amigaos.net/index.php/Xena_Resource

If you have SDK: installed it should install the developer files as well.

Any trouble? Let me know here and I'll help sort it out.

LyleHaze
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: xena developer download?

Post by mechanic »

Lyle,

I had a look at the Wiggle.xc and noticed the gpio pin gets set to a in port.
Or am I wrong?

If true, is this somehow used with the Xtools utilities?
Or do they do their business with an other port?

Or, is it set that way just to prevent any output to CPU?

Len,

Confused as usual. :oops:
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
LyleHaze
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 525
Joined: Sat Jun 18, 2011 4:06 pm
Location: North Florida, near the Big Bend

Re: xena developer download?

Post by LyleHaze »

These XMOS chips are different than any other chips I've played with in the past.
But I'm also finding them quite powerful.

I'm not sure which GPIO pin you are referring to, but I can do a quick breakdown of the entire wiggle.xc file here..

from sys:utilities/Xena/Demos/Wiggle/src/Wiggle.xc

lines 1-6 are comments
lines 8-11 include header files that are needed
line 13 defines "PERIOD" as 20 million
lines 15 - 20 are more comments

Lines 23 to 30 define names for the pins we want, and also define
which core each is connected to, and most are also defined as
inputs or outputs.

The choice to use "pin_" at the beginning of each name is to help code
readability as well, so you'll know you're looking at a pin definition in the code.

Lines 37 to 40 launch two threads.. one on core 0 and one on core 1.
They are both running the same code, but have different pins and different periods.

Obviously the pin connected to core 0 goes with the thread running on core 0,
same same for core 1.

lines 45 to 91 are a function that is not being used in this example.
It was commented out back on line 39.

Finally, lines 93 to 110 are the "Flash" routine, running concurrently on separate
threads in two separate cores. Each of those threads will use a timer in addition to the
single bit output that was specified.

Please forgive if I gave more information than you needed. I figure if it's out here for
everyone to read, I might as well cover all the bases.

Some ideas for tinkering:
At lines 38 and 40 you can play with period to change the flash rates.
The originals are set to PERIOD and PERIOD * 8, if you changed the second one
to period / 4 the slowest flashing LED would flash 32 times faster.

If you're really feeling adventurous, you could modify the code around lines 100 to 110,
and start dimming the LEDs instead of just on-off. Google "Pulse Width Modulation" to
see how. We are now holding the ON and OFF times equal, but that could be changed
easily. Once the total (ON + OFF) period is short enough, your eye will just see an
average brightness.

Writing a zero, "pin_XYZ <: 0;" turns ON the LED, writing a one, "pin_XYZ <:1;" turns it OFF.

I would strongly advise that you play only with the LED pins at this time. :(
In particular, writing to pin_LPC_AD would be very bad. :shock:

Once you have built a new executable (.xc) file, just set the tooltype to
sys:utilities/Xena/XTools/XRUNXE, then change the startup to shell, no prompt.
You can then load and run just by double-clicking.

The XReset tool will stop any code you have loaded.

Don't be afraid to ask questions.. I'll answer as best I can.

Lyle
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: xena developer download?

Post by mechanic »

Excellent.
Thanks Lyle.

The pin I was questioning is defined on line 30, IRQ = XS1_PORT_1F.
I believe that pin is 'normally' to be used as an output perhaps to call a service routine when some condition of Xenas program calls for it.

Wiggle sets this pin to an input, and I was wondering why since I don't see anything more in wiggle to service that pin.

??????
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
LyleHaze
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 525
Joined: Sat Jun 18, 2011 4:06 pm
Location: North Florida, near the Big Bend

Re: xena developer download?

Post by LyleHaze »

mechanic wrote:Excellent.
Thanks Lyle.

The pin I was questioning is defined on line 30, IRQ = XS1_PORT_1F.
I believe that pin is 'normally' to be used as an output perhaps to call a service routine when some condition of Xenas program calls for it.

Wiggle sets this pin to an input, and I was wondering why since I don't see anything more in wiggle to service that pin.

??????
You are correct on all counts. (I see you have done this before. ;) )

That pin is intended to allow Xena to request attention (IRQ = Interrupt Request) when it needs support from the
other side. In this case, whatever code in OS4 that is handling the localbus transfers.

It is not unusual to begin a project by defining everything as inputs, then changing parts to output gradually as you
"bring up" each section. This is especially important when connecting two processors, to make sure that both sides
are not driving the same signal at the same time.

So until we are SURE that particular connection is set to "input" on the Nemo end, it would be safest to leave it
as an input at Xenas end of the wire. Connecting two inputs is not a problem, but connecting two outputs can cause
anything from excessive current consumption to damaged output drivers.

Other chips I have used (mostly PIC 18F series) use two or three different registers to control each pin.
A "TRIS" register defines each bit as input or output, and one or two data registers access that read or write.

One of the differences in XC (the variant of C used for XMOS chips) is that pins _MAY_ be defined as inputs or
outputs when declared, and those which are not explicitly declared as in or out may be switched back and
forth simply by reading or writing the pin. For example:

on stdcore [1] : port in pin_IRQ = XS1_PORT_1F;
can only be used as an input. But if we declare

on stdcore [1] : port pin_IRQ = XS1_PORT_1F;
Then any read.. i.e.
pin_IRQ :> x
will set the pin to an input, and store it's current value in x. And as expected
pin_IRQ <: x
will set the same pin as an output, with the level set by the value in x

I _love_ the simplicity of this syntax, but I will hard declare anything that does not change direction, just to
reduce the likelihood of errors. And until I have verified that particular pin is set as an input on the Nemo end,
it's probably safest to keep it as an input at the Xena end as well.

LyleHaze
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: xena developer download?

Post by mechanic »

'I see you have done this before.'

Not on Xmos, and certainly not on Xena. It's gonna be interesting and fun.
Of course it will be all the better once there is something to plug into Xorro.

Just a bunch of stuff to figure out in the beginning, like wasteing two days trying to get CentOS to crank up on my x86 for the XDE. Just not going to happen on my hardware, but Deb Squeeze handles it just fine.(So far.)

No doubt more questions will follow, and hopefully discussions on various projects. We just might need a Xena/Xorro/Xmos forum. :-)

Thanks again Lyle.

Len
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
LyleHaze
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 525
Joined: Sat Jun 18, 2011 4:06 pm
Location: North Florida, near the Big Bend

Re: xena developer download?

Post by LyleHaze »

mechanic wrote:Deb Squeeze handles it just fine.(So far.)
Just checking.. Is that Squeeze x86 or PPC??
I asked around and was told that XDE doesn't run on PPC distros.

If you know otherwise.. I'd really LOVE to hear about it.

I have not had time/reason to install Deb on the X yet, but that would certainly qualify.

Thanks,
Lyle
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: xena developer download?

Post by mechanic »

That's on x86.

It's Deb 6.0.5 32bit.
First I tried CentOS, then Fedora LDXE, then Mint-Deb, and finally Squeeze. Pain in the neck, but with Debby around keeping everything soaking wet............

After I got it installed I stumbled across some info on Xmos site saying Squeeze would work if the JRE was a certain version (1.9 I think) but that is what came with the distro so no troubles.
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
jaokim
Beta Tester
Beta Tester
Posts: 90
Joined: Sat Jun 18, 2011 12:41 am

Re: xena developer download?

Post by jaokim »

It was pre-installed on the last ISO release.
Was not released as a separate download.

X1000-First-Contact-Update2.lha

Edit: Never mind! I just hadn't registered my X1000 on the hyperion website... :oops: After registration I now see the download.

I can't seem to find the Xena-tools for X1000. I can't find them in SYS:Utilities, nor on the CD shipped with my X1000.
Is the "X1000-First-Contact-Update2.lha" available for download somewhere? I've looked in the download section of a-eon.com, and at hyperion-entertainment.biz, but can't find it.
Post Reply