Author

Topic: Avalon ASIC users thread - page 177. (Read 438378 times)

-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
May 26, 2013, 03:29:55 AM
Mad props and huge thanks to Sitarow who has given me uninterrupted remote access to an avalon this past week, including the ability to power cycle one  Grin. This has allowed me to write a major overhaul of the avalon code which should make it into the next cgminer release.
hero member
Activity: 956
Merit: 1001
May 25, 2013, 01:31:42 PM
xiangfu,

any further info on the fpga firmware/bitstream?

http://downloads.qi-hardware.com/people/xiangfu/avalon/fpga-controller/

is a JTAG required to flash the fpga?
full member
Activity: 120
Merit: 100
newbie
Activity: 17
Merit: 0
May 24, 2013, 04:39:48 PM
My avalon unit has  the exactly same issue as yours. I'd like to ask if the test firmware posted by xiangfu related to this issue?

I am using firmware 20130419. Unfortunately, I don't recall the previous firmware version I was using.

Prior to the upgrade on May 5, the Avalon unit ran without any problems.

However, after the upgrade, the miner has stopped hashing twice, and the only way to recover is with a cold reset. Is this a know issue?

Cheers!

Are you guys running the avalon over wifi or ethernet? I had similar problems with a bad wifi connection: stopped hashing, no access over wifi. I came across the solution when I tried -and could - connect over ethernet and noticed a pretty bad signal/noise ratio. An interruption of the wifi connection can confuse cgminer completely.

Installing a repeater solved this issue for me and I have a Opetwrt/cgminer uptime of more than 7 days now.
jr. member
Activity: 45
Merit: 10
May 24, 2013, 02:27:18 PM
Has anyone attempted updating the fpga-controller firmware?

http://downloads.qi-hardware.com/people/xiangfu/avalon/fpga-controller/

README:
http://downloads.qi-hardware.com/people/xiangfu/avalon/fpga-controller/README

I'm reluctant to update at this point without any release notes/details on the changes with this new release.
newbie
Activity: 16
Merit: 0
May 24, 2013, 08:20:25 AM
My avalon unit has  the exactly same issue as yours. I'd like to ask if the test firmware posted by xiangfu related to this issue?

I am using firmware 20130419. Unfortunately, I don't recall the previous firmware version I was using.

Prior to the upgrade on May 5, the Avalon unit ran without any problems.

However, after the upgrade, the miner has stopped hashing twice, and the only way to recover is with a cold reset. Is this a know issue?

Cheers!
full member
Activity: 133
Merit: 101
Res Et Non Verbum
May 20, 2013, 09:22:59 PM
too little, but having an address where to send some tips would help as well, I mean, if each Avalon user sends 1 BTC per owned Avalon 100 BTCs are easily collected!

yeah, that's would be a good idea. Also displaying that donate button on a page showing credit info about the developers of this great work..
sr. member
Activity: 730
Merit: 250
May 20, 2013, 03:15:03 AM
xiangfu please answer data the delivery order 200000846

Thanks in advance for your cooperation.
legendary
Activity: 1064
Merit: 1000
May 19, 2013, 09:50:35 PM

When you reset, somehow, it should go back to default, which is, accordinly to the avalon user guide: 192.168.0.100


Well that worked..almost. I could enter failsafe-mode. Here's the instruction:
--
To get into failsafe mode, power up the device and wait until the LED starts flashing (about 2Hz). Once it starts flashing (within about 4 seconds) then quickly press the button. The LED will then flash much faster and the device will be in failsafe mode.
--

Failsafe IP is 192.168.1.1. I could telnet to the router. I checked

root@(none):/# cat /etc/config/network

config 'interface' 'loopback'
        option 'ifname' 'lo'
        option 'proto' 'static'
        option 'ipaddr' '127.0.0.1'
        option 'netmask' '255.0.0.0'

config 'interface' 'lan'
        option 'ifname' 'eth0'
        option 'type' 'bridge'
        option 'proto' 'static'
        option 'netmask' '255.255.255.0'
        option 'ipaddr' '192.168.0.100'
        option 'gateway' '192.168.0.1'
        option 'dns' '8.8.8.8'

Everything seems fine. Anyway, after rebooting I'm not able to ping or ssh 192.168.0.100.

Edit: Fixed it!
After making the filesystem writeable with "mount_root" /etc/config/network looked differently:

config interface 'lan'
        option ifname 'eth0'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.0.100'
        option dns '8.8.8.8'
        option gateway '192.168.0.101'
        option netmask '0.0.0.0'

Changed it. Reboot. Problem solved.
(And back to my original problem. Will probably talk about that later..)

Thanks for your great and fast help!

After entering failsafe mode you also reset to default settings.
Code:
mtd -r erase rootfs_data


Im using the latest 703n image(cgminer2.10.4) and now I have backup router again

hero member
Activity: 956
Merit: 1001
May 19, 2013, 05:49:24 PM
trying to compile avalon/cgminer on an extra linux box i had laying around.

using these instructions:

http://en.qi-hardware.com/wiki/Avalon#How_to_Compile_Your_Own_WR703N_Firmware_for_Avalon

ran the first
Quote
make -j4

result:

Quote
.... (lines removed)
 make[3] -C feeds/luci/contrib/package/luci compile
localhost - - [19/May/2013 16:04:37] code 404, message File not found
localhost - - [19/May/2013 16:04:37] "GET /cgminer-3.1.1.tar.bz2 HTTP/1.1" 404 -
make -r world: build failed. Please re-run make with V=s to see what's going on
make: *** [world] Error 1
user@ubuntu:~/avalon/openwrt$
legendary
Activity: 4466
Merit: 1798
Linux since 1997 RedHat 4
May 19, 2013, 05:07:59 PM
...
EDIT:
It seems that the serial driver has to be used in cgminer because, on the Control Unit side, the USB goes through an offchip UART before connecting to the Spartan-6.
Incorrect - you do not have to use serial-USB - the linux kernel simply sits on top of the ftdi_sio driver which is, of course, usb.
You just need to know how to talk to it on USB (as the sio driver already does)

Please clarify what you mean by "the linux kernel simply sits on top of the ftdi_sio driver".

My point is this: USB involves complex protocol, UART is simple. We can simulate a direct UART connection between any two systems through the Internet, as is being done as we speak. Now the Internet protocols are even more complex than USB. The easiest way to talk UART to another system through the Internet is NOT to muck with the Internet protocols (that would be crazy). The easiest way is to have another Internet appliance (similar to the one used on the other UART endpoint), and talk UART to that appliance. Similarly in the case of USB.

The simple topology seems to be [sio driver] <--> [usb driver] <-- usb wire --> [usb protocol hw] <--> [uart hw], with the [uart hw] on Avalon's control unit side dictating that the [sio driver] be used on the cgminer side. That's my point.

In other words, we may have to remove the [uart hw] on the Avalon control unit to get rid of the [sio driver] on cgminer.
ckolvias and I have already got the Lancelot working fine which uses the same chip.
Once he has more reliable access to an Avalon (or gets one) he'll sort out the Avalon USB also.
The USB for this is simple.
The ftdi_sio for this is simple.
The only difference between Avalon and what we have already done, is probably adding DSR/CTS (which was done but not working fully yet)
full member
Activity: 250
Merit: 100
RockStable Token Inc
May 19, 2013, 07:51:53 AM
...
EDIT:
It seems that the serial driver has to be used in cgminer because, on the Control Unit side, the USB goes through an offchip UART before connecting to the Spartan-6.
Incorrect - you do not have to use serial-USB - the linux kernel simply sits on top of the ftdi_sio driver which is, of course, usb.
You just need to know how to talk to it on USB (as the sio driver already does)

Please clarify what you mean by "the linux kernel simply sits on top of the ftdi_sio driver".

My point is this: USB involves complex protocol, UART is simple. We can simulate a direct UART connection between any two systems through the Internet, as is being done as we speak. Now the Internet protocols are even more complex than USB. The easiest way to talk UART to another system through the Internet is NOT to muck with the Internet protocols (that would be crazy). The easiest way is to have another Internet appliance (similar to the one used on the other UART endpoint), and talk UART to that appliance. Similarly in the case of USB.

The simple topology seems to be [sio driver] <--> [usb driver] <-- usb wire --> [usb protocol hw] <--> [uart hw], with the [uart hw] on Avalon's control unit side dictating that the [sio driver] be used on the cgminer side. That's my point.

In other words, we may have to remove the [uart hw] on the Avalon control unit to get rid of the [sio driver] on cgminer.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
May 19, 2013, 06:26:44 AM
You probably can't easily install it on an Avalon but if by "xiangfu's machine" you mean a more powerful machine acting as a relay to connect to an Avalon, you could try to setup mosh.

I have some servers with unpredictable latencies and sometimes I have to work with a mobile connection with very unpredictable latencies. In practice its prediction algorithm is a game changer compared to ssh (the way it works is technically interesting too). You need to install it on both the server and the client and as long as the network lets you transmit UDP packets between your client and a port you can choose on the server (by default it's chosen by the server side between 60000 and 61000) you are set.

Currently you lose the multiplexing capabilities of ssh, but in your case this doesn't matter.
I've never heard of mosh before but I will definitely give it a try, thanks for the suggestion! (So many cool toys to play with on linux).
legendary
Activity: 4466
Merit: 1798
Linux since 1997 RedHat 4
May 19, 2013, 03:27:50 AM
...
EDIT:
It seems that the serial driver has to be used in cgminer because, on the Control Unit side, the USB goes through an offchip UART before connecting to the Spartan-6.
Incorrect - you do not have to use serial-USB - the linux kernel simply sits on top of the ftdi_sio driver which is, of course, usb.
You just need to know how to talk to it on USB (as the sio driver already does)
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
May 18, 2013, 09:20:28 AM
That's the effort involved in doing direct USB. We have to figure out what it is in the communication that is done and emulate it - as we do with a few other devices already in cgminer. Using direct USB uses a lot less CPU and should be far more reliable.
full member
Activity: 250
Merit: 100
RockStable Token Inc
May 18, 2013, 08:40:29 AM

The next step is to chuck the usb-serial code and go direct usb and remove a lot of the hacks and work arounds that were used and improve it a lot more.


What is the issue with going through usb-serial code?  Is it a bottleneck?  Or is this to improve reliability?

I ask this question because I am currently trying to decide whether to design my own Control Unit and replace the way the USB on the Control Unit is grafted onto the Spartan-6. The USB connection to the Spartan-6 can be enhanced by replacing both the uPD720114 and the FT232 UART with a single CY7C68013A which serializes/deserializes to 16-bits.

EDIT:
It seems that the serial driver has to be used in cgminer because, on the Control Unit side, the USB goes through an offchip UART before connecting to the Spartan-6.
hero member
Activity: 896
Merit: 1000
May 18, 2013, 05:03:59 AM
Somewhere between 5 minutes and 5 weeks...  Roll Eyes

No really I don't want to put a time on it because you can never tell. Half the problem has been that this direct usb work so far has been done on xiangfu's machine in China and sometimes via ssh it can take a minute to get a response from a keystroke. It's excruciating.

You probably can't easily install it on an Avalon but if by "xiangfu's machine" you mean a more powerful machine acting as a relay to connect to an Avalon, you could try to setup mosh.

I have some servers with unpredictable latencies and sometimes I have to work with a mobile connection with very unpredictable latencies. In practice its prediction algorithm is a game changer compared to ssh (the way it works is technically interesting too). You need to install it on both the server and the client and as long as the network lets you transmit UDP packets between your client and a port you can choose on the server (by default it's chosen by the server side between 60000 and 61000) you are set.

Currently you lose the multiplexing capabilities of ssh, but in your case this doesn't matter.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
May 18, 2013, 01:18:09 AM
Question: I have done some USB driver work on Windows. How difficult would it be to remove the serial port driver and go directly to USB? The USB protocol is more complicated than that for UART, but I imagine in cgminer high-level interfaces should look very similar to those for a UART?
This is what I'm currently working on, as most other drivers in cgminer are direct USB. To complete the work I need extended access to hardware and doing it remotely is proving problematic.

Con, how much time do you think you need on the machine?

Is it difficult to do remotely because you sometimes need a hard reboot?  I could potentially set up access for you with the ability to remotely power cycle the machine.
Somewhere between 5 minutes and 5 weeks...  Roll Eyes

No really I don't want to put a time on it because you can never tell. Half the problem has been that this direct usb work so far has been done on xiangfu's machine in China and sometimes via ssh it can take a minute to get a response from a keystroke. It's excruciating. The inability to do a hard reboot is also a major problem. It also is pretty much futile trying to do it directly on the avalon hardware, as there are far more tools you can use on a proper linux PC plugged into it via USB (specifically monitoring usb communications). A lot of this is just poking around to see what the serial driver converts into direct USB and trying to emulate that behaviour since it was never designed to be used in that way (which is a shame). There are other issues too, but they can be worked around.
full member
Activity: 250
Merit: 100
RockStable Token Inc
May 18, 2013, 01:11:13 AM
Question: I have done some USB driver work on Windows. How difficult would it be to remove the serial port driver and go directly to USB? The USB protocol is more complicated than that for UART, but I imagine in cgminer high-level interfaces should look very similar to those for a UART?
This is what I'm currently working on, as most other drivers in cgminer are direct USB. To complete the work I need extended access to hardware and doing it remotely is proving problematic.

Con, how much time do you think you need on the machine?

Is it difficult to do remotely because you sometimes need a hard reboot?  I could potentially set up access for you with the ability to remotely power cycle the machine.
The problem(s) maybe caused by the fact that, on the Avalon Control Unit, the USB serial I/O connects to a UART (FT232), instead of being deserialized and sent to the Spartan-6 chip. So to talk to the Spartan-6, you really need to use the UART protocol instead of the USB protocol. It seems to me that the USB protocol is transparent (or pass-through) in this case.
legendary
Activity: 1274
Merit: 1000
Personal text my ass....
May 17, 2013, 11:42:34 PM
Oh stop it. All you guys that have Avalons have been making a TON of money here in the last few months. Literally thousands and thousands if you played your cards right, and to this day STILL raking in a good chunk of change. Yea, a little jealous. I would have loved to pay off some bills.

Jump to: