Bitstream For Ztex 1.15y

Discussion in 'User Projects' started by sprocket, Mar 20, 2016.

  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. sprocket

    sprocket New Member

    Feb 20, 2016
    27
    14
    Male
    I created a bitstream for the ZTEX 1.15y board and want to share it with the decred community. If you have a ZTEX 1.15y board, you should be able to mine DCR using this modified cgminer and bitstream.

    I have put the bitstream at the following link. It gets about 800Mh/s.

    https://www.dropbox.com/s/j1d12ixhfthj0y7/ztex_ufm1_15y1.bit?dl=0

    The cgminer is located at the following link:

    https://github.com/sprocket-fpga/cgminer_3.7.2_ztex

    Below are the steps I used to modify Decred cgminer 0.0.5 to run on my Raspberry Pi.

    1) sudo apt-get update
    2) sudo apt-get install libusb-1.0-0-dev libusb-1.0-0 libcurl4-openssl-dev libncurses5-dev libudev-dev screen libtool automake pkg-config libjansson-dev
    3) git clone https://github.com/decred/cgminer
    4) cd cgminer
    5) sudo ./autogen.sh
    6) sudo ./configure --disable-adl --enable-icarus
    7) copy .c and .h files to cgminer directory
    8 ) copy .bit to cgminer\bitstreams
    9) sudo make
    10) Command Line: cgminer --disable-gpu --blake256 -o < url : port > -u < username > -p < password > --ztex-clock 100:100

    Note: This miner only works on Getwork pools. It does not have the Stratum logic incorporated.

    Open Issue: This miner seems to work fine for up to 4 ztex boards. More than 4 boards is causing the cgminer to crash after 10 minutes. If you have any ideas how to fix this issue, please PM me.

    -----------------------------------------------------------------------------------------------

    If you find this miner useful, please feel free to leave a tip:

    BTC: 14QcqFWZ9Y1j1aUHeUNySoMr4t9ZWJYt2a
    DCR: Dsj6WcnPYDPxDr99pQkTKeFsfh55KBJS2jY
     
    tacotime, root and coindozer like this.
  2. root

    root Member

    Feb 3, 2016
    381
    76
    tacotime likes this.
  3. root

    root Member

    Feb 3, 2016
    381
    76
    I can lend you my ARTY (site and device locked) licence in case of interest ;)
     
    tacotime likes this.
  4. sprocket

    sprocket New Member

    Feb 20, 2016
    27
    14
    Male
    Hi root. I appreciate the offer, but I'm probably going to spend a little time seeing if I can fine tune the ztex for now.

    I took a look at the ARTY, and although its a very nice board, it may not be the best for mining. It's a pretty small chip, so my guess is that it would only get around 10Mh/s or so. It would make for a fun experiment, but for the time you'd spend coding for it, you wouldn't get much of a return.
     
    tacotime likes this.
  5. Marcel1973

    Marcel1973 New Member

    Mar 26, 2016
    8
    8
    Male
    Hi Guys,

    Just tried to get my Ztex 1.15y running with above steps on Ubuntu, but when done cgminer says it sees no USB devices...
    Also getting the message "unrecognized option" with --enable-icarus --blake256.

    Of course I must be doing something wrong, but don't know what.
    Can anybody help me with some steps forward to get my Ztex 1.15y mining Decred.
     
    tacotime likes this.
  6. sprocket

    sprocket New Member

    Feb 20, 2016
    27
    14
    Male
    I think you are using the options incorrectly. You should use --enable-icarus when you build cgminer, and use --blake256 when you run cgminer.
     
    tacotime likes this.
  7. Marcel1973

    Marcel1973 New Member

    Mar 26, 2016
    8
    8
    Male
    Yeah, I get the difference now. But cgminer sees no Ztex at all, must be something with the incorrect\missing usb (lib) drivers...
    The --blake256 keeps mentioning unrecognized option but I think thats because the Ztex is not found.
    Always used Windows but switched to Ubuntu a while ago. Is there also solution for mining Decred with the Ztex under Windows?
     
    tacotime likes this.
  8. sprocket

    sprocket New Member

    Feb 20, 2016
    27
    14
    Male
    There is something wrong with how you are building cgminer. --blake256 is used by GPUs as well as the ztex, so if its saying that it's an invalid option then you must have missed a step in the build process. You may want to go back and repeat each step in the first post again.

    However, here is a link to a windows ztex cgminer that I built on Win 7 64bit. As you know, you need to take precautions when downloading exe's from the internet. I know this exe is fine, but I don't want you to get into bad habits of not checking first.

    https://www.dropbox.com/s/lcinhabgljose22/cgminer.exe?dl=0
     
    tacotime likes this.
  9. sprocket

    sprocket New Member

    Feb 20, 2016
    27
    14
    Male
    One other thing I just though of is that on my raspberry pi, I have to run cgminer using sudo in order for it to recognize the ztex. So you would run it using something like sudo ./cgminer .....
     
    tacotime likes this.
  10. Marcel1973

    Marcel1973 New Member

    Mar 26, 2016
    8
    8
    Male
    Well, completely removed Cgminer (by Ubuntu software centre, also was an earlier install done that way)
    and removed all the other cgminer maps on the desktop. Just to make sure.
    Did a step by step as above again, and it did more and I saw some Ztex stuff mentioning when installing.
    So far seems great...
    Copying the .c and .h files to cgminer directory, was a little pita keeps saying, I am not the owner\user
    But this is fixed and files where copied, everything done...
    starting cgminer, and " cgminer not installed " sudo apt-get install cgminer. Aaah, I just did!

    I did gave it a try installing my Ztex on (old) windows XP, the Ztex showed up in windows with a ! mark,
    after changing the !-mark with the Ztex lib-usb driver it correctly showed up.
    Just to make sure I did run Zadig, just like my Monarchs, and keeps running on WINusb drivers now.
    Running Cgminer, but the Ztex was not found either. (But Zadig and Hardwarelist says it's working)

    Well, I am going to try your windows version for now, Thank you very much for sharing :)
    Do I still have to copy the .c and .h files in the directory? And the Bitstream file in the directory?
    What is the Bitstream file and what to do with it?
    Sorry, for my questions but you seem to know what your talking about.
    I specially bought this small Ztex 1.15y for my Decred (test) project.
    I think it is a great coin for FPGA's much better then GPU mining this coin.

     
    tacotime likes this.
  11. sprocket

    sprocket New Member

    Feb 20, 2016
    27
    14
    Male
    If cgminer is running fine on Windows, then all you need to do is make sure you copy the bitstream to the cgminer/bitstreams folder. There is no need to copy the .c & .h files if you are using the exe, but you need to make sure you have all the DLLs in the cgminer folder....if it runs, then they are already there.
     
    tacotime likes this.
  12. Marcel1973

    Marcel1973 New Member

    Mar 26, 2016
    8
    8
    Male
    It's getting late here right now, I'll try everything tomorrow.

    Thanks again for your help, Sprocket.
     
    tacotime likes this.
  13. sprocket

    sprocket New Member

    Feb 20, 2016
    27
    14
    Male
    I just realized that the original cgminer code bypasses the --scan-time option for fpgas so I went ahead and updated the ztex driver logic in my github to include the scan-time option. Using "--scan-time 6" (or some value between 2 and 6) should eliminate most if not all of the rejects from the ztex.
     
    tacotime likes this.
  14. Marcel1973

    Marcel1973 New Member

    Mar 26, 2016
    8
    8
    Male
    Got cgminer windows running, and it will find the Ztex, but then says dummy found trying to send mining firmware, failed to open firmware.
    (ztex_ufm1_15y1.bin) Cannot check devices, Ztex cannot check device 0
    Then the pool starts, but will not mine, because of above.

    I think I am close, but trying to figure out the problem...
     
    tacotime likes this.
  15. sprocket

    sprocket New Member

    Feb 20, 2016
    27
    14
    Male
    ztex_ufm1_15y1.bin is not the correct file. The correct file is ztex_ufm1_15y1.bit. Delete everything from your cgminer\bitstreams folder and re-copy the ztex_ufm1_15y1.bit file there.
     
    tacotime likes this.
  16. Marcel1973

    Marcel1973 New Member

    Mar 26, 2016
    8
    8
    Male
    Eh, it is .bit not .bin. But after rebooting windows this message does not show up any more, now says;
    Failed to read Ztex discriptor and no devices conected.
    Damn, didn't know this would be this hard.
    Even installing mining Ethereum is much easier than this :)
     
    tacotime likes this.
  17. sprocket

    sprocket New Member

    Feb 20, 2016
    27
    14
    Male
    Make sure you're using WinUSB driver and not the LibUSB driver when using windows.

    Also, just an fyi...FPGAs are not easy, and I don't encourage anyone to use them unless they are interested in learning about them and understanding how to make them work.
     
    tacotime likes this.
  18. Marcel1973

    Marcel1973 New Member

    Mar 26, 2016
    8
    8
    Male
    Yes, FPGA's are not easy. It's new for me, and would like to give it a try just to see how hard it would be.
    Still booking some little progress and I think I am getting close now.

    - found Ztex board 1.15y
    - found dummy firmware, trying to send mining firmware
    - productString USB-FPGA Module 1.15y (default)
    - Mining firmware filename: ztex_ufm1_15y1.bin
    - failed to open firmware file 'ztex_ufm_15y1.bin
    - cannot check device
    - probing for alive pool

    Pool then starts running, though no mining because of Bitstream failure.
    As final question I would like to ask you what you think of this?
    Also giving it a final try on a clean Ubuntu 14.04 64 bit with your above steps.
    Thanks for your help.
     
    tacotime likes this.
  19. sprocket

    sprocket New Member

    Feb 20, 2016
    27
    14
    Male
    Ok, I'm starting to see your issue. You have a board without any firmware on it. Here is a copy of the firmware I'm using:

    https://www.dropbox.com/s/t13aprm7vyrwlrm/ztex_ufm1_15y1.ihx?dl=0

    I've never used cgminer to load firmware so I can't help you there. Maybe you can try renaming the firmware (.ihx file) to .bin and see if it loads. I've always loaded firmware manually using the steps at the ztex site:

    http://wiki.ztex.de/doku.php?id=en:software:fwloader

    Loading firmware can be a pain especially in windows. For windows when you use FWLoader, you have to use the LibUSB driver and run the loader using java. Once loaded you have to switch back to WinUSB so that cgminer can recognize the ztex. Maybe if you use cgminer, you won't have to use Libusb....but I don't know.
     
    tacotime likes this.
  20. Marcel1973

    Marcel1973 New Member

    Mar 26, 2016
    8
    8
    Male
    Well, after many days trying, the Ztex is still not working and I gave it up.
    I am 100% sure that I am only 1 or 2 steps away from mining, but it just won't work.
    Not going to but any more time in it, took to much time all ready. Going to sell the unit :(
     
    tacotime likes this.

Share This Page