home

Ghazi Bouselmi's Pages

Here you can find out who I am. Well, also my CV, my publications

LinkedIn : http://www.linkedin.com/in/ghazibouselmi

Here are some of the main programs I have developed (content is still under population, I'm looking into my archives :) )

Please be lenient, these projects have been carried out as a hobby, and (for the most recent) after long working days !



- Verilog 2001 (crypto-currency hashing chips): developed on my free personal time over the period between February and June 2022: 7 crypto-currency chips developed: Bitcoin (sha256d), Dogecoin (scrypt), Siacoin (blake2b), Kadena (blake2s), Ergo(autolykos2), Nervos-CKB (eaglesong), and Handshake (handshake)

    • the chips have a common (inter-chip) networking infrastructure, featuring automatic neighbors discovery, DHCP-like automatic address assignment, message routing, automatic root node election

    • the chips can be connected in large networks (100's of chips)

    • the chips are designed to be connected (each) to 4 neighbors, one of which can be a main controller (eg. an FPGA)

    • the network of chips can be connected to the main controller in multiple points, for redundancy

    • the Bitcoin, Siacoin and Dogecoin chips feature a configurable size of the coinbase & merkle-tree buffers

    • the chips have a configurable number of redundant hashing cores and coinbase hashers and merkle-tree hashers, and feature an automated self-test upon startup that checks the correct functioning of the previous hashers, their buffers and the main hashing cores, and are able to disable the faulty parts and run with the valid ones (if at all possible)

    • full software simulation test implemented

    • Bitcoin, Dogecoin, Siacoin, Kadena and CKB chip prototypes have been implemented on Xilinx Zynq-Ultrascale+ ZCU104 FPGA (Handshake is too large for the available FPGA, and Ergo can't be implemented on FPGAs)


more details for the Bitcoin chip (video demo on FPGA + video demo on software simulation)

more details for the Dogecoin chip (video demo on FPGA + video demo on software simulation)

more details for the Siacoin chip (video demo on FPGA + video demo on software simulation)

more details for the Kadena chip (video demo on FPGA + video demo on software simulation)

more details for the Ergo chip

more details for the CKB chip (video demo on FPGA + video demo on software simulation)

more details for the Handshake chip (vivado sythesis + video demo on software simulation)



A project analysis for the manufacturing of crypto mining machines (for commercial sales & mining) can be found here 12-07-2022--Project-analysis.pdf (previous versions 06-07-2022--Project-analysis.pdf, 25-06-2022--Project-analysis.pdf)


No source code is provided for these chips. For further information about these chips or for business ideas, please contact me here: ghazi.bousselmi@gmail.com or info@tachchouri-shop.nl


Video demo for a PCIe hashing card, featuring 45 hashing chips, and a maximum of 2kW of power: here



- HASKELL: A logical inference processor as defined in "Elementary Wattson", a coding challenge on www.hackerrank.com. Still under development.

detailed results.


- HASKELL: A program compiler & interpreter for the "While language", a coding challenge on www.hackerrank.com. A more complex grammar is accepted, similar to C/C++, including variable declaration, for loops, function definition & calls, most of C operators, including post & prefix increments "++" & "--", and the ternary "? : ".

detailed results.


- C++: A class allowing arbitrary size unsigned integer arithmetics: CUBigNumberV4.cpp - Oct-2017


- HASKELL: www.hackerrank.com challenges, rank top 0.1%:


- C/C++ & Algorithms: www.hackerrank.com challenges, rank top 0.2%:


- A simple network simulation: physical link, network card, IP-Module, TCP-Module, full IP routing, TCP sockets (listen/ accept/ connect/ disconnect/ send/ recv).

download here (still under development). detailed results.


- A memory manager that transparently hooks all C-Runtime memory functions and redirects them to private memory management methods. Aimed at minimizing memory fragmentation, and improving performance. This idea was originally developed withing my work. I re-implemented a simpler version on my personal time (along with an improved object-pool).

download here (still under development). details results.


- A library of synchronization offering the same functionality as Windows-API for HANDLEs, Events, Waitable-Timers, Thread-Creation & handling, Critical-Sections, Mutex(es), Semaphores, with the appropriate API alternatives for creation/destruction, locking/unlocking, waiting on objects, thread-sleep (up to micro-second precision in most cases). Originally developed at work, I fully re-implemented it on my personal time, in a style more inline with c++11. This library offers the possibility to operate using its own thread, or using the lifetime of (client) threads that are calling it. The library offers a private implementation of critical section (based on Interlocked-like API), and performs 5-10 times faster than windows API critical section and 2-2.5 times faster than STL's std::mutex, using a spin-wait for locking. The HANDLE-oriented operations are based on a FIFO-circular-buffer using similar techniques than the latter, and are as a result 10 to 100 times faster than their Windows-API counterparts (WaitForSingleObject, WaitForMultipleObject, …). It is worth noting that these operations and that circular buffer are thread-safe without using any mutex or critical section, the circular buffer itself is 2-5 times faster than a regular mutex-protected one. Beyond the speed improvement, in most usages and for the same algorithms, this library reduces the CPU usage as compared to windows API or STL's mutex.

download here (still under development). text results. detailed results.


- A Win32/Linux HTTP-proxy, featuring several private encryption algorithms and using keys up to 64KB of size. The program can act as a full HTTP-proxy, or as bridge (HTTP-proxy requests forwarding to other proxies). Thus, it can be used as an anonymizer allowing the local machine to access the web through the identity (and connection) of a remote machine, with highly encrypted HTTP stream(s) between the two.

download here


- A compiler for intel(r) Pentium 4 (r) assembly language, under delphi 6 (you can download the free "Turbo Delphi 6" to run it). I included an executable file, tested with Northon antivirus (July 2008). Accepts a pure assembly language to generate .COM and .EXE dos executables, and a Pascal-like program structure (units, functions, variables, constants ... uses the file "system.pas", which is a sample library containing some functions such as write_wrod() ...) to generate a .EXE file.

download here


- 3D rendering, Ray-Tracing & “Inifinte Detail” (under Linux): following in the foot-steps of the software developed by http://www.euclideon.com/ (infinite detail engine). The framework features a world of maximum size of [ 222 x 222 x 222 ] (equivalent to 1 kilometer cube, with a granularity of 64 pixels per millimeter cube, each pixel having color and transparency properties), and offering a modular architecture where references to (an) object(s) can be inserted (in the world) multiple times with different position/orientation & scaling factors, and offering several types of cameras (planar, cylindrical, spherical, ...). Although the world size is 266, the software can accommodate several thousands of objects (or copies) of sizes in the range of 212 to 215 (cubed) with a memory load of about 1.5 Gigabytes. The drawing procedure is multi-threaded. As an example, with 8 CPU cores, 10 thousand objects (spheres / cubes) of size 212 cubed, and a planar camera, the framework renders 8 to 10 frames per second (of resolution 800x600), without any hardware GPU acceleration, only assembler code optimization (SIMD).

download here (warning: messy code ! :) ).


- Another version of the 3D Ray-Tracing, using parts of the previous, with a style more inline with c++11 (still under development).

download here, results here.

- Mersenne-Primes' checking using hyper-parallel GPU computing (Microsoft C++AMP).

download here.


- Optimization: calculation of possible Knight's-move sequence numbers (part of a job application).

download here.


- A 3D car racing game, an attempt to a 3D version of the famous "Micromachines 2" from "Codemasters". Developed by me and Bdioui Houssem under Visual C++, within an academic project for engineer studies. The game is based on Direct3D 8.0, and features multiplayer with configurable keyboard, IA with different levels and 2 maps. Map editor will soon be available.

download here.


- A trojan virus, allowing to control the infected machine. Developed by me and Bdioui Houssem under Visual C++, within an academic project for engineer studies. The project is composed of two parts: a server(virus) and a client. The server allows the client to remotely control the machine: create/delete/download/upload files, kill/lauch processes, control the mouse/change cursor, control keyboard, shut down the machine ...

download here.


- 2 mini-programs developed during my recruitment test in my current job. Please be lenient, at that time I was not familiar with Windows-API nor MFC programming since I have been programming under linux for the previous 5 years (Masters and PhD).

download here.